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.User;
9 import org.cacert.gigi.testUtils.ManagedTest;
10 import org.junit.Test;
12 public class TestDomain extends ManagedTest {
14 User u = User.getById(createVerifiedUser("testuser", "testname", uniq + "@testdom.com", TEST_PASSWORD));
16 String session = login(uniq + "@testdom.com", TEST_PASSWORD);
18 public TestDomain() throws IOException {}
21 public void testAdd() throws IOException {
22 assertNull(addDomain(session, uniq + ".tld"));
23 assertNotNull(addDomain(session, uniq + ".tld"));
26 public static String addDomain(String session, String domain) throws IOException {
27 return executeBasicWebInteraction(session, DomainOverview.PATH, "adddomain&newdomain=" + URLEncoder.encode(domain, "UTF-8"), 1);