Example #1
0
        public void ValidateLoadVehicleIE()
        {
            StorageMaster storageMaster = new StorageMaster();

            storageMaster.RegisterStorage("Warehouse", "Pepi");
            storageMaster.SelectVehicle("Pepi", 0);
            var temp = (new string[] { "Ram" });

            Assert.Throws <InvalidOperationException>(() => storageMaster.LoadVehicle(temp));
        }
        public void TestLoadVehicleWithIOE()
        {
            StorageMaster master = new StorageMaster();

            master.RegisterStorage("Warehouse", "Pesho");
            master.SelectVehicle("Pesho", 0);
            string[] products = new string[] { "Gpu" };

            Assert.Throws <InvalidOperationException>(() => master.LoadVehicle(products));
        }
Example #3
0
        public void ValidateLoadVehicle()
        {
            StorageMaster storageMaster = new StorageMaster();

            storageMaster.RegisterStorage("Warehouse", "Pepi");
            storageMaster.SelectVehicle("Pepi", 0);
            storageMaster.AddProduct("Ram", 0.2);
            var temp = storageMaster.LoadVehicle(new string[] { "Ram" });

            Assert.That(temp, Is.EqualTo("Loaded 1/1 products into Semi"));
        }
        public void TestLoadVehicle()
        {
            StorageMaster master = new StorageMaster();

            master.RegisterStorage("Warehouse", "Pesho");
            master.SelectVehicle("Pesho", 0);
            master.AddProduct("Gpu", 5);
            string[] products = new string[] { "Gpu" };

            Assert.AreEqual("Loaded 1/1 products into Semi", master.LoadVehicle(products));
        }