Skip to content

Instantly share code, notes, and snippets.

@loddar
Created September 22, 2014 12:46
Show Gist options
  • Save loddar/06ebfea786ab61243c7d to your computer and use it in GitHub Desktop.
Save loddar/06ebfea786ab61243c7d to your computer and use it in GitHub Desktop.
ajUnit - Step 2 (Create an aspect and assign it).
package com.company.project.aspects;
import org.failearly.ajunit.AjUnit4Test;
import org.failearly.ajunit.AjUnitSetup;
/**
* ajUnit - Step 2 (Create an aspect and assign it).
*
* Next error message:
*
* ajUnit - Setup Error: Test aspect 'com.company.project.aspects.IncorrectAspect' is not an ajUnit based aspect!
* - Please extend your aspect from one of the provided base aspects:
* * AjUnitAnnotationAspect or AjUnitClassicAspect
* * AjUnitBeforeAnnotationAspect or AjUnitBeforeClassicAspect
*/
public class MyAjUnit2Test extends AjUnit4Test {
@Override
public void setup(AjUnitSetup ajUnitSetup) {
ajUnitSetup.assignAspect("com.company.project.aspects.IncorrectAspect");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment