public void TestWareHouseStockSer()
        {
            var wareHouse           = new Warehouse(2, 32, 10);
            var serializationResult = SerializerTestHelpClass.TestSerialize(wareHouse);

            Assert.AreEqual(wareHouse.Stock, serializationResult.Stock);
        }
        public void TestProductPriceSer()
        {
            var product             = new Product(3, "Kat", 20.50m, "Stor kat", "Dyr", "Img path");
            var serializationResult = SerializerTestHelpClass.TestSerialize(product);

            Assert.AreEqual(product.Price, serializationResult.Price);
        }
        public void TestLoginPasswordSer()
        {
            var login = new Login();
            var serializationResult = SerializerTestHelpClass.TestSerialize(login);

            Assert.AreEqual(login.Password, serializationResult.Password);
        }
        public void TestLoginUserNameSer()
        {
            var login = new Login();
            var serializationResult = SerializerTestHelpClass.TestSerialize(login);

            Assert.AreEqual(login.Username, serializationResult.Username);
        }
        public void TestPartOrderPartPriceSer()
        {
            var product             = new Product();
            var cart                = new Cart();
            var partOrder           = new PartOrder(2, product, 2, 100m, cart);
            var serializationResult = SerializerTestHelpClass.TestSerialize(partOrder);

            Assert.AreEqual(partOrder.PartPrice, serializationResult.PartPrice);
        }
        public void TestShopAddressSer()
        {
            var warehouses          = new List <Warehouse>();
            var chain               = new Chain();
            var shop                = new Shop(3, "name", "Address", "Mandag - Torsdag	08:00 - 21:00;Fredag  08:00 - 22:00;Lørdag - Søndag 08:00 - 21:00", "long cvr", chain, warehouses);
            var serializationResult = SerializerTestHelpClass.TestSerialize(shop);

            Assert.AreEqual(shop.Address, serializationResult.Address);
        }
        public void TestSavingSavingPercentSer()
        {
            var product  = new Product();
            var products = new List <Product> {
                product
            };
            var saving = new Saving(new DateTime(2000, 02, 01), new DateTime(2000, 02, 01), 2.1, products);
            var serializationResult = SerializerTestHelpClass.TestSerialize(saving);

            Assert.AreEqual(saving.SavingPercent, serializationResult.SavingPercent);
        }
        public void TestCartTotalPriceSer()
        {
            var partOrder  = new PartOrder();
            var partOrders = new List <PartOrder> {
                partOrder
            };
            var cart = new Cart(5, partOrders, 200.00m, new Person().Id, new Chain().Id);
            var serializationResult = SerializerTestHelpClass.TestSerialize(cart);

            Assert.AreEqual(cart.TotalPrice, serializationResult.TotalPrice);
        }
        public void TestAdminNameSer()
        {
            var login  = new Login();
            var chain  = new Chain();
            var chains = new List <Chain>();

            chains.Add(chain);
            var admin = new Admin(4, "Benny", "*****@*****.**", "Kattevejen", login, chains, "Administrator", 1, 1);
            var serializationResult = SerializerTestHelpClass.TestSerialize(admin);

            Assert.AreEqual(admin.Name, serializationResult.Name);
        }
        public void TestCustomerBirthdaySer()
        {
            var login  = new Login();
            var chain  = new Chain();
            var chains = new List <Chain> {
                chain
            };
            var customer            = new Customer(4, "Benny", "*****@*****.**", "Kattevejen", new DateTime(2000, 02, 01), login, chains, "Customer");
            var serializationResult = SerializerTestHelpClass.TestSerialize(customer);

            Assert.AreEqual(customer.Birthday, serializationResult.Birthday);
        }
        public void TestChainCvrser()
        {
            var person  = new Person();
            var persons = new List <Person>();

            persons.Add(person);
            var shop  = new Shop();
            var shops = new List <Shop>();

            shops.Add(shop);
            var chain = new Chain(5, "Rema", "3323232", "Img path", persons, shops);
            var serializationResult = SerializerTestHelpClass.TestSerialize(chain);

            Assert.AreEqual(chain.Cvr, serializationResult.Cvr);
        }