public void Is_invalid_when_item_price_does_not_equal_product_price()
 {
     var orderItem = new OrderItem() { Price = 10 };
     var product = new Product { Price = 11 };
     var rule = new OrderItemPriceValidityRule(orderItem, product);
     rule.Validate().IsValid.ShouldBe(false);
     rule.ErrorMessage.ShouldNotBe(null);
 }
 public void Is_valid_when_item_price_equals_product_price()
 {
     var orderItem = new OrderItem() { Price = 10 };
     var product = new Product { Price = 10 };
     var rule = new OrderItemPriceValidityRule(orderItem, product);
     rule.Validate().IsValid.ShouldBe(true);
     rule.ErrorMessage.ShouldBe(null);
 }
        public void Is_invalid_when_item_price_does_not_equal_product_price()
        {
            var orderItem = new OrderItem()
            {
                Price = 10
            };
            var product = new Product {
                Price = 11
            };
            var rule = new OrderItemPriceValidityRule(orderItem, product);

            rule.Validate().IsValid.ShouldBe(false);
            rule.ErrorMessage.ShouldNotBe(null);
        }
        public void Is_valid_when_item_price_equals_product_price()
        {
            var orderItem = new OrderItem()
            {
                Price = 10
            };
            var product = new Product {
                Price = 10
            };
            var rule = new OrderItemPriceValidityRule(orderItem, product);

            rule.Validate().IsValid.ShouldBe(true);
            rule.ErrorMessage.ShouldBe(null);
        }