search NullPoiner

This commit is contained in:
Peter Hormanns 2012-07-18 12:51:07 +00:00
parent ada56e9f18
commit 4ec71554a0

View File

@ -221,7 +221,12 @@ public class DomainTest {
try {
Object execute = client.execute(MODULE + ".search", params);
Object[] result = (Object[]) execute;
count = ((List<?>)((Map<String, ?>) result[0]).get("domainsoptions")).size();
assertEquals(result.length, 1);
Map<String, ?> domainMap = (Map<String, ?>) result[0];
assertNotNull(domainMap);
List<?> optsList = (List<?>)domainMap.get("domainsoptions");
assertNotNull(optsList);
count = optsList.size();
} catch (XmlRpcException e) {
fail(e.getMessage());
}