Example #1
0
 public void GetCustomersTestValidationException()
 {
     Technician technician = null;
     CustomerService service = new CustomerService();
     service.GetCustomers(technician);
 }
Example #2
0
        public void GetCustomersTest()
        {
            Technician technician = new Technician(); 
            technician.TechnicianID = 1;
            technician.Person = new Person()
            {
                Email = "*****@*****.**",
                Firstname = "PersonVorname",
                Lastname = "PersonNachname",
                Password = "******",
                Username = "******"
            };

            Customer cus = new Customer()
                {
                    Person = new Person()
                        {
                            Email = "*****@*****.**",
                            Firstname = "PersonVorname",
                            Lastname = "PersonNachname",
                            Password = "******",
                            Username = "******"
                        }
                };
            technician.Customers.Add(cus);

            CustomerService target = new CustomerService();

            List<Customer> expected = new List<Customer>(technician.Customers) ; 
            List<Customer> actual;
            actual = target.GetCustomers(technician);
            Assert.AreEqual(expected[0], actual[0]);
            
        }
Example #3
0
 public void GetCustomersTestValidationException()
 {
     Technician technician = null;
     CustomerService service = new CustomerService(new RepositoryMock<Customer>());
     service.GetCustomers(technician);
 }