You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AnnotationPointcutsTests.java 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*******************************************************************************
  2. * Copyright (c) 2004 IBM
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Common Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/cpl-v10.html
  7. *
  8. * Contributors:
  9. * Andy Clement - initial API and implementation
  10. *******************************************************************************/
  11. package org.aspectj.systemtest.ajc150;
  12. import java.io.File;
  13. import junit.framework.Test;
  14. import org.aspectj.testing.XMLBasedAjcTestCase;
  15. /**
  16. * Tests the use of Annotations in pointcuts
  17. */
  18. public class AnnotationPointcutsTests extends XMLBasedAjcTestCase {
  19. public static Test suite() {
  20. return XMLBasedAjcTestCase.loadSuite(AnnotationPointcutsTests.class);
  21. }
  22. protected File getSpecFile() {
  23. return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml");
  24. }
  25. // before(): call(@SimpleAnnotation * *(..)) { }
  26. public void test001_usingAnnotationsInPointcuts() {
  27. runTest("annotation matching on call");
  28. }
  29. public void test002_AtAnnotationMatching() {
  30. runTest("at annotation matching");
  31. }
  32. public void test003_Within_Code() {
  33. runTest("annotations and within(code)");
  34. }
  35. public void test004_Within() {
  36. runTest("annotations and within");
  37. }
  38. // TODO extra tests
  39. // 3) @annotation on the different join point kinds, matches with inherited annotation
  40. }