public void Is_invalid_when_item_status_is_shipped() { var item = new OrderItem(); item.OrderStatusID = OrderStatusConstants.SHIPPED_STATUS; var rule = new ValidOrderItemStatusForDeleteRule(item); rule.Validate().IsValid.ShouldBe(false); rule.ErrorMessage.ShouldNotBe(null); }
public void Is_valid_when_item_status_is_not_shipped() { var item = new OrderItem(); item.OrderStatusID = OrderStatusConstants.PENDING_STATUS; var rule = new ValidOrderItemStatusForDeleteRule(item); rule.Validate().IsValid.ShouldBe(true); rule.ErrorMessage.ShouldBe(null); }