Esempio n. 1
0
        public void GetShopCtrFailCvr2()
        {
            var shopCtr = new ShopCtr(new ShopCtrTestClass());
            var shop    = new Shop()
            {
                Name        = "hello world",
                Address     = "Hello address",
                OpeningTime = "Manday Never",
                Cvr         = "",
                Warehouses  = new List <Warehouse>(),
                Chain       = new Chain
                {
                    Id      = 1,
                    Cvr     = "12121212",
                    Name    = "",
                    Persons = new List <Person>(),
                    Shops   = new List <Shop>()
                }
            };
            var i = shopCtr.AddShop(shop);
            var j = shopCtr.GetShop(i);

            shopCtr.DeleteShop(i);
            Assert.IsNull(j);
        }
Esempio n. 2
0
        public Shop GetShopTest([PexAssumeUnderTest] ShopCtr target, int id)
        {
            Shop result = target.GetShop(id);

            return(result);
            // TODO: add assertions to method ShopCtrTest.GetShopTest(ShopCtr, Int32)
        }
Esempio n. 3
0
        public void FindShopTest()
        {
            // int id = 1;

            Shop shop = shopCtr.GetShop(1);

            Assert.IsNotNull(shop);
        }
Esempio n. 4
0
        public void GetShopCtrFailAll()
        {
            var shopCtr = new ShopCtr(new ShopCtrTestClass());
            var shop    = new Shop()
            {
                Name       = null,
                Address    = null,
                Cvr        = null,
                Warehouses = null
            };
            var i = shopCtr.AddShop(shop);
            var j = shopCtr.GetShop(i);

            shopCtr.DeleteShop(i);
            Assert.IsNull(j);
        }
Esempio n. 5
0
        public void GetShopCtrFailWarehouse()
        {
            var shopCtr = new ShopCtr(new ShopCtrTestClass());
            var shop    = new Shop()
            {
                Name       = "hello world",
                Address    = "Hello address",
                Cvr        = "12121212",
                Warehouses = null,
                Chain      = null
            };
            var i = shopCtr.AddShop(shop);
            var j = shopCtr.GetShop(i);

            shopCtr.DeleteShop(i);
            Assert.IsNull(j);
        }