added unit tests for the roster #89
|
@ -83,6 +83,12 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.tngtech.archunit</groupId>
|
||||||
|
<artifactId>archunit-junit4</artifactId>
|
||||||
|
<version>0.22.0</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
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.."));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
package ch.unisg.roster;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
@SpringBootTest
|
|
||||||
class RosterApplicationTests {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void contextLoads() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
package ch.unisg.tapastasks;
|
|
||||||
|
|
||||||
import ch.unisg.tapastasks.tasks.application.port.out.AddTaskPort;
|
|
||||||
import ch.unisg.tapastasks.tasks.application.port.out.NewTaskAddedEventPort;
|
|
||||||
import ch.unisg.tapastasks.tasks.application.port.out.TaskListLock;
|
|
||||||
import ch.unisg.tapastasks.tasks.application.service.AddNewTaskToTaskListService;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
@SpringBootTest
|
|
||||||
class TapasTasksApplicationTests {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void contextLoads() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user