diff --git a/src/test/java/org/kohsuke/github/ArchTests.java b/src/test/java/org/kohsuke/github/ArchTests.java index 420d558bd7..12d764d726 100644 --- a/src/test/java/org/kohsuke/github/ArchTests.java +++ b/src/test/java/org/kohsuke/github/ArchTests.java @@ -10,17 +10,24 @@ import com.tngtech.archunit.lang.ArchRule; import com.tngtech.archunit.lang.ConditionEvents; import com.tngtech.archunit.lang.SimpleConditionEvent; +import org.junit.BeforeClass; import org.junit.Test; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes; +import static org.junit.Assert.assertTrue; public class ArchTests { - private final JavaClasses classFiles = new ClassFileImporter() + private static final JavaClasses classFiles = new ClassFileImporter() .withImportOption(new ImportOption.DoNotIncludeTests()) .withImportOption(new ImportOption.DoNotIncludeJars()) .importPackages("org.kohsuke.github"); + @BeforeClass + public static void beforeClass() { + assertTrue(classFiles.size() > 0); + } + @Test public void testPreviewsAreFlaggedAsDeprecated() {