KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > withinstaticref > WithinStaticRefTest


1 /**************************************************************************************
2  * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
3  * http://aspectwerkz.codehaus.org *
4  * ---------------------------------------------------------------------------------- *
5  * The software in this package is published under the terms of the LGPL license *
6  * a copy of which has been included with this distribution in the license.txt file. *
7  **************************************************************************************/

8 package test.withinstaticref;
9
10 import junit.framework.TestCase;
11
12 /**
13  * Test against an Eclipse compiled xxx.class that uses DUP_X1
14  *
15  * @see src/testdata/test.withinstaticref.TargetA
16  */

17 public class WithinStaticRefTest extends TestCase {
18     public void testWithinAspect() {
19         WithinAspect.s_count = 0;
20         TargetA.suite();
21         assertEquals(WithinAspect.s_count, 4);
22         // and no verify error
23
}
24     
25     // -- JUnit
26
public static void main(String JavaDoc[] args) {
27         junit.textui.TestRunner.run(suite());
28     }
29
30     public static junit.framework.Test suite() {
31         return new junit.framework.TestSuite(WithinStaticRefTest.class);
32     }
33 }
34
Popular Tags