Example #1
0
        public DateTime Resolve(Product source, ProductDto destination, DateTime member, ResolutionContext context)
        {
            DateTime orderDate = (DateTime)context.Items[Constants.OrderDate];

            return(_shippingCalculatorfactory.GetShippingCalculator(source).Calculate(orderDate, source));
        }
        public void ShippingCalculatorFactory_ShouldReturnCorrectCalculator_GivenWeekendShippingProduct()
        {
            var weekendShippingCalculator = _shippingCalculatorfactory.GetShippingCalculator(_productWithWeekendShipping);

            weekendShippingCalculator.GetType().Should().Be(typeof(ShippingCalculator));
        }