FileDocCategorySizeDatePackage
FindMethodException.javaAPI DocGlassfish v2 API3976Fri May 04 22:33:40 BST 2007com.sun.enterprise.tools.verifier.tests.ejb.entity.cmp2

FindMethodException

public class FindMethodException extends QueryMethodTest
All finder methods should throw the javax.ejb.FinderException
author
Jerome Dochez
version

Fields Summary
Constructors Summary
Methods Summary
protected booleanrunIndividualQueryTest(java.lang.reflect.Method method, EjbCMPEntityDescriptor descriptor, java.lang.Class targetClass, com.sun.enterprise.tools.verifier.Result result)

Run an individual test against a finder method (single or multi)

param
method is the finder method reference
param
descriptor is the entity bean descriptor
param
targetClass is the class to apply to tests to
param
result is where to place the result
return
true if the test passes

	ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();    
        if (methodThrowException(method, "javax.ejb.FinderException")) {
	    result.addGoodDetails(smh.getLocalString
				       ("tests.componentNameConstructor",
					"For [ {0} ]",
					new Object[] {compName.toString()}));
            result.addGoodDetails(smh.getLocalString
		("com.sun.enterprise.tools.verifier.tests.ejb.entity.cmp2.FindMethodException.passed",
                "[ {0} ] throws the javax.ejb.FinderException",
		new Object[] {method.getName()}));                   
            return true;
        } else {
	    result.addErrorDetails(smh.getLocalString
				       ("tests.componentNameConstructor",
					"For [ {0} ]",
					new Object[] {compName.toString()}));
            result.addErrorDetails(smh.getLocalString
		("com.sun.enterprise.tools.verifier.tests.ejb.entity.cmp2.FindMethodException.failed",
                "Error : [ {0} ] does not throw the javax.ejb.FinderException",
		new Object[] {method.getName()}));                   
            return false;
        }