Example #1
0
        public void Should_Return_Package_With_Two_Cargos()
        {
            var truck = TruckHelper.GetTestTruck();

            _managerMock.Setup(x => x.GetPrioritisedCargos(truck.Volume, truck.Payload))
            .Returns(CargoHelper.GetBigVolumeList);
            _configurationMock.Setup(c => c.FillThreshold).Returns(10);
            _configurationMock.Setup(c => c.Strategy).Returns(OptimizationStrategy.Volume);

            var pack = _service.LoadTruck(truck);

            Assert.AreEqual(2, pack.Cargos.Count);
        }