// Test Methods ------------------------------------------------------------
protected TestResult checkEnumerationContainsNames(
PortletContext context) {
TestResult result = new TestResult();
result.setDescription("Ensure that the expected init parameter name "
+ "exists in the portlet context's init parameters.");
result.setSpecPLT("10.3.1");
boolean found = false;
for (Enumeration en = context.getInitParameterNames();
!found && en.hasMoreElements(); ) {
String name = (String) en.nextElement();
if (TEST_PARAM_NAME.equals(name)) {
found = true;
}
}
if (found) {
result.setReturnCode(TestResult.PASSED);
} else {
result.setReturnCode(TestResult.FAILED);
result.setResultMessage("Expected init parameter '"
+ TEST_PARAM_NAME + "' not found in portlet context.");
}
return result;
}