Exemplo n.º 1
0
        public void GetShopWcfFailAddress()
        {
            var shop = new Shop()
            {
                Name       = "hello world",
                Address    = null,
                Cvr        = "Hello Cvr",
                Warehouses = new List <Warehouse>(),
                Chain      = new Chain
                {
                    Id      = 1,
                    Cvr     = "12121212",
                    Name    = "",
                    Persons = new List <Person>(),
                    Shops   = new List <Shop>()
                }
            };

            using (var proxy = new BestilNemtServiceRef.BestilNemtServiceClient())
            {
                proxy.Open();
                var i = proxy.AddShop(shop);
                var j = proxy.GetShop(i);
                proxy.DeleteShop(i);
                Assert.IsNull(j);
            }
        }
Exemplo n.º 2
0
        public void GetShopWcfFailAll()
        {
            var shop = new Shop()
            {
                Name       = null,
                Address    = null,
                Cvr        = null,
                Warehouses = null
            };

            using (var proxy = new BestilNemtServiceRef.BestilNemtServiceClient())
            {
                proxy.Open();
                var i = proxy.AddShop(shop);
                var j = proxy.GetShop(i);
                proxy.DeleteShop(i);
                Assert.IsNull(j);
            }
        }
Exemplo n.º 3
0
        public void GetShopWcfFailWarehouse()
        {
            var shop = new Shop()
            {
                Name       = "hello world",
                Address    = "Hello address",
                Cvr        = "12121212",
                Warehouses = null,
                Chain      = null
            };

            using (var proxy = new BestilNemtServiceRef.BestilNemtServiceClient())
            {
                proxy.Open();
                var i = proxy.AddShop(shop);
                var j = proxy.GetShop(i);
                proxy.DeleteShop(i);
                Assert.IsNull(j);
            }
        }
Exemplo n.º 4
0
        public void findAllPerson()
        {
            var s = proxy.GetShop(1);

            Assert.IsTrue(s.Id == 1);
        }