01: /**************************************************************************************
02: * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the LGPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package test.adviseonintroducedinterface;
08:
09: import junit.framework.TestCase;
10:
11: /**
12: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr</a>
13: */
14: public class Test extends TestCase {
15: private static String s_logString = "";
16:
17: public void testIntroducedMarkerInterface() {
18: s_logString = "";
19: Target t = new Target();
20: t.m1();
21: assertEquals("before m1 ", s_logString);
22: }
23:
24: public void testIntroducedImplementation() {
25: s_logString = "";
26: Target t = new Target();
27: ((Intf2) t).m2();
28: assertEquals("before m2 ", s_logString);
29: }
30:
31: public static void main(String[] args) {
32: junit.textui.TestRunner.run(suite());
33: }
34:
35: public static junit.framework.Test suite() {
36: return new junit.framework.TestSuite(Test.class);
37: }
38:
39: public static void log(final String wasHere) {
40: s_logString += wasHere;
41: }
42: }
|