org.apache.geronimo.validator.ejb
Class SessionBeanTests

java.lang.Object
  extended byorg.apache.geronimo.validator.ValidationTest
      extended byorg.apache.geronimo.validator.ejb.BaseEjbJarTest
          extended byorg.apache.geronimo.validator.ejb.SessionBeanTests

public class SessionBeanTests
extends BaseEjbJarTest

Some basic tests for session beans. Right now this is not exhaustive, but it's an example of how the tests can be written.

Version:
$Revision: 1.5 $ $Date: 2004/03/10 09:58:44 $

Field Summary
protected  org.apache.geronimo.xbeans.j2ee.SessionBeanType bean
           
 
Fields inherited from class org.apache.geronimo.validator.ejb.BaseEjbJarTest
ejbJar
 
Fields inherited from class org.apache.geronimo.validator.ValidationTest
context
 
Constructor Summary
SessionBeanTests()
           
 
Method Summary
 String getXpath()
          Get called for each session bean element in the standard DD.
 ValidationResult initialize(ValidationContext context)
          Trap the actual bean to examine.
 ValidationResult testBeanImplementationClass()
          Check that the bean implementation class exists and meets certain minimum criteria.
 ValidationResult testHomeInterface()
          Check that the home interface class exists and meets certain minimum criteria.
 ValidationResult testLocalOrRemote()
          Tests that there's either a local and a remote and either a local home or a home.
 
Methods inherited from class org.apache.geronimo.validator.ejb.BaseEjbJarTest
getSchemaType
 
Methods inherited from class org.apache.geronimo.validator.ValidationTest
error, error, error, error, error, error, loadClass, warn, warn, warn, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bean

protected org.apache.geronimo.xbeans.j2ee.SessionBeanType bean
Constructor Detail

SessionBeanTests

public SessionBeanTests()
Method Detail

getXpath

public String getXpath()
Get called for each session bean element in the standard DD.

Specified by:
getXpath in class ValidationTest
Returns:
An Xpath of interest to this test class, or null if the class should be invoked once on the entire deployment descriptor or module. If getSchemaType returns null, this method nust return null as well.

initialize

public ValidationResult initialize(ValidationContext context)
Trap the actual bean to examine.

Overrides:
initialize in class BaseEjbJarTest

testBeanImplementationClass

public ValidationResult testBeanImplementationClass()
Check that the bean implementation class exists and meets certain minimum criteria.


testLocalOrRemote

public ValidationResult testLocalOrRemote()
Tests that there's either a local and a remote and either a local home or a home. todo: make sure you don't get a remote and a local home


testHomeInterface

public ValidationResult testHomeInterface()
Check that the home interface class exists and meets certain minimum criteria.



Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.