public void UserEngine_InsertUser() { //Arrange: Seed the Mocked Accessor with a list of Users and creates a User to be inserted SeedUsers(); User user = new User { Id = 4, Email = "*****@*****.**", Password = "******" }; //Act: Calls the UserEngine InsertUser() method to insert the created User object var result = userEngine.InsertUser(user); //Assert: Checks whether the expected User and the inserted User are equal, and that the inserted User is within the list Assert.AreEqual(user, result, "User was inserted incorrectly."); CollectionAssert.Contains(mockedUserAccessor.GetState(), result, "The user was not inserted into the list."); }
public void PostItem(User user) { _userEngine.InsertUser(user); }