HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-01-02 fe6d4075239ef9946cd972933b7d30e70311004f
email-tests
2 files modified
29 ■■■■ changed files
hsarback/test/de/hsadmin/remote/EMailAddressTest.java 12 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/EMailAliasTest.java 17 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/EMailAddressTest.java
@@ -44,7 +44,7 @@
        try {
            Object execute = client.execute(MODULE + ".search", params);
            Object[] result = (Object[]) execute;
            assertEquals(242, result.length);
            assertEquals(6, result.length);
            for (Object o : result) {
                if (o instanceof Map<?, ?>) {
                    Map<?, ?> row = (Map<?, ?>) o;
@@ -92,8 +92,8 @@
        Map<String, String> setParams = new HashMap<String, String>();
        Map<String, String> whereParams = new HashMap<String, String>();
        setParams.put("target", "aaa00-test2");
        whereParams.put("domain", "jalin.de");
        whereParams.put("localpart", "fax");
        whereParams.put("domain", "example01.org");
        whereParams.put("localpart", "webmaster");
        Object[] params = new Object[] { user, 
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
                setParams, whereParams };
@@ -107,9 +107,9 @@
        assertEquals(count + 1, getTargetCount());
        setParams = new HashMap<String, String>();
        whereParams = new HashMap<String, String>();
        setParams.put("target", "aaa00-test2");
        whereParams.put("domain", "jalin.de");
        whereParams.put("localpart", "fax");
        setParams.put("target", "aaa00-admin");
        whereParams.put("domain", "example01.org");
        whereParams.put("localpart", "webmaster");
        params = new Object[] { user, 
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
                setParams, whereParams };
hsarback/test/de/hsadmin/remote/EMailAliasTest.java
@@ -35,14 +35,27 @@
    public void testSearchAllAsPacAdmin() {
        String user = "aaa00";
        String grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> whereParams = new HashMap<String, String>();
        Map<String, String> setParams = new HashMap<String, String>();
        setParams.put("name", "aaa00-alias");
        setParams.put("target", "aaa00-admin");
        Object[] params = new Object[] { user, 
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()),
                setParams };
        try {
            client.execute(MODULE + ".add", params);
        } catch (XmlRpcException e) {
            fail(e.getMessage());
        }
        user = "aaa00";
        grantingTicketURL = cas.getGrantingTicketURL(user);
        Map<String, String> whereParams = new HashMap<String, String>();
        params = new Object[] { user,
                cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), 
                whereParams };
        try {
            Object execute = client.execute(MODULE + ".search", params);
            Object[] result = (Object[]) execute;
            assertEquals(3, result.length);
            assertEquals(1, result.length);
            for (Object o : result) {
                if (o instanceof Map<?, ?>) {
                    Map<?, ?> row = (Map<?, ?>) o;