コード例 #1
0
        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);
        }
コード例 #2
0
        public void Should_NotBeAbleToDock_ANullBike()
        {
            var dockingStation = new DockingStation(1);

            Assert.Throws <Exception>(() => dockingStation.Dock(null, 0));
        }
コード例 #3
0
        public void Should_OnlyRealeaseBike_IfOneExistsInDockingStation()
        {
            var dockingStation = new DockingStation(0);

            Assert.Throws <Exception>(() => dockingStation.ReleaseBike(1));
        }
コード例 #4
0
ファイル: Van.cs プロジェクト: Kaymo1990/BorisBikesCSharp
 public void ReDockRepairedBike(DockingStation dockingStation)
 {
     dockingStation.DockBike(bikeDock[bikeDock.Count - 1]);
     bikeDock.RemoveAt(bikeDock.Count - 1);
 }