Test zugefuegt, dass eine ungueltige Domainoption as fehlerhaft erkannt wird.
This commit is contained in:
parent
ad6f20025c
commit
0b9397fc68
@ -80,7 +80,6 @@ public class DomainTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCreate() {
|
public void testCreate() {
|
||||||
int count = getDomsCount();
|
int count = getDomsCount();
|
||||||
@ -120,6 +119,26 @@ public class DomainTest {
|
|||||||
assertEquals(count - 1, getDomsCount());
|
assertEquals(count - 1, getDomsCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testIvalidOption() {
|
||||||
|
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", "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() {
|
private int getDomsCount() {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
String user = "aaa00";
|
String user = "aaa00";
|
||||||
|
Loading…
Reference in New Issue
Block a user