package ch.unisg.roster;

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.roster.roster.domain..")
            .should()
            .dependOnClassesThat()
            .resideInAnyPackage("ch.unisg.roster.roster.application..")
            .check(new ClassFileImporter()
                .importPackages("ch.unisg.roster.roster.."));
    }
}
