S++Core systems, human-reviewable
DEMO SOURCE · SPP / APP / PHYRead the book

petshop-05-checks.spp

petshop/cart/petshop-05-checks.spp

Download original file · Petstore source contents

1domain petshop;23atomic check checkCartAdditionAgreementInput(CartAdditionAgreement) {4    require(5        cartAdditionAgreement.quantity != null && cartAdditionAgreement.quantity > 0,6        RejectionCode.INVALID_QUANTITY7    );8}910atomic check checkCartQuantityAgreementInput(CartQuantityAgreement) {11    require(12        cartQuantityAgreement.quantity != null && cartQuantityAgreement.quantity > 0,13        RejectionCode.INVALID_QUANTITY14    );15}