Skip to content

Instantly share code, notes, and snippets.

View sleclercq's full-sized avatar

Stephane Leclercq sleclercq

View GitHub Profile
@fappel
fappel / Repeat.java
Last active June 5, 2023 16:58
JUnit 4 TestRule to run a test repeatedly for a specified amount of repititions
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention( RetentionPolicy.RUNTIME )
@Target( {
java.lang.annotation.ElementType.METHOD
} )
public @interface Repeat {
public abstract int times();