public void Should_BeAbleTo_RepairBike() { var maintenance = new Maintenance(); var dockingStation = new DockingStation(2); var bike = new Bike(); dockingStation.Dock(bike, 1); dockingStation.ReportBroken(1); maintenance.Repair(bike); Assert.That(bike.Working, Is.True); }
public void Should_NotBeAbleToDock_ANullBike() { var dockingStation = new DockingStation(1); Assert.Throws <Exception>(() => dockingStation.Dock(null, 0)); }
public void Should_OnlyRealeaseBike_IfOneExistsInDockingStation() { var dockingStation = new DockingStation(0); Assert.Throws <Exception>(() => dockingStation.ReleaseBike(1)); }
public void ReDockRepairedBike(DockingStation dockingStation) { dockingStation.DockBike(bikeDock[bikeDock.Count - 1]); bikeDock.RemoveAt(bikeDock.Count - 1); }