created test-utils module
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
FROM maven:3.8.5-openjdk-17 as build
|
||||
|
||||
COPY ./pom.xml .
|
||||
|
||||
RUN mvn -B dependency:go-offline
|
||||
|
||||
COPY ./src src
|
||||
|
||||
RUN mvn -B package
|
||||
|
||||
FROM openjdk:11-jre-slim-buster
|
||||
|
||||
COPY --from=build ./target/recommendation.jar .
|
||||
COPY ./target/recommendation.jar .
|
||||
|
||||
EXPOSE 8081
|
||||
|
||||
|
||||
@@ -134,6 +134,14 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- TODO: Parent POM or published to own Repository-->
|
||||
<dependency>
|
||||
<groupId>de.weinbrecht.luc.bpm.architecture</groupId>
|
||||
<artifactId>test-utils</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
package de.weinbrecht.luc.bpm.architecture.recommendation;
|
||||
|
||||
import com.tngtech.archunit.junit.AnalyzeClasses;
|
||||
import com.tngtech.archunit.junit.ArchTest;
|
||||
import com.tngtech.archunit.lang.ArchRule;
|
||||
|
||||
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
|
||||
|
||||
@AnalyzeClasses(packages = "de.weinbrecht.luc.bpm.architecture.recommendation")
|
||||
class ArchitectureRuleTests {
|
||||
private final static String DOMAIN = "..domain..";
|
||||
private final static String USE_CASE = "..usecase..";
|
||||
private final static String ADAPTER = "..adapter..";
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule domain_use_case_should_not_import_adapters =
|
||||
noClasses()
|
||||
.that().resideInAPackage(DOMAIN)
|
||||
.should().accessClassesThat().resideInAPackage(ADAPTER);
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule use_case_should_not_import_adapters =
|
||||
noClasses()
|
||||
.that().resideInAPackage(USE_CASE)
|
||||
.should().accessClassesThat().resideInAPackage(ADAPTER);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package de.weinbrecht.luc.bpm.architecture.recommendation;
|
||||
|
||||
import de.weinbrecht.luc.bpm.architecture.ArchitectureRuleTests;
|
||||
|
||||
class ArchitectureTests implements ArchitectureRuleTests {
|
||||
@Override
|
||||
public String basePackage() {
|
||||
return "de.weinbrecht.luc.bpm.architecture.recommendation";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user