Пример #1
0
        ////[TestCase("Alex", "Black", 22)]
        public void GetFirstUserByFirstAndLastNameAndAge_FirstNameAlexLastNameBlack_FirstUserWithFirstNameAlexLastNameBlack(
            string first, string lastname, int age)
        {
            User user1 = new User()
            {
                FirstName = "Alex", LastName = "Black", Age = 22
            };
            User user2 = new User()
            {
                FirstName = "Mike", LastName = "red", Age = 123
            };
            User user3 = new User()
            {
                FirstName = "Sue", LastName = "gen", Age = 42
            };
            User user4 = new User()
            {
                FirstName = "Alex", LastName = "Black", Age = 111
            };

            UserStorageServiceMaster service = new UserStorageServiceMaster(new UserRepositoryWithState());

            Assert.AreEqual(user1, service.GetFirstUserByFirstAndLastNameAndAge(first, lastname, age));
            Assert.AreNotEqual(user4, service.GetFirstUserByFirstAndLastNameAndAge(first, lastname, age));
        }