public MainMenu() { clientDAO = new ClientDAO(); carInventoryDAO = new CarInventoryDAO(); colorDAO = new ColorDAO(); operationsDAO = new OperationsDAO(); brandDAO = new BrandDAO(); modelDAO = new ModelDAO(); engineDAO = new EngineDAO(); employeeDAO = new EmployeeDAO(); dealDAO = new DealDAO(); }
public void Test1() { // ARRANGE IClientDAO ns = Substitute.For <IClientDAO>(); Client newClient = new Client(ns, "Name", "0215005421540"); IOrderDAO sd = Substitute.For <IOrderDAO>(); Order newOrder = new Order(sd, newClient); IOrder order = Substitute.For <IOrder>(); // ACT newOrder.Deliver(); // ASSERT Assert.AreEqual(2, sd.ReceivedCalls().Count()); }
public void Test2() { // ARRANGE IClientDAO ns = Substitute.For <IClientDAO>(); Client newClient = new Client(ns, "Name", "0215005421540"); IOrderDAO sd = Substitute.For <IOrderDAO>(); Order newOrder = new Order(sd, newClient, false); IOrder order = Substitute.For <IOrder>(); IFlowerDAO flo = Substitute.For <IFlowerDAO>(); IFlower mflo = Substitute.For <IFlower>(); mflo = new Flower(flo, "sjdnskjdb as", 100, 20); // ACT newOrder.AddFlowers(mflo, flo, 21); // ASSERT Assert.AreEqual(120, newOrder.Price); }
public ClientProcess() { clientDao = DAOFactory.getclientdao(); }
public ClientBO(IClientDAO dao) { _dao = dao; }
public Client(IClientDAO dao, string name, string cell) { Name = name; Cellphone = cell; Id = dao.AddClient(name, cell); }