HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-01-02 ca1daa46a63fcb3edc1d1290763994cb2eaa546b
email-tests
3 files modified
48 ■■■■ changed files
hsarback/test/de/hsadmin/remote/DomainTest.java 12 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/EMailAddressTest.java 28 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/RemoteTest.java 8 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/DomainTest.java
@@ -61,12 +61,12 @@
    @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 @@
    @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 @@
    @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 @@
    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, 
hsarback/test/de/hsadmin/remote/EMailAddressTest.java
@@ -63,7 +63,7 @@
        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 @@
    @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 @@
            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 @@
    @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 @@
    @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 @@
        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 @@
    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 @@
    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");
hsarback/test/de/hsadmin/remote/RemoteTest.java
@@ -12,10 +12,10 @@
    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
})