- public void testEmailAndDNS() throws IOException, InterruptedException, SQLException, NamingException {
- String email = createUniqueName() + "@example.org";
- int uid = createVerifiedUser("a", "b", email, TEST_PASSWORD);
- String cookie = login(email, TEST_PASSWORD);
+ public void emailAndDNSSuccess() throws IOException, InterruptedException, SQLException, NamingException {
+ testEmailAndDNS(0, 0, true, true);
+ }
+
+ @Test
+ public void dnsFail() throws IOException, InterruptedException, SQLException, NamingException {
+ testEmailAndDNS(1, 0, false, true);
+ }
+
+ @Test
+ public void dnsContentFail() throws IOException, InterruptedException, SQLException, NamingException {
+ testEmailAndDNS(2, 0, false, true);
+ }
+
+ @Test
+ public void emailFail() throws IOException, InterruptedException, SQLException, NamingException {
+ testEmailAndDNS(0, 1, true, false);
+ }
+
+ @Test
+ public void emailAndDNSFail() throws IOException, InterruptedException, SQLException, NamingException {
+ testEmailAndDNS(2, 1, false, false);
+ }
+
+ public void testEmailAndDNS(int dnsVariant, int emailVariant, boolean successDNS, boolean successMail) throws IOException, InterruptedException, SQLException, NamingException {