From d82bc80320ac5c54e5567308815b48535e4841b6 Mon Sep 17 00:00:00 2001 From: Marco Ferrer <35935108+marcoferrer@users.noreply.github.com> Date: Tue, 15 Dec 2020 12:14:25 -0500 Subject: [PATCH] Update ArchTests.java --- src/test/java/org/kohsuke/github/ArchTests.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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() {