1 22 package org.jboss.test.aop.test; 23 24 import javax.management.MBeanServerConnection ; 25 import javax.management.ObjectName ; 26 27 import junit.framework.Test; 28 import junit.framework.TestSuite; 29 30 import org.jboss.test.JBossTestCase; 31 32 38 39 public class AOPUnitTestCase 40 extends JBossTestCase 41 { 42 org.jboss.logging.Logger log = getLog(); 43 44 static boolean deployed = false; 45 static int test = 0; 46 47 public AOPUnitTestCase(String name) 48 { 49 50 super(name); 51 52 } 53 54 public void testAspect() throws Exception 55 { 56 MBeanServerConnection server = getServer(); 57 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 58 Object [] params = {}; 59 String [] sig = {}; 60 server.invoke(testerName, "testAspect", params, sig); 61 } 62 63 public void testBasic() throws Exception 64 { 65 MBeanServerConnection server = getServer(); 66 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 67 Object [] params = {}; 68 String [] sig = {}; 69 server.invoke(testerName, "testBasic", params, sig); 70 } 71 72 public void testCallerPointcut() throws Exception 73 { 74 MBeanServerConnection server = getServer(); 75 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 76 Object [] params = {}; 77 String [] sig = {}; 78 server.invoke(testerName, "testCallerPointcut", params, sig); 79 } 80 81 public void testInheritance() throws Exception 82 { 83 MBeanServerConnection server = getServer(); 84 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 85 Object [] params = {}; 86 String [] sig = {}; 87 server.invoke(testerName, "testInheritance", params, sig); 88 } 89 90 public void testMetadata() throws Exception 91 { 92 MBeanServerConnection server = getServer(); 93 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 94 Object [] params = {}; 95 String [] sig = {}; 96 server.invoke(testerName, "testMetadata", params, sig); 97 } 98 99 public void testDynamicInterceptors() throws Exception 100 { 101 MBeanServerConnection server = getServer(); 102 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 103 Object [] params = {}; 104 String [] sig = {}; 105 server.invoke(testerName, "testDynamicInterceptors", params, sig); 106 } 107 108 public void testFieldInterception() throws Exception 109 { 110 MBeanServerConnection server = getServer(); 111 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 112 Object [] params = {}; 113 String [] sig = {}; 114 server.invoke(testerName, "testFieldInterception", params, sig); 115 } 116 117 public void testMixin() throws Exception 118 { 119 MBeanServerConnection server = getServer(); 120 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 121 Object [] params = {}; 122 String [] sig = {}; 123 server.invoke(testerName, "testMixin", params, sig); 124 } 125 126 127 public void testMethodInterception() throws Exception 128 { 129 MBeanServerConnection server = getServer(); 130 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 131 Object [] params = {}; 132 String [] sig = {}; 133 server.invoke(testerName, "testMethodInterception", params, sig); 134 } 135 136 public void testConstructorInterception() throws Exception 137 { 138 MBeanServerConnection server = getServer(); 139 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 140 Object [] params = {}; 141 String [] sig = {}; 142 server.invoke(testerName, "testConstructorInterception", params, sig); 143 } 144 145 public void testExceptions() throws Exception 146 { 147 MBeanServerConnection server = getServer(); 148 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 149 Object [] params = {}; 150 String [] sig = {}; 151 server.invoke(testerName, "testExceptions", params, sig); 152 } 153 154 158 public void testAnnotationOverrides() throws Exception 159 { 160 MBeanServerConnection server = getServer(); 161 ObjectName testerName = new ObjectName ("jboss.aop:name=AOPTester"); 162 Object [] params = {}; 163 String [] sig = {}; 164 server.invoke(testerName, "testIntroducedAnnotation", params, sig); 165 } 166 167 public static Test suite() throws Exception 168 { 169 TestSuite suite = new TestSuite(); 170 suite.addTest(new TestSuite(AOPUnitTestCase.class)); 171 172 AOPTestSetup setup = new AOPTestSetup(suite, "aoptest.sar"); 173 return setup; 174 } 175 176 } 177 | Popular Tags |