Пример #1
0
        public void TestShipDepartures()
        {
            Port.Model.Port port = new Port.Model.Port("Port", 1000);
            Ship            ship = new Ship("Ship", port);

            port.ShipDepartures(ship);
            Assert.IsFalse(port.InPort.Contains(ship));
        }
Пример #2
0
 public void Send()
 {
     if (Ready())
     {
         Port.ShipDepartures(this);
         Route.SetDeparture(Port);
         Port = Route.Arrival;
         Route.Cost(Fuel);
         Port.ShipArrives(this);
     }
     else
     {
         throw new InvalidOperationException("Корабль не готов к отплытию!");
     }
 }