From 0b9397fc68a41b0338a20781c9357b6593c4043e Mon Sep 17 00:00:00 2001 From: Purodha Blissenbach Date: Wed, 18 Jul 2012 11:24:46 +0000 Subject: [PATCH] Test zugefuegt, dass eine ungueltige Domainoption as fehlerhaft erkannt wird. --- .../test/de/hsadmin/remote/DomainTest.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/hsarback/test/de/hsadmin/remote/DomainTest.java b/hsarback/test/de/hsadmin/remote/DomainTest.java index eaa2b97..e19ec77 100644 --- a/hsarback/test/de/hsadmin/remote/DomainTest.java +++ b/hsarback/test/de/hsadmin/remote/DomainTest.java @@ -80,7 +80,6 @@ public class DomainTest { } } - @Test public void testCreate() { int count = getDomsCount(); @@ -120,6 +119,26 @@ public class DomainTest { assertEquals(count - 1, getDomsCount()); } + @Test + public void testIvalidOption() { + String user = "aaa00"; + String grantingTicketURL = cas.getGrantingTicketURL(user); + Map setParams = new HashMap(); + Map whereParams = new HashMap(); + setParams.put("user", "aaa00"); + setParams.put("domainoptions", "invalide"); + whereParams.put("name", "example01.org"); + Object[] params = new Object[] { user, + cas.getServiceTicket(grantingTicketURL, RemoteTestHelper.getBackendURL()), + setParams, whereParams }; + try { + Object execute = client.execute(MODULE + ".update", params); + assertNotNull(execute); + fail("exception expected"); + } catch (XmlRpcException e) { + } + } + private int getDomsCount() { int count = 0; String user = "aaa00";