boolean allIsWell = true;
Result result = getInitializedResult();
boolean found = false;
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
Class ejbClass = loadEjbClass(descriptor, result);
if (ejbClass!=null) {
Method[] methods = ejbClass.getDeclaredMethods();
if (methods != null) {
for (int i=0;i<methods.length;i++) {
String methodName = methods[i].getName();
if (methodName.startsWith("ejbSelect")) {
found = true;
if (!runIndividualSelectTest(methods[i], (EjbCMPEntityDescriptor) descriptor, result))
allIsWell=false;
}
}
if (found == false) {
result.addNaDetails(smh.getLocalString
("tests.componentNameConstructor",
"For [ {0} ]",
new Object[] {compName.toString()}));
result.notApplicable(smh.getLocalString
("com.sun.enterprise.tools.verifier.tests.ejb.entity.cmp2.SelectMethodTest.nptApplicable",
"Not Applicable : No select methods found",
new Object[] {}));
}
if (result.getStatus() != Result.NOT_APPLICABLE) {
if (allIsWell)
result.setStatus(Result.PASSED);
else
result.setStatus(Result.FAILED);
}
}
}
return result;