public void Init() { _integerSequenceGenerator=Substitute.For<IIntegerSequenceGenerator>(); _cargoBookings = new CargoBookings(_integerSequenceGenerator, _bookingRepository, _console); _vesselA = new Vessel.Vessel(new CubicFeet(900)); _smallCargo = new Cargo.Cargo(new CubicFeet(200)); _bigCargo = new Cargo.Cargo(new CubicFeet(1200)); }
public void BookACargo() { var cargo = new Cargo.Cargo(new CubicFeet(400)); var vessel = new Vessel.Vessel(new CubicFeet(200)); var confirmationNumber = new ConfirmationNumber(1); var booking = new Booking(cargo, vessel, confirmationNumber); _cargoRepository.Add(booking); Assert.That(_cargoRepository.Count(), Is.EqualTo(1)); Assert.That(_cargoRepository.FindByConfirmationNumber(confirmationNumber), Is.EqualTo(booking)); }
public void GivenAVesselCapacityIsCubicFeet(int capacity) { _vessel = new Vessel.Vessel(new CubicFeet(capacity)); }
public Booking(Cargo.Cargo cargo, Vessel.Vessel vessel, ConfirmationNumber confirmationNumber) { _cargo = cargo; _vessel = vessel; _confirmationNumber = confirmationNumber; }
public void Init() { _vessel = new Vessel.Vessel(new CubicFeet(900)); _smallCargo = new Cargo.Cargo(new CubicFeet(200)); _bigCargo = new Cargo.Cargo(new CubicFeet(1200)); }