- openConnection = u.openConnection();
- openConnection.setRequestProperty("Cookie", cookie);
- openConnection.setDoOutput(true);
- openConnection.getOutputStream().write(content.getBytes());
- openConnection.getHeaderField("Location");
-
- String newcontent = IOUtils.readURL(cookie(u.openConnection(), cookie));
- Pattern dlink = Pattern.compile(DomainOverview.PATH + "([0-9]+)'>");
- Matcher m1 = dlink.matcher(newcontent);
- m1.find();
- URL u2 = new URL(u.toString() + m1.group(1));
-
- TestMail mail = getMailReciever().recieve();
- String link = mail.extractLink();
- new URL(link).openConnection().getHeaderField("");
-
- PreparedStatement ps = DatabaseConnection.getInstance().prepare("SELECT COUNT(*) FROM domainPinglog");
- while (true) {
- ResultSet rs = ps.executeQuery();
- rs.next();
- if (rs.getInt(1) >= 2) {
- break;
- }
- Thread.sleep(200);
+ URL u2 = sendDomainForm(u, content);
+
+ TestMail mail = getMailReciever().receive();
+ if (emailVariant == 0) {
+ mail.verify();