- @Test
- public void testDomain() throws InterruptedException, GigiApiException {
- assertEquals(0, us.getDomains().length);
- Domain d = new Domain(us, "v1.example.org");
- assertEquals(0, d.getId());
- d.insert();
- Domain[] domains = us.getDomains();
- assertEquals(1, domains.length);
- assertEquals("v1.example.org", domains[0].getSuffix());
- assertEquals(domains[0].getOwner().getId(), us.getId());
- assertNotEquals(0, domains[0].getId());
- assertNotEquals(0, d.getId());
- assertEquals(d.getId(), domains[0].getId());
+ public TestDomain() {
+ int uid = createVerifiedUser("fn", "ln", createUniqueName() + "pr@test-email.de", TEST_PASSWORD);
+ us = User.getById(uid);
+ }