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.abstractclass;
9   
10  import junit.framework.TestCase;
11  
12  /***
13   * @author <a href="mailto:jboner@codehaus.org">Jonas Bonér </a>
14   */
15  public class AbstractClassTest extends TestCase {
16      public AbstractClassTest(String name) {
17          super(name);
18      }
19  
20      public void testInstrumentedAbstractMemberMethodInvocation() {
21          try {
22              AbstractTarget target = new AbstractTargetImpl();
23              assertEquals("method1", target.method1());
24          } catch (Exception e) {
25              fail();
26          }
27      }
28  
29      public void testInstrumentedAbstractStaticMethodInvocation() {
30          try {
31              AbstractTarget target = new AbstractTargetImpl();
32              assertEquals("method2", target.method2());
33          } catch (Exception e) {
34              fail();
35          }
36      }
37  
38      public static void main(String[] args) {
39          junit.textui.TestRunner.run(suite());
40      }
41  
42      public static junit.framework.Test suite() {
43          return new junit.framework.TestSuite(AbstractClassTest.class);
44      }
45  }