Ejemplo n.º 1
0
        public List <CustomerModel> GetCustomers(UICustomerSC sc)
        {
            CustomerBL      bl             = new CustomerBL();
            List <Customer> customerDBList = bl.Search(sc);

            return(customerDBList.Select(c => new CustomerModel(c, false)).ToList());
        }
Ejemplo n.º 2
0
        public void GetCustomersTestMethod()
        {
            //Arrange
            CustomerController   customer = new CustomerController();
            UICustomerSC         sc       = new UICustomerSC();
            List <CustomerModel> lstCustomers;

            //Act
            lstCustomers = customer.GetCustomers(sc);



            //Assert

            Assert.IsNotNull(lstCustomers);

            Assert.AreNotEqual(0, lstCustomers.Count);

            Assert.IsNotNull(lstCustomers[0].Vehicles);


            sc.Id        = 1;
            lstCustomers = customer.GetCustomers(sc);

            Assert.IsNotNull(lstCustomers);
        }