public void TestSemiUnLoadProductThrowsExceptionWhenEmpty() { Vehicle semi = new Semi(); Product hardDrive = new HardDrive(120); semi.LoadProduct(new Gpu(100)); semi.Unload(); Assert.Throws <InvalidOperationException>(() => semi.Unload(), "Empty Semi still unloads products."); }
public void TestUnloadProduct() { Vehicle vehicle = new Semi(); vehicle.LoadProduct(new Gpu(5)); vehicle.Unload(); Assert.AreEqual(0, vehicle.Trunk.Count); }
public void TestSemiUnLoadProductUnloadsTheCorretItem() { Vehicle semi = new Semi(); Product hardDrive = new HardDrive(120); semi.LoadProduct(new Gpu(100)); semi.LoadProduct(hardDrive); Assert.AreEqual(semi.Unload(), hardDrive); }