public void TestShipArrives() { Port.Model.Port port1 = new Port.Model.Port("Port1", 1000); Port.Model.Port port2 = new Port.Model.Port("Port2", 2000); Ship ship = new Ship("Ship", port1); port2.ShipArrives(ship); Assert.IsTrue(port2.InPort.Contains(ship)); }
public void Send() { if (Ready()) { Port.ShipDepartures(this); Route.SetDeparture(Port); Port = Route.Arrival; Route.Cost(Fuel); Port.ShipArrives(this); } else { throw new InvalidOperationException("Корабль не готов к отплытию!"); } }