Skip to content

Commit

Permalink
add arch test to ensure abstract integration test inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianAnzinger committed Sep 21, 2024
1 parent 591feae commit 31ec22b
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package de.tum.cit.aet.artemis.atlas.architecture;

import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes;

import org.junit.jupiter.api.Test;

import de.tum.cit.aet.artemis.atlas.AbstractAtlasIntegrationTest;
import de.tum.cit.aet.artemis.shared.architecture.AbstractArchitectureTest;

class TestArchitectureTest extends AbstractArchitectureTest {

@Test
void integrationTestsShouldExtendAbstractAtlasIntegrationTest() {
classes().that().resideInAPackage(ARTEMIS_PACKAGE + ".atlas").and().haveSimpleNameEndingWith("IntegrationTest").should().beAssignableTo(AbstractAtlasIntegrationTest.class)
.because("All integration tests should extend AbstractAtlasIntegrationTest").check(testClasses);
}
}

0 comments on commit 31ec22b

Please sign in to comment.