Пример #1
0
        public void GivenAParcelOfDefinedDimensions_WhenCreateParcel_ThenCorrectCostIsReturned(uint width, uint height,
                                                                                               uint length, decimal expectedCost, ParcelType expectedParcelType)
        {
            var parcelService = new ParcelService(Settings());
            var parcel        = parcelService.CreateParcel(width, height, length, 1);

            parcel.Type.ShouldBe(expectedParcelType);
            parcel.TotalCost.ShouldBe(expectedCost);
        }
Пример #2
0
        public void GivenAParcelOf1CMDimensions_WhenCreateParcel_ThenCorrectCostIsReturned()
        {
            var expectedCost  = 3m;
            var parcelService = new ParcelService(Settings());
            var parcel        = parcelService.CreateParcel(1, 1, 1, 1);

            parcel.Type.ShouldBe(ParcelType.Small);
            parcel.TotalCost.ShouldBe(expectedCost);
        }