Skip to content

Instantly share code, notes, and snippets.

@loddar
Created September 22, 2014 12:54
Show Gist options
  • Save loddar/0bcbddc8a4333773fc8a to your computer and use it in GitHub Desktop.
Save loddar/0bcbddc8a4333773fc8a to your computer and use it in GitHub Desktop.
ajUnit - Step 5 (Override method assertPointcut(JoinPointSelector) and "implement" it).
package com.company.project.aspects;
import org.failearly.ajunit.AjUnit4Test;
import org.failearly.ajunit.AjUnitSetup;
import org.failearly.ajunit.builder.JoinPointSelector;
/**
* ajUnit - Step 5 (Override method assertPointcut(JoinPointSelector) and "implement" it by calling JoinPointSelector.notYetSpecified()).
*
* Next error messages:
*
* ajUnit - Setup Error: Missing execute().
* - Please override execute().
*
*/
public class MyAjUnit5Test extends AjUnit4Test {
@Override
public void setup(AjUnitSetup ajUnitSetup) {
ajUnitSetup.assignAspect("com.company.project.aspects.MyAspect");
ajUnitSetup.addTestFixtureClass(com.company.project.aspects.testfixture.MyTestFixture.class);
}
@Override
public void assertPointcut(JoinPointSelector joinPointSelector) {
joinPointSelector.notYetSpecified();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment