Esempio n. 1
0
 public void GetUsersWithWorkspaces()
 {
     UsersService service = new UsersService( API_KEY );
     User[] users = service.GetUsers( new OptionalFields[] { OptionalFields.User_Workspaces } );
     Assert.IsNotNull( users );
     Assert.IsTrue( users.Length > 0, "users.Length == " + users.Length.ToString() + " - it should be > 0 " );
     Assert.IsNotNull( users[ 0 ].Workspaces, "Workspaces should come back" );
     Assert.IsNull( users[ 0 ].Email, "Email should come back null" );
 }
Esempio n. 2
0
        public void GetUsersWithWorkspacesAndEmail_DifferentEnumOrdering()
        {
            UsersService service = new UsersService( API_KEY );
            User[] users = service.GetUsers( new OptionalFields[] { OptionalFields.User_Workspaces, OptionalFields.User_Email } );
            Assert.IsNotNull( users );
            Assert.IsTrue( users.Length > 0, "users.Length == " + users.Length.ToString() + " - it should be > 0 " );

            Assert.IsNotNull( users[ 0 ].Workspaces, "Workspaces should come back" );
            Assert.IsNotNull( users[ 0 ].Email, "Email should come back" );
            Assert.AreEqual( TEST_USER_ID, users[ 0 ].Id, "user id is incorrect" );
            Assert.AreEqual( TEST_USER_NAME, users[ 0 ].Name, "name is incorrect" );
        }