added ParameterizedTest for offer validator

This commit is contained in:
Alexander Maier
2023-06-27 18:32:15 +02:00
parent 0eb0f903c6
commit 7056d34688
2 changed files with 26 additions and 1 deletions

View File

@@ -28,6 +28,9 @@ public final class OfferValidator {
if (offer.getOfferId().equals("")) {
throw new InvalidOfferException("Offer ID cannot be empty");
}
if (offer.getLastUpdate().equals("")) {
throw new InvalidOfferException("LastUpdate cannot be empty");
}
} catch (NullPointerException e) {
throw new InvalidOfferException("Required information is missing in the offer", e);
}