Exemplo n.º 1
0
        public void TestWithRemovedOrder()
        {
            Store.BusinessLogic.GeneralInfo generalInfo  = new Store.BusinessLogic.GeneralInfo(new RepositoryForTests());
            Store.BusinessLogic.Product[]   inputPoducts = { new Store.BusinessLogic.Product("analgin",  100),
                                                             new Store.BusinessLogic.Product("serum",      200),
                                                             new Store.BusinessLogic.Product("antibodies", 300) };
            GeneralInfo.DataProvider.GetAllProducts()[0].SetCount(15);
            Store.BusinessLogic.Supplier sup = new Supplier("Химбиотех", "SPb, Rusovskaya, 4", new List <int>()
            {
                1, 2, 0
            });
            Manager man = new Manager("Artem");
            Client  cl  = new Client("Ekaterina", "MSK, Pushkina, 12");
            Order   ord = cl.RequestNewOrder(man, GeneralInfo.DataProvider.GetAllProducts()[0], 10);

            cl.OrderConfirmation(ord);
            cl.RemoveOrder(ord);
            Assert.AreEqual(GeneralInfo.DataProvider.GetListOfOrders(man).Count, 0);
        }