public void UserEngine_VerifyUser() { //Arrange: Seed the Mocked Accessor's lists of Users and creates an expected list of Users SeedUsers(); List <User> expected = new List <User> { new User { Id = 1, Email = "*****@*****.**", Password = "******" }, new User { Id = 2, Email = "*****@*****.**", Password = "******" }, new User { Id = 3, Email = "*****@*****.**", Password = "******" } }; //Act: Creates a result list and adds the return value of the UserEngine VerifyUser() method to the list List <User> results = new List <User>(); for (int i = 0; i < mockedUserAccessor.GetState().Count; i++) { var user = userEngine.VerifyUser(expected.ElementAt(i).Email, expected.ElementAt(i).Password); results.Add(user); } //Assert: Checks whether each User in the expected and results lists are equal for (int i = 0; i < expected.Count; i++) { Assert.AreEqual(expected.ElementAt(i), results.ElementAt(i), $"User {i} was retrieved incorrectly."); } }