djencks 2005/02/04 19:49:46
Modified: modules/core/src/test/org/openejb/slsb InvocationTest.java
StatelessInstanceInterceptorTest.java
Log:
Add some basic sanity check assertions
Revision Changes Path
1.9 +14 -2
openejb/modules/core/src/test/org/openejb/slsb/InvocationTest.java
Index: InvocationTest.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/test/org/openejb/slsb/InvocationTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- InvocationTest.java 5 Oct 2004 07:04:04 -0000 1.8
+++ InvocationTest.java 5 Feb 2005 00:49:46 -0000 1.9
@@ -51,6 +51,8 @@
import java.util.HashSet;
import javax.ejb.SessionBean;
+import javax.ejb.SessionContext;
+import javax.ejb.Timer;
import junit.framework.TestCase;
import net.sf.cglib.reflect.FastClass;
@@ -71,6 +73,16 @@
private BusinessMethod bizMethod;
private FastClass fastClass;
private int index;
+ private final static InterfaceMethodSignature[] signatures = new
InterfaceMethodSignature[] {
+ new InterfaceMethodSignature("ejbActivate", false),
+ new InterfaceMethodSignature("ejbLoad", false),
+ new InterfaceMethodSignature("ejbPassivate", false),
+ new InterfaceMethodSignature("ejbStore", false),
+ new InterfaceMethodSignature("ejbCreate", false),
+ new InterfaceMethodSignature("ejbRemove", false),
+ new InterfaceMethodSignature("ejbTimeout", new Class[]
{Timer.class}, false),
+ new InterfaceMethodSignature("setSessionContext", new Class[]
{SessionContext.class}, false),
+ };
public void testMethodInvoke() throws Exception {
MockEJB instance = new MockEJB();
@@ -130,7 +142,7 @@
// transactionContextManager,
null,
null,
- SystemMethodIndices.createSystemMethodIndices(new
InterfaceMethodSignature[] {}, null, null, null),
+ SystemMethodIndices.createSystemMethodIndices(signatures,
"setSessionContext", SessionContext.class.getName(), null),
null, new HashSet(),
new HashSet(),
null);
1.7 +17 -2
openejb/modules/core/src/test/org/openejb/slsb/StatelessInstanceInterceptorTest.java
Index: StatelessInstanceInterceptorTest.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/test/org/openejb/slsb/StatelessInstanceInterceptorTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- StatelessInstanceInterceptorTest.java 5 Oct 2004 07:04:04 -0000
1.6
+++ StatelessInstanceInterceptorTest.java 5 Feb 2005 00:49:46 -0000
1.7
@@ -49,6 +49,9 @@
import java.util.HashSet;
+import javax.ejb.Timer;
+import javax.ejb.SessionContext;
+
import org.apache.geronimo.core.service.Interceptor;
import org.apache.geronimo.core.service.Invocation;
import org.apache.geronimo.core.service.InvocationKey;
@@ -79,6 +82,18 @@
private StatelessInstanceInterceptor interceptor;
private EJBInstanceContext ctx;
private MockEJB mockEJB;
+ private final static InterfaceMethodSignature[] signatures = new
InterfaceMethodSignature[] {
+ new InterfaceMethodSignature("ejbActivate", false),
+ new InterfaceMethodSignature("ejbLoad", false),
+ new InterfaceMethodSignature("ejbPassivate", false),
+ new InterfaceMethodSignature("ejbStore", false),
+ new InterfaceMethodSignature("ejbCreate", false),
+ new InterfaceMethodSignature("ejbRemove", false),
+ new InterfaceMethodSignature("ejbTimeout", new Class[]
{Timer.class}, false),
+ new InterfaceMethodSignature("setSessionContext", new Class[]
{SessionContext.class}, false),
+ };
+
+
public void testNormalInvocation() throws Throwable {
EJBInvocationImpl invocation = new
EJBInvocationImpl(EJBInterfaceType.REMOTE, 0, null);
@@ -125,7 +140,7 @@
// transactionContextManager,
null,
null,
- SystemMethodIndices.createSystemMethodIndices(new
InterfaceMethodSignature[] {}, null, null, null),
+
SystemMethodIndices.createSystemMethodIndices(signatures, "setSessionContext",
SessionContext.class.getName(), null),
null,
new HashSet(),
new HashSet(),