@@ -10,9 +10,9 @@ namespace Microsoft.Graph.Authentication.Test
1010{
1111 public class ODataQueryOptionsHandlerTests : IDisposable
1212 {
13- private HttpMessageInvoker _invoker ;
14- private FakeSuccessHandler _fakeSuccessHandler ;
15- private ODataQueryOptionsHandler _graphODataHandler ;
13+ private readonly HttpMessageInvoker _invoker ;
14+ private readonly FakeSuccessHandler _fakeSuccessHandler ;
15+ private readonly ODataQueryOptionsHandler _graphODataHandler ;
1616
1717 public ODataQueryOptionsHandlerTests ( )
1818 {
@@ -64,7 +64,7 @@ public async Task ShouldAddDollarSignToStandardODataQueryOptionsToV1Endpoint()
6464 }
6565
6666 [ Fact ]
67- public async Task ShouldSkipWhenGraphVersionIsBeta ( )
67+ public async Task ShouldAddDollarSignWhenGraphVersionIsBeta ( )
6868 {
6969 // Arrange
7070 string topParam = "$top=5" ;
@@ -78,9 +78,15 @@ public async Task ShouldSkipWhenGraphVersionIsBeta()
7878
7979 // Act
8080 var response = await this . _invoker . SendAsync ( httpRequestMessage , new CancellationToken ( ) ) ;
81+ var sentRequestQuery = response . RequestMessage . RequestUri . Query ;
8182
8283 // Assert
83- Assert . Equal ( requestUrl . ToString ( ) , response . RequestMessage . RequestUri . ToString ( ) ) ;
84+ Assert . NotEqual ( requestUrl . Query , sentRequestQuery ) ;
85+ Assert . Contains ( topParam , sentRequestQuery ) ;
86+ Assert . Contains ( orderbyParam , sentRequestQuery ) ;
87+ Assert . Contains ( $ "${ selectParam } ", sentRequestQuery ) ;
88+ Assert . Contains ( $ "${ filterParam } ", sentRequestQuery ) ;
89+ Assert . Contains ( $ "${ expandParam } ", sentRequestQuery ) ;
8490 Assert . Equal ( 5 , response . RequestMessage . RequestUri . Query . Split ( '&' ) . Length ) ;
8591 }
8692
0 commit comments