]> WPIA git - gigi.git/blob - tests/org/cacert/gigi/pages/account/TestDomain.java
UPD: clean up/document/beatufy testcases.
[gigi.git] / tests / org / cacert / gigi / pages / account / TestDomain.java
1 package org.cacert.gigi.pages.account;
2
3 import static org.junit.Assert.*;
4
5 import java.io.IOException;
6 import java.net.URLEncoder;
7
8 import org.cacert.gigi.pages.account.domain.DomainOverview;
9 import org.cacert.gigi.testUtils.ClientTest;
10 import org.junit.Test;
11
12 public class TestDomain extends ClientTest {
13
14     public TestDomain() throws IOException {}
15
16     @Test
17     public void testAdd() throws IOException {
18         assertNull(addDomain(cookie, uniq + ".de"));
19         assertNotNull(addDomain(cookie, uniq + ".de"));
20     }
21
22     public static String addDomain(String session, String domain) throws IOException {
23         return executeBasicWebInteraction(session, DomainOverview.PATH, "adddomain&newdomain=" + URLEncoder.encode(domain, "UTF-8"), 1);
24     }
25 }