aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5/ataspectj/ataspectj/AroundInlineMungerTest2.aj
blob: beedea36b41bbcefe3c6f3b2eeab661a69574448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*******************************************************************************
 * Copyright (c) 2005 Contributors.
 * All rights reserved. 
 * This program and the accompanying materials are made available 
 * under the terms of the Eclipse Public License v1.0 
 * which accompanies this distribution and is available at 
 * http://eclipse.org/legal/epl-v10.html 
 * 
 * Contributors:
 *   Alexandre Vasseur         initial implementation
 *******************************************************************************/
package ataspectj;

import junit.framework.TestCase;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.ProceedingJoinPoint;

/**
 * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
 */
public class AroundInlineMungerTest2 extends TestCase {

    public static void main(String[] args) {
    	new AroundInlineMungerTest2().target();
    	System.out.println("AroundInlineMungerTestAspects2.Open.aroundCount="+AroundInlineMungerTestAspects2.Open.aroundCount);
    	System.out.println("AroundInlineMungerTestAspects2.Open.beforeCount="+AroundInlineMungerTestAspects2.Open.beforeCount);
//        TestHelper.runAndThrowOnFailure(suite());
    }
//
    public static junit.framework.Test suite() {
        return new junit.framework.TestSuite(AroundInlineMungerTest2.class);
    }

    public void testAccessNonPublicFromAroundAdvice() {
        target();
        assertEquals(3, AroundInlineMungerTestAspects2.Open.aroundCount);
        assertEquals(6, AroundInlineMungerTestAspects2.Open.beforeCount);
    }

    public void target() {}

}