1 package org.cacert.gigi.pages.account;
3 import static org.junit.Assert.*;
5 import java.io.IOException;
6 import java.net.URLEncoder;
8 import org.cacert.gigi.pages.account.domain.DomainOverview;
9 import org.cacert.gigi.testUtils.ClientTest;
10 import org.junit.Test;
12 public class TestDomain extends ClientTest {
14 public TestDomain() throws IOException {}
17 public void testAdd() throws IOException {
18 assertNull(addDomain(cookie, uniq + ".de"));
19 assertNotNull(addDomain(cookie, uniq + ".de"));
23 public void testInvalid() throws IOException {
24 assertNotNull(addDomain(cookie, uniq + ".invalid"));
28 public void testHighFinancialValue() throws IOException {
29 assertNotNull(addDomain(cookie, "google.com"));
32 public static String addDomain(String session, String domain) throws IOException {
33 return executeBasicWebInteraction(session, DomainOverview.PATH, "adddomain&newdomain=" + URLEncoder.encode(domain, "UTF-8"), 1);