public override IReadOnlyCollection <String> Validate(ExportShipment command) { if (command.InventoryIdentity == Guid.Empty) { ErrorMessages.Add("The identity of inventory is required."); } return(ErrorMessages.AsReadOnly()); }
public override IReadOnlyCollection <String> Validate(RegisterSupplier command) { if (command.MaximumWeight <= 0) { ErrorMessages.Add("The supplier's limit weight must be positive number."); } return(ErrorMessages.AsReadOnly()); }
public override IReadOnlyCollection <String> Validate(RegisterInventory command) { if (command.Height <= 0.0D) { ErrorMessages.Add("The height of the inventory must be positive number."); } if (command.Width <= 0.0D) { ErrorMessages.Add("The width of the inventory must be positive number."); } return(ErrorMessages.AsReadOnly()); }
public override IReadOnlyCollection <String> Validate(DeliverContainer command) { if (command.SupplierIdentity == Guid.Empty) { ErrorMessages.Add("The identity of supplier is required."); } if (command.ContainerIdentity == Guid.Empty) { ErrorMessages.Add("The identity of container is required."); } return(ErrorMessages.AsReadOnly()); }
public override IReadOnlyCollection <String> Validate(AcceptContainer command) { if (command.InventoryIdentity == Guid.Empty) { ErrorMessages.Add("The identity of inventory is required."); } if (command.Height <= 0.0D) { ErrorMessages.Add("Container's height must be positive number."); } if (command.Width <= 0.0D) { ErrorMessages.Add("Container's width must be positive number."); } if (command.Weight <= 0.0D) { ErrorMessages.Add("Container's limit weight must be positive number."); } return(ErrorMessages.AsReadOnly()); }
public override IReadOnlyCollection <String> Validate(DispatchContainer command) { if (command.ContainerIdentity == Guid.Empty) { ErrorMessages.Add("The identity of container is required."); } if (command.ShipmentIdentity == Guid.Empty) { ErrorMessages.Add("The identity of shipment is required."); } if (command.SupplierIdentity == Guid.Empty) { ErrorMessages.Add("The identity of supplier is required."); } if (command.Price <= 0.0M) { ErrorMessages.Add("The price for the transportation must be positive number."); } return(ErrorMessages.AsReadOnly()); }
public override IReadOnlyCollection <String> Validate(BoxCargo command) { if (command.InventoryIdentity == Guid.Empty) { ErrorMessages.Add("The identity of inventory is required."); } if (command.ContainerIdentity == Guid.Empty) { ErrorMessages.Add("The identity of container is required."); } if (command.Price <= 0.0M) { ErrorMessages.Add("Cargo's price must be positive number."); } if (command.Weight <= 0.0D) { ErrorMessages.Add("Cargo's weight must be positive number."); } return(ErrorMessages.AsReadOnly()); }