Merge remote-tracking branch 'origin/#70-test-cases' into #75-Transactions
This commit is contained in:
@@ -28,4 +28,6 @@ public class OfferDTO {
|
||||
* Date of last update of the offer.
|
||||
*/
|
||||
private String lastUpdate;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user