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

View File

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

View File

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