Inheritance: Peasy.Core.RuleBase
 public void Is_invalid_when_an_order_item_is_shipped()
 {
     var item = new OrderItem();
     item.OrderStatusID = OrderStatusConstants.SHIPPED_STATUS;
     var rule = new CanSubmitOrderItemRule(item);
     rule.Validate().IsValid.ShouldBe(false);
     rule.ErrorMessage.ShouldNotBe(null);
 }
 public void Is_invalid_when_an_order_item_is_pending()
 {
     var item = new OrderItem();
     item.OrderStatusID = OrderStatusConstants.PENDING_STATUS;
     var rule = new CanSubmitOrderItemRule(item);
     rule.Validate().IsValid.ShouldBe(true);
     rule.ErrorMessage.ShouldBe(null);
 }
 public async Task Is_valid_when_an_order_item_is_pending_async()
 {
     var item = new OrderItem();
     item.OrderStatusID = OrderStatusConstants.PENDING_STATUS;
     var rule = new CanSubmitOrderItemRule(item);
     await rule.ValidateAsync();
     rule.IsValid.ShouldBe(true);
     rule.ErrorMessage.ShouldBe(null);
 }
 public async Task Is_invalid_when_an_order_item_is_submitted_async()
 {
     var item = new OrderItem();
     item.OrderStatusID = OrderStatusConstants.SUBMITTED_STATUS;
     var rule = new CanSubmitOrderItemRule(item);
     await rule.ValidateAsync();
     rule.IsValid.ShouldBe(false);
     rule.ErrorMessage.ShouldNotBe(null);
 }