public static final int ADULT_AGE = 18;
+ public static final boolean POJAM_ENABLED = false;
+
protected User(GigiResultSet rs) {
super(rs.getInt("id"));
updateName(rs);
}
public boolean canAssure() {
- if ( !CalendarUtil.isOfAge(dob, POJAM_AGE)) { // PoJAM
- return false;
+ if (POJAM_ENABLED) {
+ if ( !CalendarUtil.isOfAge(dob, POJAM_AGE)) { // PoJAM
+ return false;
+ }
+ } else {
+ if ( !CalendarUtil.isOfAge(dob, ADULT_AGE)) {
+ return false;
+ }
}
if (getAssurancePoints() < 100) {
return false;
* @return the maximal points @
*/
public int getMaxAssurePoints() {
- if ( !CalendarUtil.isOfAge(dob, ADULT_AGE)) {
+ if ( !CalendarUtil.isOfAge(dob, ADULT_AGE) && POJAM_ENABLED) {
return 10; // PoJAM
}
for (int i = 0; i < users.length; i++) {
assuranceFail(assurer, users[i], -1, "test-notary", "2014-01-01");
assuranceFail(assurer, users[i], 11, "test-notary", "2014-01-01");
- Notary.assure(assurer, users[i], users[i].getName(), users[i].getDoB(), 10, "test-notary", "2014-01-01", AssuranceType.FACE_TO_FACE);
+ if (User.POJAM_ENABLED) {
+ Notary.assure(assurer, users[i], users[i].getName(), users[i].getDoB(), 10, "test-notary", "2014-01-01", AssuranceType.FACE_TO_FACE);
+ }
assuranceFail(assurer, users[i], 10, "test-notary", "2014-01-01");
}
}