This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.project.aspects; | |
public aspect IncorrectAspect { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.project.aspects; | |
import org.failearly.ajunit.aspect.classic.AjUnitBeforeClassicAspect; | |
public aspect MyAspect extends AjUnitBeforeClassicAspect { | |
protected pointcut pointcutUnderTest(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.project.aspects; | |
import org.failearly.ajunit.AjUnit4Test; | |
import org.failearly.ajunit.AjUnitSetup; | |
/** | |
* ajUnit - Step 4 (Create at least one test fixture class and add it/them). | |
* | |
* Next error message: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.project.aspects.testfixture; | |
/** | |
* A test fixture class for ajUnit. These class exists only for ajUnit tests. | |
*/ | |
public class MyTestFixture { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ajUnit - Final Step 6 (Override method execute()). | |
* | |
* NOW you're done! No more "ajUnit - Setup Error: ..."! You can start developing your aspect - sorry I mean your pointcut :-) | |
* | |
* You got an test failure (not an setup error): | |
* | |
* java.lang.AssertionError: ajUnit - Pointcut test failed with 2 error(s). | |
* | |
* Details: |
OlderNewer