FileDocCategorySizeDatePackage
ConnectionRequestInfoImplHashcode.javaAPI DocGlassfish v2 API4061Fri May 04 22:33:28 BST 2007com.sun.enterprise.tools.verifier.tests.connector

ConnectionRequestInfoImplHashcode

public class ConnectionRequestInfoImplHashcode extends ConnectorTest implements ConnectorCheck
Test wether the implementatin of the ConnectionRequestInfo interface properly overrides the hashcode method
author
Jerome Dochez
version

Fields Summary
Constructors Summary
Methods Summary
public com.sun.enterprise.tools.verifier.Resultcheck(com.sun.enterprise.deployment.ConnectorDescriptor descriptor)

Test wether the implementatin of the ConnectionRequestInfo interface properly overrides the hashcode method.

paramm
descriptor deployment descriptor for the rar file
return
result object containing the result of the individual test performed

        Result result = getInitializedResult();
	ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        
//        File f=Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());     
        Class c = findImplementorOf(descriptor, "javax.resource.spi.ConnectionRequestInfo");
        if (c == null) {
            result.addNaDetails(smh.getLocalString
				  ("tests.componentNameConstructor",
				   "For [ {0} ]",
				   new Object[] {compName.toString()}));	
            result.notApplicable(smh.getLocalString
	    ("com.sun.enterprise.tools.verifier.tests.connector.ConnectorTest.optionalInterfaceMissing", 
            "Warning: There is no implementation of the optional [ {0} ] interface",
            new Object[] {"javax.resource.spi.ConnectionRequestInfo"}));  
        } else {
            // An implementation of the interface is provided, let's check the equals method
            checkMethodImpl(c, "hashCode", null, "public int hashCode()", result);                    
        }
        return result;