public void Update(User user)
 {
     if (UserExists(user.Id))
     {
         UsersServiceHelper.Update(user);
     }
     ;
 }
示例#2
0
        public async void VerifyUpdate()
        {
            // Arrange
            const string expectedName = "New name";
            var          user         = await UsersServiceHelper.Get(UserId);

            // Act
            // Update name of the user and then get the user again from the API
            user.Name = expectedName;
            await UsersServiceHelper.Update(user);

            user = await UsersServiceHelper.Get(UserId);

            // Assert
            // Check if the name of user was indeed updated
            Assert.AreEqual(expectedName, user.Name);
        }