Exemplo n.º 1
0
        public void ValidateGetStorageStatus()
        {
            StorageMaster storage = new StorageMaster();
            var           name    = "Pepi";

            storage.RegisterStorage("Warehouse", name);
            var temp          = storage.GetStorageStatus(name);
            var expectedValue =
                "Stock (0/10): []\r\nGarage: [Semi|Semi|Semi|empty|empty|empty|empty|empty|empty|empty]";

            Assert.That(temp, Is.EqualTo(expectedValue));
        }
Exemplo n.º 2
0
        public void StorageMasterGetStorageStatusTesetReturnsTheCorrectValue()
        {
            this.storageMaster.AddProduct("Ram", 123);
            this.storageMaster.AddProduct("HardDrive", 120);
            this.storageMaster.AddProduct("Gpu", 125);
            this.storageMaster.AddProduct("SolidStateDrive", 200);
            this.storageMaster.RegisterStorage("Warehouse", "SmartSolutions");
            this.storageMaster.SelectVehicle("SmartSolutions", 2);
            List <string> products = new List <string>()
            {
                "Ram", "HardDrive", "Gpu", "SolidStateDrive"
            };

            this.storageMaster.LoadVehicle(products);
            this.storageMaster.UnloadVehicle("SmartSolutions", 2);

            var result = storageMaster.GetStorageStatus("SmartSolutions");

            Assert.AreEqual(result, "Stock (2/10): [Gpu (1), HardDrive (1), Ram (1), SolidStateDrive (1)]\r\nGarage: [Semi|Semi|Semi|empty|empty|empty|empty|empty|empty|empty]", "Doesnt return the correct status.");
        }
        public void TestGetStorageStatus()
        {
            StorageMaster master = new StorageMaster();

            master.RegisterStorage("Warehouse", "Pesho");

            Assert.AreEqual("Stock (0/10): []\r\nGarage: [Semi|Semi|Semi|empty|empty|empty|empty|empty|empty|empty]", master.GetStorageStatus("Pesho"));
        }