]> WPIA git - gigi.git/blob - tests/org/cacert/gigi/pages/account/TestDomain.java
add: high financial value assessment
[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     @Test
23     public void testInvalid() throws IOException {
24         assertNotNull(addDomain(cookie, uniq + ".invalid"));
25     }
26
27     @Test
28     public void testHighFinancialValue() throws IOException {
29         assertNotNull(addDomain(cookie, "google.com"));
30     }
31
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);
34     }
35 }