예제 #1
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)
        }
예제 #2
0
        public void DeleteShopCtrFailId()
        {
            var shopCtr = new ShopCtr(new ShopCtrTestClass());
            var j       = shopCtr.DeleteShop(0);

            Assert.AreEqual(0, j);
        }
예제 #3
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);
        }
예제 #4
0
        public List <Shop> GetAllShopsTest([PexAssumeUnderTest] ShopCtr target)
        {
            List <Shop> result = target.GetAllShops();

            return(result);
            // TODO: add assertions to method ShopCtrTest.GetAllShopsTest(ShopCtr)
        }
예제 #5
0
        public ShopCtr ConstructorTest()
        {
            ShopCtr target = new ShopCtr();

            return(target);
            // TODO: add assertions to method ShopCtrTest.ConstructorTest()
        }
예제 #6
0
 /// <summary>
 /// Initialize all Controllers
 /// </summary>
 public BestilNemtService()
 {
     LoginCtr       = new LoginCtr(new DbLogin());
     CustomerCtr    = new CustomerCtr(new DbCustomer());
     ShopController = new ShopCtr(new DbShop());
     ChainCtr       = new ChainCtr(new DbChain());
     AdminCtr       = new AdminCtr(new DbAdmin());
     ProductCtr     = new ProductCtr(new DbProduct());
     CartCtr        = new CartCtr(new DbCart());
     PartOrderCtr   = new PartOrderCtr(new DbPartOrder());
     SavingCtr      = new SavingCtr(new DbSaving());
     WarehouseCtr   = new WarehouseCtr(new DbWarehouse());
 }
예제 #7
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);
        }
예제 #8
0
        public void AddShopCtrFailWarehouse()
        {
            var shopCtr = new ShopCtr(new ShopCtrTestClass());
            var shop    = new Shop()
            {
                Name        = null,
                Address     = null,
                OpeningTime = "Manday Never",
                Cvr         = null,
                Warehouses  = null
            };
            var i = shopCtr.AddShop(shop);

            shopCtr.DeleteShop(i);
            Assert.AreEqual(0, i);
        }
예제 #9
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);
        }
예제 #10
0
        public void DeleteShopCtr()
        {
            var shopCtr = new ShopCtr(new ShopCtrTestClass());
            var shop    = new Shop()
            {
                Name       = "hello world",
                Address    = "Hello address",
                Cvr        = "12121212",
                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.DeleteShop(i);

            Assert.AreEqual(1, j);
        }
예제 #11
0
        public void AddShopCtrFailBoth2()
        {
            var shopCtr = new ShopCtr(new ShopCtrTestClass());
            var shop    = new Shop()
            {
                Name        = "",
                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);

            shopCtr.DeleteShop(i);
            Assert.AreEqual(0, i);
        }
예제 #12
0
        public void ShopCtrInitialize()
        {
            var shopCtr = new ShopCtr(new ShopCtrTestClass());

            Assert.IsNotNull(shopCtr);
        }
예제 #13
0
        //BestilNemtServiceRef.BestilNemtServiceClient Client;

        public ShopCRUDTest()
        {
            shopCtr = new ShopCtr();
            //Client = new BestilNemtServiceRef.BestilNemtServiceClient();
        }
예제 #14
0
 public void UpdateShopTest([PexAssumeUnderTest] ShopCtr target, Shop shop)
 {
     target.UpdateShop(shop);
     // TODO: add assertions to method ShopCtrTest.UpdateShopTest(ShopCtr, Shop)
 }
예제 #15
0
 public void DeleteShopTest([PexAssumeUnderTest] ShopCtr target, int id)
 {
     target.DeleteShop(id);
     // TODO: add assertions to method ShopCtrTest.DeleteShopTest(ShopCtr, Int32)
 }