Exemplo n.º 1
0
 public void SetUp()
 {
     testShop = new Shop();
     testShop.NameShop = "mój sklep spożywczy";
     ArticlesRepository myArticlesRepository=new ArticlesRepository();
     testShop.AllArticles = myArticlesRepository.GenerSomeOfProducts("images/");
 }
Exemplo n.º 2
0
        public void SetUp()
        {
            MyBasket=new Basket();
             toShoping = new Products();

             testShop = new Shop();
             testShop.NameShop = "mój sklep spożywczy";
             Article testArticle1 = new Article() {
                                                     GraphElem = null,
                                                     ImagePath = "c:\\ggg.png",
                                                     Name = "maslo",
                                                     Price = 23.2M,
                                                     Quantity = 23.6,
                                                     IsForShooping = true,
                                                 };
            Article testArticle2 = new Article() {
                                                     GraphElem = null,
                                                     ImagePath = "c:\\ggg.png",
                                                     Name = "mleko",
                                                     Price = 0M,
                                                     Quantity = 23.6,
                                                     IsForShooping = false,
                                                 };
            Article testArticle3 = new Article() {
                                                     GraphElem = null,
                                                     ImagePath = "c:\\ggg.png",
                                                     Name = "cukier",
                                                     Price = 15.2m,
                                                     Quantity = 100.1,
                                                     IsForShooping = true,
                                                 };
            toShoping.AddArticle(testArticle1);
            toShoping.AddArticle(testArticle2);
            toShoping.AddArticle(testArticle3);

             MyClient=new Client(){Cash = 50m,Name = "klient",ToShoping = toShoping};
             ArticlesRepository myArticlesRepository = new ArticlesRepository();
             testShop.AllArticles = myArticlesRepository.GenerSomeOfProducts("images/");
             myDoShoping = new DoShoping(MyClient, MyBasket);
        }