예제 #1
0
 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();
 }
예제 #2
0
        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());
        }
예제 #3
0
        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();
 }
예제 #5
0
 public ClientBO(IClientDAO dao)
 {
     _dao = dao;
 }
예제 #6
0
 public Client(IClientDAO dao, string name, string cell)
 {
     Name      = name;
     Cellphone = cell;
     Id        = dao.AddClient(name, cell);
 }