1
2
3 package org.virtualmock.aspect.aspectwerkz;
4
5 import junit.framework.TestCase;
6 import org.virtualmock.aspect.AspectUtils;
7
8
9 /***
10 * Tests the AspectUtils class
11 *
12 * @author Chad Woolley
13 * @version $Revision: 1.4 $
14 */
15 public class AspectwerkzAspectUtilsTest extends TestCase {
16 private static AspectwerkzAspectUtils aspectwerkzAspectUtils = null;
17 Class classType = null;
18
19 /***
20 * Set up the test
21 *
22 * @throws Exception any exception thrown during setup.
23 */
24 public void setUp() throws Exception {
25 super.setUp();
26 aspectwerkzAspectUtils = new AspectwerkzAspectUtils(new AspectUtils());
27 }
28
29 /***
30 * Tear down the test
31 *
32 * @throws Exception any exception thrown during teardown.
33 */
34 public void tearDown() throws Exception {
35 super.tearDown();
36 }
37
38 /***
39 * Hansel support
40 */
41
42
43
44
45
46
47
48
49
50
51 /***
52 * placeholder
53 */
54 public void testDummy() {
55 }
56
57 /***
58 * Test that the isJoinPointExcluded method returns false
59 *
60 * @todo This test commented because it fails with a noclassdef found error
61 * when running the unit test under AspectJ.
62 * @todo This is currently hardcoded to exclude EasyMock.
63 */
64 public void xtestIsJoinPointExcludedFalse() {
65 classType = String.class;
66
67 boolean isExcluded =
68 aspectwerkzAspectUtils.isJoinPointExcluded(classType);
69 assertFalse(isExcluded);
70 }
71
72 /***
73 * Test that the isJoinPointExcluded method returns true
74 *
75 * @todo This test commented because it fails with a noclassdef found error
76 * when running the unit test under AspectJ.
77 * @todo This is currently hardcoded to exclude EasyMock.
78 */
79 public void xtestIsJoinPointExcludedTrue() {
80
81
82
83 classType = TestCase.class;
84
85 boolean isExcluded =
86 aspectwerkzAspectUtils.isJoinPointExcluded(classType);
87 assertTrue(isExcluded);
88 }
89 }