public void SendVehicleToMethod_ShouldReturnCorrectOutput()
        {
            storageMaster.RegisterStorage("Warehouse", "Warehouse");
            storageMaster.RegisterStorage("AutomatedWarehouse", "Automated Warehouse");

            var actualOutput   = storageMaster.SendVehicleTo("Warehouse", 0, "Automated Warehouse");
            var expectedOutput = "Sent Semi to Automated Warehouse (slot 1)";

            Assert.AreEqual(expectedOutput, actualOutput, "Returned output mismatch!");
        }
Exemple #2
0
        public void TestIsSendVehicleToMethodWorksCorrect()
        {
            storageMaster.RegisterStorage(ValidStorageType, StorageName);
            storageMaster.RegisterStorage(DestinationStorage, DestinationStorageName);

            var result         = storageMaster.SendVehicleTo(StorageName, ValidGarageSlot, DestinationStorageName);
            var expectedResult = $"Sent Semi to {DestinationStorageName} (slot {DestinationSlot})";

            Assert.AreEqual(expectedResult, result, "Load vehicle should work correct.");
        }
 public void SendVehicleToShouldThrowsExceptionWhenStoragesDoNotExists()
 {
     Assert.Throws <InvalidOperationException>(() => storageMaster.SendVehicleTo(storageName, 0, "Atanas"));
     Assert.Throws <InvalidOperationException>(() => storageMaster.SendVehicleTo("Atanas", 0, storageName));
 }