1 7 package ch.ethz.prose; 8 9 import java.util.List ; 11 12 import junit.framework.*; 13 import ch.ethz.prose.crosscut.*; 14 import ch.ethz.prose.filter.PointCutter; 15 16 22 public 23 class AbstractExtensionTest extends TestCase { 24 25 List cross1 = null; 27 List cross2 = null; 28 DefaultAspect exampleExt1 = new DefaultAspect() 29 { 30 }; 31 32 DefaultAspect exampleExt2 = new DefaultAspect() { 33 Crosscut c1 = new MethodCut() { 34 public void METHOD_ARGS() {} 35 36 protected PointCutter pointCutter() { return null;} 37 }; 38 39 Crosscut c2 = new MethodCut() { 40 void METHOD_ARGS(ANY thisObj, REST params) {} 41 42 protected PointCutter pointCutter() { return null;} 43 }; 44 }; 45 46 50 public AbstractExtensionTest(String name) 51 { 52 super(name); 53 } 54 55 58 protected void setUp() 59 { 60 cross1 = exampleExt1.getCrosscuts(); 61 cross2 = exampleExt2.getCrosscuts(); 62 } 63 64 protected void tearDown() 65 { 66 } 67 68 public void testCrosscuts() 70 { 71 assertNotNull(cross1); 72 assertTrue("crosscut 1 has no elements", cross1.isEmpty()); 73 74 assertNotNull(cross2); 75 assertTrue("crosscut has 2 methods",cross2.size() == 2); 76 } 77 78 82 public static Test suite() 83 { 84 return new TestSuite(AbstractExtensionTest.class); 85 } 86 87 88 } 89 90 91
| Popular Tags
|