email-tests

This commit is contained in:
Peter Hormanns 2012-01-02 14:13:43 +00:00
parent dab97ef176
commit ca1daa46a6
3 changed files with 24 additions and 24 deletions

View File

@ -61,12 +61,12 @@ public class DomainTest {
@Test
public void testUpdate() {
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> setParams = new HashMap<String, String>();
Map<String, String> whereParams = new HashMap<String, String>();
setParams.put("user", "peh00-phor");
whereParams.put("name", "smb-linn.de");
setParams.put("user", "aaa00");
whereParams.put("name", "example01.org");
Object[] params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
setParams, whereParams };
@ -83,7 +83,7 @@ public class DomainTest {
@Test
public void testCreate() {
int count = getDomsCount();
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> setParams = new HashMap<String, String>();
setParams.put("name", "f6n.de");
@ -103,7 +103,7 @@ public class DomainTest {
@Test
public void testDelete() {
int count = getDomsCount();
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>();
whereParams.put("name", "f6n.de");
@ -121,7 +121,7 @@ public class DomainTest {
private int getDomsCount() {
int count = 0;
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>();
Object[] params = new Object[] { user,

View File

@ -63,7 +63,7 @@ public class EMailAddressTest {
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>();
whereParams.put("domain", "herzensklaenge.de");
whereParams.put("domain", "example01.org");
Object[] params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
whereParams };
@ -125,11 +125,11 @@ public class EMailAddressTest {
@Test
public void testSearchAsDomAdmin() {
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>();
whereParams.put("domain", "herzensklaenge.de");
whereParams.put("admin", "peh00");
whereParams.put("domain", "example01.org");
whereParams.put("admin", "aaa00");
Object[] params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
whereParams };
@ -140,7 +140,7 @@ public class EMailAddressTest {
for (Object o : result) {
if (o instanceof Map<?, ?>) {
Map<?, ?> row = (Map<?, ?>) o;
assertEquals("peh00", row.get("admin"));
assertEquals("aaa00", row.get("admin"));
} else {
fail("map expected");
}
@ -153,12 +153,12 @@ public class EMailAddressTest {
@Test
public void testCreateAsPacAdminFails() {
int count = getObjectCount();
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> setParams = new HashMap<String, String>();
setParams.put("localpart", "f6n");
setParams.put("domain", "f6n.de");
setParams.put("target", "peh00-phor");
setParams.put("domain", "example01.org");
setParams.put("target", "aaa01");
Object[] params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
setParams };
@ -174,12 +174,12 @@ public class EMailAddressTest {
@Test
public void testCreateAndDelete() {
int count = getObjectCount();
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> setParams = new HashMap<String, String>();
setParams.put("localpart", "f6n");
setParams.put("domain", "jalin.de");
setParams.put("target", "peh00-phor");
setParams.put("domain", "example01.org");
setParams.put("target", "aaa00-admin");
Object[] params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
setParams };
@ -193,7 +193,7 @@ public class EMailAddressTest {
count = getObjectCount();
Map<String, Object> whereParams = new HashMap<String, Object>();
whereParams.put("localpart", "f6n");
whereParams.put("domain", "jalin.de");
whereParams.put("domain", "example01.org");
params = new Object[] { user,
cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
whereParams };
@ -229,7 +229,7 @@ public class EMailAddressTest {
private int getObjectCount() {
int count = -1;
try {
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>();
Object[] params = new Object[] { user,
@ -247,7 +247,7 @@ public class EMailAddressTest {
private int getTargetCount() {
int count = -1;
try {
String user = "peh00";
String user = "aaa00";
String grantingTicketURL = cas.getGrantingTicketURL(user);
Map<String, String> whereParams = new HashMap<String, String>();
whereParams.put("target", "peh00-phor");

View File

@ -12,10 +12,10 @@ import org.junit.runners.Suite;
PgsqlUserTest.class,
PgsqlDbTest.class,
PacTest.class,
UnixUserTest.class
// EMailAliasTest.class,
// DomainTest.class,
// EMailAddressTest.class,
UnixUserTest.class,
EMailAliasTest.class,
DomainTest.class,
EMailAddressTest.class
// CustomerTest.class,
// QueueTaskTest.class
})