Exemplo n.º 1
0
        public void PopularFemaleNameWhichNoFemaleNameTest()
        {
            List <User> listOfUsers = new List <User>();

            listOfUsers.Add(new User("Ivan", "Morz", User.SexOfAPerson.male, 25));
            listOfUsers.Add(new User("Vlad", "Sed", User.SexOfAPerson.male, 40));
            CommandReceiver receiver    = new CommandReceiver(listOfUsers);
            string          actualValue = receiver.SearchTheMostPopularFemaleName();

            Assert.AreEqual("", actualValue);
        }
Exemplo n.º 2
0
        public void TheMostPopularFemaleNameTest()
        {
            List <User> listOfUsers = new List <User>();

            listOfUsers.Add(new User("Any", "Novik", User.SexOfAPerson.female, 18));
            listOfUsers.Add(new User("Natasha", "Lesh", User.SexOfAPerson.female, 64));
            listOfUsers.Add(new User("Ivan", "Morz", User.SexOfAPerson.male, 25));
            listOfUsers.Add(new User("Vlad", "Sed", User.SexOfAPerson.male, 40));
            listOfUsers.Add(new User("Natasha", "Lok", User.SexOfAPerson.female, 24));
            listOfUsers.Add(new User("Natasha", "Les", User.SexOfAPerson.female, 52));
            CommandReceiver receiver    = new CommandReceiver(listOfUsers);
            string          actualValue = receiver.SearchTheMostPopularFemaleName();

            Assert.AreEqual("Natasha", actualValue);
        }
Exemplo n.º 3
0
 public void Execute()
 {
     popularFemaleName = receiver.SearchTheMostPopularFemaleName();
     Console.WriteLine($"The most popular female name is {popularFemaleName}");
 }