1 22 package org.jboss.ejb3.test.aspectdomain.unit; 23 24 import org.jboss.ejb3.test.aspectdomain.Stateful; 25 26 import org.jboss.logging.Logger; 27 import org.jboss.test.JBossTestCase; 28 import junit.framework.Test; 29 30 36 public class AspectDomainUnitTestCase 37 extends JBossTestCase 38 { 39 private static final Logger log = Logger.getLogger(AspectDomainUnitTestCase.class); 40 41 public AspectDomainUnitTestCase(String name) 42 { 43 super(name); 44 } 45 46 public void testAspectDomain() throws Exception 47 { 48 Stateful stateful = (Stateful)getInitialContext().lookup("Stateful"); 49 String result = stateful.test(); 50 assertEquals("TestInterceptor", result); 51 } 52 53 public void testDeploymentDescriptorAspectDomain() throws Exception 54 { 55 Stateful stateful = (Stateful)getInitialContext().lookup("DeploymentDescriptorStateful"); 56 String result = stateful.test(); 57 assertEquals("TestInterceptor", result); 58 } 59 60 public static Test suite() throws Exception 61 { 62 return getDeploySetup(AspectDomainUnitTestCase.class, "aspectdomain.jar"); 63 } 64 65 } 66 | Popular Tags |