1

Fix Architecture tests in LayeredArchitectureTest

This commit is contained in:
XXNitram
2020-03-12 13:15:00 +01:00
parent 9b004bef58
commit 18560c1e35
2 changed files with 9 additions and 13 deletions

View File

@ -23,11 +23,6 @@ import java.util.List;
@SpringBootApplication
@EnableSwagger2
public class Gruppen2Application {
@Autowired
private GroupService groupService;
@Autowired
private EventService eventService;
public static void main(String[] args) {
SpringApplication.run(Gruppen2Application.class, args);

View File

@ -14,17 +14,18 @@ public class LayeredArchitectureTest {
.layer("Domain").definedBy("..domain..")
.layer("Service").definedBy("..service")
.layer("Controller").definedBy("..controller..")
.layer("Repository").definedBy("..repository..");
.layer("Repository").definedBy("..repository..")
.layer("Config").definedBy("..config..");
@ArchTest
public static final ArchRule domainLayerShouldOnlyBeAccessedByServiceAndControllerLayer = layeredArchitecture
.whereLayer("Domain")
.mayOnlyBeAccessedByLayers("Service", "Controller");
.mayOnlyBeAccessedByLayers("Service", "Controller", "Config");
@ArchTest
public static final ArchRule serviceLayerShouldOnlyBeAccessedByControllerLayer = layeredArchitecture
.whereLayer("Service")
.mayOnlyBeAccessedByLayers("Controller");
.mayOnlyBeAccessedByLayers("Controller", "Config");
@ArchTest
public static final ArchRule repositoryLayerShouldOnlyBeAccessedByServiceLayer = layeredArchitecture