Exemple #1
0
        public void CalculateParcleBySizeTestForMediumParcel()
        {
            //Arrange
            var parcel = new Parcel()
            {
                Height = 10,
                Length = 30,
                Width  = 40
            };
            //Act
            var costCalculation = new DeliveryCostsCalculation();
            var targetParcel    = costCalculation.CalculateDeliveryCostByParcelSize(parcel);

            //Assert
            Assert.AreEqual(8, targetParcel.Cost);
        }
Exemple #2
0
        public void CalculateParcleBySizeTestForSmallParcel()
        {
            //Arrange
            var parcel = new Parcel()
            {
                Height = 6,
                Length = 7,
                Width  = 9
            };

            //Act
            var cost         = new DeliveryCostsCalculation();
            var targetParcel = cost.CalculateDeliveryCostByParcelSize(parcel);

            //Assert
            Assert.AreEqual(3, targetParcel.Cost);
        }