File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
tests/Microsoft.Graph.Test/Requests/Functional Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,25 @@ namespace Microsoft.Graph.Test.Requests.Functional
1313 [ TestClass ]
1414 public class UsersTests : GraphTestBase
1515 {
16+ // Filter on displayname
17+ // https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/41
18+ [ TestMethod ]
19+ public async Task UserFilterStartsWith ( )
20+ {
21+ try
22+ {
23+ var usersQuery = await graphClient . Users . Request ( ) . Filter ( "startswith(displayName,'A')" ) . GetAsync ( ) ;
24+ foreach ( User u in usersQuery )
25+ {
26+ StringAssert . StartsWith ( u . DisplayName , "A" , "Expected a display name that started with the letter A." ) ;
27+ }
28+ }
29+ catch ( Microsoft . Graph . ServiceException e )
30+ {
31+ Assert . Fail ( "Something happened, check out a trace. Error code: {0}" , e . Error . Code ) ;
32+ }
33+ }
34+
1635 // Get the test user's photo.
1736 [ TestMethod ]
1837 public async Task UserGetPhoto ( )
You can’t perform that action at this time.
0 commit comments