Example #1
0
        public void SetSail(int hh)
        {
            var shipToDepart = new Ship {
                Port = Port.AT_SEA
            };
            var ev = new DepartureEvent(DateTime.Now, shipToDepart, port);

            ev.Process();
        }
        public void DepartureShipEventSuccess()
        {
            var p = new Port()
            {
                Name = "port name", IntlCode = "intl code of port"
            };
            var s = new Ship("id", "ship name", "ship reg code", p);

            var @event = new DepartureEvent(DateTime.Now, "id", new TestEntityRef <Ship>("id", s), p);

            @event.Process();

            Assert.Equal("ship name", s.Name);
            Assert.Equal("ship reg code", s.RegistrationCode);
            Assert.NotNull(s.Location);
            Assert.Equal(Port.AT_SEA.IntlCode, s.Location.IntlCode);
        }