+ testFailedForm("fname=a&lname=b" + createBase() + "&day=1&month=1&year=1910&tos_agree=a");
+ }
+
+ @Test
+ public void testTooYoung() throws IOException {
+ Calendar c = GregorianCalendar.getInstance();
+ c.add(Calendar.YEAR, -User.MINIMUM_AGE + 2);
+ testFailedForm("fname=a&lname=b&email=" + createUniqueName() + "@email.de" + p + "&day=" + c.get(Calendar.DAY_OF_MONTH) + "&month=" + (c.get(Calendar.MONTH) + 1) + "&year=" + c.get(Calendar.YEAR) + "&tos_agree=1");
+ }
+
+ @Test
+ public void testTooOld() throws IOException {
+ Calendar c = GregorianCalendar.getInstance();
+ c.add(Calendar.YEAR, -User.MAXIMUM_PLAUSIBLE_AGE);
+ c.add(Calendar.DAY_OF_MONTH, -1);
+ testFailedForm("fname=a&lname=b&email=" + createUniqueName() + "@email.de" + p + "&day=" + c.get(Calendar.DAY_OF_MONTH) + "&month=" + (c.get(Calendar.MONTH) + 1) + "&year=" + c.get(Calendar.YEAR) + "&tos_agree=1");