1 25 package org.objectweb.easybeans.tests.interceptors.invocationcontext; 26 27 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance; 28 29 import org.objectweb.easybeans.tests.common.ejbs.base.ItfOneMethod00; 30 import org.objectweb.easybeans.tests.common.ejbs.base.invocationcontext.ItfInvocation00; 31 import org.objectweb.easybeans.tests.common.ejbs.base.invocationcontext.ItfInvocationParameter01; 32 import org.objectweb.easybeans.tests.common.ejbs.base.invocationcontext.ItfInvocationParameterTest; 33 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.invocationcontext.SLSBInvocationContext00; 34 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.invocationcontext.SLSBInvocationContext01; 35 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.invocationcontext.SLSBInvocationContext02; 36 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.invocationcontext.SLSBInvocationContext03; 37 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.invocationcontext.SLSBInvocationParameter00; 38 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.invocationcontext.SLSBInvocationParameter01; 39 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.invocationcontext.SLSBInvocationParameterTest; 40 import org.objectweb.easybeans.tests.common.interceptors.invocationcontext.BeanDescriptor; 41 import org.objectweb.easybeans.tests.common.interceptors.invocationcontext.ComplexObject00; 42 import org.testng.annotations.Test; 43 44 55 public class TestInvocation00 { 56 57 60 public static final int VALUE = 5000; 61 62 70 @Test(groups = {"invocationContext"}) 71 public void testInvocation00() throws Exception { 72 testInvocation(SLSBInvocationContext00.class); 73 } 74 75 83 @Test(groups = {"invocationContext"}) 84 public void testInvocation01() throws Exception { 85 testInvocation(SLSBInvocationContext01.class); 86 } 87 88 94 private void testInvocation(final Class beanClass) throws Exception { 95 ItfInvocation00 icBean = getBeanRemoteInstance(beanClass, ItfInvocation00.class); 96 icBean.check(); 97 } 98 99 107 @Test(groups = {"invocationContext", "get/setParameters"}) 108 public void testParameters00() throws Exception { 109 ItfInvocationParameterTest bean = getBeanRemoteInstance(SLSBInvocationParameterTest.class, 110 ItfInvocationParameterTest.class); 111 bean.testNull(SLSBInvocationParameter00.class); 112 } 113 114 122 @Test(groups = {"invocationContext", "get/setParameters"}) 123 public void testParameters01() throws Exception { 124 ItfInvocationParameterTest bean = getBeanRemoteInstance(SLSBInvocationParameterTest.class, 125 ItfInvocationParameterTest.class); 126 bean.testNull(SLSBInvocationParameter01.class); 127 } 128 129 137 @Test(groups = {"invocationContext", "get/setParameters"}) 138 public void testParameters02() throws Exception { 139 ItfInvocationParameterTest bean = getBeanRemoteInstance(SLSBInvocationParameterTest.class, 140 ItfInvocationParameterTest.class); 141 bean.testWithoutModification(SLSBInvocationParameter00.class); 142 } 143 144 152 @Test(groups = {"invocationContext", "get/setParameters"}) 153 public void testParameters03() throws Exception { 154 ItfInvocationParameterTest bean = getBeanRemoteInstance(SLSBInvocationParameterTest.class, 155 ItfInvocationParameterTest.class); 156 bean.testWithoutModification(SLSBInvocationParameter01.class); 157 } 158 159 167 @SuppressWarnings ("boxing") 168 @Test(groups = {"invocationContext", "get/setParameters"}) 169 public void testParameters04() throws Exception { 170 ItfInvocationParameterTest bean = getBeanRemoteInstance(SLSBInvocationParameterTest.class, 171 ItfInvocationParameterTest.class); 172 bean.testWithModification(SLSBInvocationParameter00.class); 173 } 174 175 183 @SuppressWarnings ("boxing") 184 @Test(groups = {"invocationContext", "get/setParameters"}) 185 public void testParameters05() throws Exception { 186 ItfInvocationParameterTest bean = getBeanRemoteInstance(SLSBInvocationParameterTest.class, 187 ItfInvocationParameterTest.class); 188 bean.testWithModification(SLSBInvocationParameter01.class); 189 } 190 191 195 @Test(groups = {"invocationContext", "getContextData"}) 196 public void testContextData00() throws Exception { 197 ItfInvocationParameter01 icBean = getBeanRemoteInstance(SLSBInvocationContext02.class, 198 ItfInvocationParameter01.class); 199 icBean.getObjects(null, null); 200 } 201 202 206 @Test(groups = {"invocationContext", "getContextData"}) 207 @SuppressWarnings ("boxing") 208 public void testContextData01() throws Exception { 209 ItfInvocationParameter01 icBean = getBeanRemoteInstance(SLSBInvocationContext02.class, 210 ItfInvocationParameter01.class); 211 icBean.getObjects(new ComplexObject00(), new BeanDescriptor()); 212 } 213 214 218 @Test(groups = {"invocationContext", "getContextData"}) 219 @SuppressWarnings ("boxing") 220 public void testContextData02() throws Exception { 221 ItfInvocationParameter01 icBean = getBeanRemoteInstance(SLSBInvocationContext02.class, 222 ItfInvocationParameter01.class); 223 icBean.getObjects(new ComplexObject00(), new BeanDescriptor()); 224 } 225 226 230 @Test(groups = {"invocationContext", "proceed"}) 231 public void testProceed00() throws Exception { 232 ItfOneMethod00 icBean = getBeanRemoteInstance(SLSBInvocationContext03.class, ItfOneMethod00.class); 233 icBean.doOne(null); 234 } 235 } 236 | Popular Tags |