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

ConnectionRequestInfoImplEquals

public class ConnectionRequestInfoImplEquals extends ConnectorTest implements ConnectorCheck
Test wether the implementatin of the ConnectionRequestInfo interface properly overrides the equals 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 equals 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();
        
        // let's get first the the default implementation of the ConnectionManager
        //File jarFile = Verifier.getJarFile(descriptor.getModuleDescriptor().getArchiveUri());            
//        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, "equals", new Class[] {Object.class}, "public boolean equals(java.lang.Object)", result);                    
        }
        return result;