Exercise 8 PR #95

Merged
reynisson merged 68 commits from dev into main 2021-11-29 06:46:44 +00:00
3 changed files with 32 additions and 0 deletions
Showing only changes of commit 4b85b640ae - Show all commits

View File

@ -79,6 +79,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit4</artifactId>
<version>0.22.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>

View File

@ -0,0 +1,20 @@
package ch.unisg.executorpool;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import org.junit.jupiter.api.Test;
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
public class DependencyRuleTests {
@Test
void testPackageDependencies() {
noClasses()
.that()
.resideInAPackage("ch.unisg.executorpool.domain..")
.should()
.dependOnClassesThat()
.resideInAnyPackage("ch.unisg.executorpool.application..")
.check(new ClassFileImporter()
.importPackages("ch.unisg.executorpool.."));
}
}

View File

@ -83,6 +83,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit4</artifactId>
<version>0.22.0</version>
<scope>test</scope>
</dependency>
</dependencies>