Exemple #1
0
        public void EmployeesFromLocation()
        {
            var employee = new PhoneBook();

            employee.AddEmployee("Marzena", "Januszewska", 34323, Location.Wroclaw, "451-584-985");
            employee.AddEmployee("Janusz", "Januszewski", 34323, Location.Koszalin, "451-584-985");
            employee.AddEmployee("Sylwester", "Nosowski", 34323, Location.Zielona_Gora, "451-584-985");
            employee.AddEmployee("Halina", "Papuzinska", 34323, Location.Krakow, "451-584-985");
            employee.AddEmployee("Juliusz", "Januszewska", 34323, Location.Wroclaw, "451-584-985");

            var employeesFromWroclaw = employee.EmployessFromLocation(Location.Wroclaw);

            Assert.That(employeesFromWroclaw.Count, Is.EqualTo(2));
        }
Exemple #2
0
        public void PhoneBook_Add_Employees()
        {
            var employee  = new Employee("Bartek", "En", 123, Locations.Koszalin, "00-4567");
            var employee2 = new Employee("Ania", "Zar", 456, Locations.Wroclaw, "00-1597");
            var employee3 = new Employee("Sylwek", "Mroz", 789, Locations.Szczecin, "00-1999");
            var employee4 = new Employee("Marcin", "Rek", 963, Locations.Szczecin, "00-1588");

            var phoneBook = new PhoneBook();

            phoneBook.AddEmployee(employee);
            phoneBook.AddEmployee(employee2);
            phoneBook.AddEmployee(employee3);
            phoneBook.AddEmployee(employee4);

            foreach (var element in phoneBook.EmployeesFromLocation(Locations.Szczecin))
            {
                Console.WriteLine(element.Name);
            }
        }
Exemple #3
0
        public void PhoneBook_Add_Employees()
        {
            var employee1 = new Employee("Wojtek", "Pierog", 22222, Locations.Koszalin, "555-555");
            var employee2 = new Employee("Bartek", "Naskar", 90909, Locations.Warszawa, "111-111");
            var employee3 = new Employee("Marek", "NieMarek", 333333, Locations.Szczecin, "333-333");
            var employee4 = new Employee("Marcin", "Rek", 11111, Locations.Szczecin, "125-125");

            var phoneBook = new PhoneBook();

            phoneBook.AddEmployee(employee1);
            phoneBook.AddEmployee(employee2);
            phoneBook.AddEmployee(employee3);
            phoneBook.AddEmployee(employee4);

            foreach (var newObject in phoneBook.EmployeesFromLocation(Locations.Szczecin))
            {
                Console.WriteLine(newObject.Name);
            }
        }