Skip to content

Instantly share code, notes, and snippets.

@loddar
loddar / MyAjUnit3Test.java
Created September 22, 2014 12:49
ajUnit - Step 3 (Extend your aspect from one of the provided ajUnit (classic or annotation) aspects).
package com.company.project.aspects;
import org.failearly.ajunit.AjUnit4Test;
import org.failearly.ajunit.AjUnitSetup;
/**
* ajUnit - Step 3 (Extend your aspect from one of the provided ajUnit (classic or annotation) aspects).
*
* Next Error message:
*
@loddar
loddar / MyAspect.aj
Created September 22, 2014 12:48
A correct ajUnit test aspect.
package com.company.project.aspects;
import org.failearly.ajunit.aspect.classic.AjUnitBeforeClassicAspect;
public aspect MyAspect extends AjUnitBeforeClassicAspect {
protected pointcut pointcutUnderTest();
}
@loddar
loddar / IncorrectAspect.aj
Created September 22, 2014 12:47
An (incorrect) aspect.
package com.company.project.aspects;
public aspect IncorrectAspect {
}
@loddar
loddar / MyAjUnit2Test.java
Created September 22, 2014 12:46
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:
*
@loddar
loddar / MyAjUnit1Test.java
Last active August 29, 2015 14:06
ajUnit - Step 1 (Override setup()).
package com.company.project.aspects;
import org.failearly.ajunit.AjUnit4Test;
import org.failearly.ajunit.AjUnitSetup;
/**
* ajUnit - Step 1 (Override {@link #setup(org.failearly.ajunit.AjUnitSetup)}).
*
* Next error message:
*
@loddar
loddar / MyAjUnit0Test.java
Last active August 29, 2015 14:06
ajUnit - Step 0 (create an ajUnit test)
package com.company.project.aspects;
import org.failearly.ajunit.AjUnit4Test;
/**
* ajUnit - Initial Step 0 (create an ajUnit test).
*
* Create an JUnit4 Test by creating a test class extending AjUnit4Test.
*
* First error message: