TSK-1919: re-enabled architecture tests and fixed freeze mechanism
cause of the issue(s): misconfiguration of the slices feature Co-authored-by: Oliver Koch <oliver.koch@novatec-gmbh.de>
This commit is contained in:
parent
332681ac50
commit
63d5477e06
|
@ -1,24 +0,0 @@
|
|||
Method <acceptance.PojoTest.equalsContract()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:39)
|
||||
Method <acceptance.PojoTest.testsThatPojoClassesAreFound()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:34)
|
||||
Method <acceptance.PojoTest.validateGetAndSet()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:70)
|
||||
Method <acceptance.PojoTest.validateGetters()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:49)
|
||||
Method <acceptance.PojoTest.validateNoPublicFields()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:90)
|
||||
Method <acceptance.PojoTest.validateNoStaticExceptFinalFields()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:80)
|
||||
Method <acceptance.PojoTest.validateSetters()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:59)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithExplicitId()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:250)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithInvalidCategory()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:211)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithInvalidParentId()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:238)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithInvalidParentKey()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:226)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithInvalidType()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:197)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest$WithSpi.should_executeBatch()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:145)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest.should_loadAnyRelevantTaskIds()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:85)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest.should_loadExistingTaskIds()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:95)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest.should_notLoadAnyIrrelevantTaskIds()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:106)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest.should_noticeDifferentPriority_When_PriorityHasChanged()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:115)
|
||||
Method <acceptance.task.create.CreateTaskWithSorAccTest.should_copyObjectReferences_When_DuplicatingTask()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateTaskWithSorAccTest.java:137)
|
||||
Method <acceptance.task.create.CreateTaskWithSorAccTest.should_createObjectReferences_When_CreatingTask()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateTaskWithSorAccTest.java:68)
|
||||
Method <acceptance.task.update.UpdateManualPriorityAccTest.should_setPriorityAccordingToClassification_When_NegativeManualPriority()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (UpdateManualPriorityAccTest.java:77)
|
||||
Method <acceptance.task.update.UpdateManualPriorityAccTest.should_setPriorityToManualPriority_When_PositiveManualPriority()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (UpdateManualPriorityAccTest.java:65)
|
||||
Method <acceptance.task.update.UpdateManualPriorityWithSpiAccTest$UpdateManualPriorityTest.should_setPriorityToManualAndNotUpdateAccordingToSpi_When_ManualPriorityPositive()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (UpdateManualPriorityWithSpiAccTest.java:88)
|
||||
Method <acceptance.task.update.UpdateManualPriorityWithSpiAccTest$UpdateManualPriorityTest.should_setPriorityUsingSpi_When_ManualPriorityNegative()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (UpdateManualPriorityWithSpiAccTest.java:102)
|
||||
Method <acceptance.taskpreprocessing.CreateTaskPreprocessingAccTest.should_processTaskBeforeCreation_When_CreateTaskPreprocessorEnabled()> does not match '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateTaskPreprocessingAccTest.java:59)
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,24 @@
|
|||
Method <acceptance.PojoTest.equalsContract()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:39)
|
||||
Method <acceptance.PojoTest.testsThatPojoClassesAreFound()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:34)
|
||||
Method <acceptance.PojoTest.validateGetAndSet()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:70)
|
||||
Method <acceptance.PojoTest.validateGetters()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:49)
|
||||
Method <acceptance.PojoTest.validateNoPublicFields()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:90)
|
||||
Method <acceptance.PojoTest.validateNoStaticExceptFinalFields()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:80)
|
||||
Method <acceptance.PojoTest.validateSetters()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (PojoTest.java:59)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithExplicitId()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:250)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithInvalidCategory()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:211)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithInvalidParentId()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:238)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithInvalidParentKey()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:226)
|
||||
Method <acceptance.classification.create.CreateClassificationAccTest.should_ThrowException_TryingToCreateClassificationWithInvalidType()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateClassificationAccTest.java:197)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest$WithSpi.should_executeBatch()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:145)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest.should_loadAnyRelevantTaskIds()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:87)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest.should_loadExistingTaskIds()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:97)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest.should_notLoadAnyIrrelevantTaskIds()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:108)
|
||||
Method <acceptance.jobs.helper.TaskUpdatePriorityWorkerAccTest.should_noticeDifferentPriority_When_PriorityHasChanged()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (TaskUpdatePriorityWorkerAccTest.java:117)
|
||||
Method <acceptance.task.create.CreateTaskWithSorAccTest.should_copyObjectReferences_When_DuplicatingTask()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateTaskWithSorAccTest.java:136)
|
||||
Method <acceptance.task.create.CreateTaskWithSorAccTest.should_createObjectReferences_When_CreatingTask()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateTaskWithSorAccTest.java:68)
|
||||
Method <acceptance.task.update.UpdateManualPriorityAccTest.should_setPriorityAccordingToClassification_When_NegativeManualPriority()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (UpdateManualPriorityAccTest.java:77)
|
||||
Method <acceptance.task.update.UpdateManualPriorityAccTest.should_setPriorityToManualPriority_When_PositiveManualPriority()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (UpdateManualPriorityAccTest.java:65)
|
||||
Method <acceptance.task.update.UpdateManualPriorityWithSpiAccTest$UpdateManualPriorityTest.should_setPriorityToManualAndNotUpdateAccordingToSpi_When_ManualPriorityPositive()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (UpdateManualPriorityWithSpiAccTest.java:87)
|
||||
Method <acceptance.task.update.UpdateManualPriorityWithSpiAccTest$UpdateManualPriorityTest.should_setPriorityUsingSpi_When_ManualPriorityNegative()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (UpdateManualPriorityWithSpiAccTest.java:101)
|
||||
Method <acceptance.taskpreprocessing.CreateTaskPreprocessingAccTest.should_processTaskBeforeCreation_When_CreateTaskPreprocessorEnabled()> does not have name matching '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$' in (CreateTaskPreprocessingAccTest.java:61)
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
#Tue Jun 14 15:20:25 CEST 2022
|
||||
slices\ matching\ 'pro.taskana.(**)'\ should\ be\ free\ of\ cycles=2bd0065c-8c3d-40c7-8cc4-b342d55eb335
|
||||
methods\ that\ are\ annotated\ with\ @Test\ or\ annotated\ with\ @TestFactory\ or\ annotated\ with\ @TestTemplate\ and\ are\ not\ declared\ in\ acceptance.ArchitectureTest\ should\ be\ package\ private\ and\ should\ have\ name\ matching\ '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$'=00fa8b4a-898e-4789-a23a-854cd7019e95
|
||||
slices\ assigned\ from\ every\ single\ class\ should\ be\ free\ of\ cycles=abb5749f-68d1-4a65-a9e6-37468ca39b00
|
||||
no\ classes\ should\ use\ field\ injection,\ because\ field\ injection\ is\ considered\ harmful;\ use\ constructor\ injection\ or\ setter\ injection\ instead;\ see\ https\://stackoverflow.com/q/39890849\ for\ detailed\ explanations=ba13d33d-cccf-4f76-9610-d6562d07f26c
|
||||
#Mon Oct 17 04:50:12 CEST 2022
|
||||
slices\ matching\ 'pro.taskana.(**)'\ should\ be\ free\ of\ cycles=d13a8a46-5605-4062-8870-8f8de71f7b07
|
||||
methods\ that\ are\ annotated\ with\ @Test\ or\ annotated\ with\ @TestFactory\ or\ annotated\ with\ @TestTemplate\ and\ are\ not\ declared\ in\ acceptance.ArchitectureTest\ should\ be\ package\ private\ and\ should\ have\ name\ matching\ '^should_[A-Z][^_]+(_(For|When)_[A-Z][^_]+)?$'=338916cd-65eb-4545-a7be-6c7f534fde1e
|
||||
slices\ assigned\ from\ every\ single\ class\ should\ be\ free\ of\ cycles=3faafb71-7c1c-4a76-b3f4-952994afc15d
|
||||
no\ classes\ should\ use\ field\ injection,\ because\ field\ injection\ is\ considered\ harmful;\ use\ constructor\ injection\ or\ setter\ injection\ instead;\ see\ https\://stackoverflow.com/q/39890849\ for\ detailed\ explanations=caaac46d-650a-4955-a7c9-21d0bdd9e5e4
|
||||
|
|
|
@ -18,9 +18,9 @@ import static com.tngtech.archunit.library.freeze.FreezingArchRule.freeze;
|
|||
import static java.util.function.Predicate.not;
|
||||
import static java.util.stream.Collectors.toCollection;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static pro.taskana.common.internal.util.CheckedFunction.wrap;
|
||||
|
||||
import com.tngtech.archunit.base.DescribedPredicate;
|
||||
import com.tngtech.archunit.base.Optional;
|
||||
import com.tngtech.archunit.core.domain.JavaClass;
|
||||
import com.tngtech.archunit.core.domain.JavaClasses;
|
||||
import com.tngtech.archunit.core.domain.JavaField;
|
||||
|
@ -36,6 +36,7 @@ import java.lang.reflect.Method;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
@ -65,7 +66,6 @@ import pro.taskana.common.api.exceptions.TaskanaException;
|
|||
import pro.taskana.common.api.exceptions.TaskanaRuntimeException;
|
||||
import pro.taskana.common.internal.InternalTaskanaEngine;
|
||||
import pro.taskana.common.internal.logging.LoggingAspect;
|
||||
import pro.taskana.common.internal.util.CheckedFunction;
|
||||
import pro.taskana.common.internal.util.MapCreator;
|
||||
import pro.taskana.testapi.TaskanaIntegrationTest;
|
||||
|
||||
|
@ -92,8 +92,7 @@ class ArchitectureTest {
|
|||
@BeforeAll
|
||||
static void init() {
|
||||
// time intensive operation should only be done once
|
||||
importedClasses =
|
||||
new ClassFileImporter().importPackages("pro.taskana", "acceptance", "testapi");
|
||||
importedClasses = new ClassFileImporter().importPackages("pro.taskana", "acceptance");
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
@ -225,7 +224,6 @@ class ArchitectureTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Disabled("Not working as expected, see https://github.com/TNG/ArchUnit/issues/923")
|
||||
void packagesShouldBeFreeOfCyclicDependencies() {
|
||||
// Frozen, so it can be improved over time:
|
||||
// https://www.archunit.org/userguide/html/000_Index.html#_freezing_arch_rules
|
||||
|
@ -233,7 +231,6 @@ class ArchitectureTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@Disabled("Not working as expected, see https://github.com/TNG/ArchUnit/issues/923")
|
||||
void classesShouldBeFreeOfCyclicDependencies() {
|
||||
SliceAssignment everySingleClass =
|
||||
new SliceAssignment() {
|
||||
|
@ -504,7 +501,7 @@ class ArchitectureTest {
|
|||
public void check(JavaClass item, ConditionEvents events) {
|
||||
Optional<TestInstance> testInstanceOptional =
|
||||
item.tryGetAnnotationOfType(TestInstance.class);
|
||||
if (!testInstanceOptional.isPresent()
|
||||
if (testInstanceOptional.isEmpty()
|
||||
|| testInstanceOptional.get().value() != Lifecycle.PER_CLASS) {
|
||||
events.add(
|
||||
SimpleConditionEvent.violated(
|
||||
|
@ -521,7 +518,7 @@ class ArchitectureTest {
|
|||
return new DescribedPredicate<>("are nested TaskanaIntegrationTest classes") {
|
||||
|
||||
@Override
|
||||
public boolean apply(JavaClass input) {
|
||||
public boolean test(JavaClass input) {
|
||||
Optional<JavaClass> enclosingClass = input.getEnclosingClass();
|
||||
return input.isAnnotatedWith(Nested.class)
|
||||
&& enclosingClass.isPresent()
|
||||
|
@ -530,12 +527,11 @@ class ArchitectureTest {
|
|||
|
||||
private boolean isTaskanaIntegrationTest(JavaClass input) {
|
||||
Optional<JavaClass> enclosingClass = input.getEnclosingClass();
|
||||
if (enclosingClass.isPresent()) {
|
||||
return input.isAnnotatedWith(Nested.class)
|
||||
&& isTaskanaIntegrationTest(enclosingClass.get());
|
||||
} else {
|
||||
return input.isAnnotatedWith(TaskanaIntegrationTest.class);
|
||||
}
|
||||
return enclosingClass
|
||||
.map(
|
||||
javaClass ->
|
||||
input.isAnnotatedWith(Nested.class) && isTaskanaIntegrationTest(javaClass))
|
||||
.orElseGet(() -> input.isAnnotatedWith(TaskanaIntegrationTest.class));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -566,7 +562,7 @@ class ArchitectureTest {
|
|||
|
||||
private static ArchCondition<JavaClass> notUseCurrentTimestampSqlFunction() {
|
||||
Function<JavaMethod, List<String>> getSqlStringsFromMethod =
|
||||
CheckedFunction.wrap(
|
||||
wrap(
|
||||
(method) -> {
|
||||
List<String> values = new ArrayList<>();
|
||||
final Optional<Select> selectAnnotation = method.tryGetAnnotationOfType(Select.class);
|
||||
|
@ -582,42 +578,23 @@ class ArchitectureTest {
|
|||
final Optional<DeleteProvider> deleteProviderAnnotation =
|
||||
method.tryGetAnnotationOfType(DeleteProvider.class);
|
||||
|
||||
if (selectAnnotation.isPresent()) {
|
||||
values.addAll(Arrays.asList(selectAnnotation.get().value()));
|
||||
}
|
||||
if (updateAnnotation.isPresent()) {
|
||||
values.addAll(Arrays.asList(updateAnnotation.get().value()));
|
||||
}
|
||||
if (insertAnnotation.isPresent()) {
|
||||
values.addAll(Arrays.asList(insertAnnotation.get().value()));
|
||||
}
|
||||
if (deleteAnnotation.isPresent()) {
|
||||
values.addAll(Arrays.asList(deleteAnnotation.get().value()));
|
||||
}
|
||||
if (selectProviderAnnotation.isPresent()) {
|
||||
values.add(
|
||||
executeStaticProviderMethod(
|
||||
selectProviderAnnotation.get().type(),
|
||||
selectProviderAnnotation.get().method()));
|
||||
}
|
||||
if (updateProviderAnnotation.isPresent()) {
|
||||
values.add(
|
||||
executeStaticProviderMethod(
|
||||
updateProviderAnnotation.get().type(),
|
||||
updateProviderAnnotation.get().method()));
|
||||
}
|
||||
if (insertProviderAnnotation.isPresent()) {
|
||||
values.add(
|
||||
executeStaticProviderMethod(
|
||||
insertProviderAnnotation.get().type(),
|
||||
insertProviderAnnotation.get().method()));
|
||||
}
|
||||
if (deleteProviderAnnotation.isPresent()) {
|
||||
values.add(
|
||||
executeStaticProviderMethod(
|
||||
deleteProviderAnnotation.get().type(),
|
||||
deleteProviderAnnotation.get().method()));
|
||||
}
|
||||
selectAnnotation.map(Select::value).map(Arrays::asList).ifPresent(values::addAll);
|
||||
updateAnnotation.map(Update::value).map(Arrays::asList).ifPresent(values::addAll);
|
||||
insertAnnotation.map(Insert::value).map(Arrays::asList).ifPresent(values::addAll);
|
||||
deleteAnnotation.map(Delete::value).map(Arrays::asList).ifPresent(values::addAll);
|
||||
|
||||
selectProviderAnnotation
|
||||
.map(wrap(a -> executeStaticProviderMethod(a.type(), a.method())))
|
||||
.ifPresent(values::add);
|
||||
updateProviderAnnotation
|
||||
.map(wrap(a -> executeStaticProviderMethod(a.type(), a.method())))
|
||||
.ifPresent(values::add);
|
||||
insertProviderAnnotation
|
||||
.map(wrap(a -> executeStaticProviderMethod(a.type(), a.method())))
|
||||
.ifPresent(values::add);
|
||||
deleteProviderAnnotation
|
||||
.map(wrap(a -> executeStaticProviderMethod(a.type(), a.method())))
|
||||
.ifPresent(values::add);
|
||||
return values;
|
||||
});
|
||||
|
||||
|
@ -628,7 +605,7 @@ class ArchitectureTest {
|
|||
List<String> sqlStrings = getSqlStringsFromMethod.apply(method);
|
||||
|
||||
if (sqlStrings.isEmpty()
|
||||
&& !method.tryGetAnnotationOfType(SelectProvider.class).isPresent()) {
|
||||
&& method.tryGetAnnotationOfType(SelectProvider.class).isEmpty()) {
|
||||
String message =
|
||||
String.format(
|
||||
"Method '%s#%s' does not contain any MyBatis SQL annotation",
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
freeze.store.default.allowStoreCreation=true
|
||||
cycles.maxNumberToDetect=100000
|
||||
cycles.maxNumberOfDependenciesPerEdge=10000
|
||||
|
|
80
pom.xml
80
pom.xml
|
@ -83,7 +83,7 @@
|
|||
<version.arquillian.managed.wildfly>3.0.1.Final</version.arquillian.managed.wildfly>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<version.archunit>0.23.1</version.archunit>
|
||||
<version.archunit>1.0.0</version.archunit>
|
||||
<version.equalsverifier>3.10.1</version.equalsverifier>
|
||||
<version.openpojo>0.9.1</version.openpojo>
|
||||
<version.jacoco>0.8.8</version.jacoco>
|
||||
|
@ -147,51 +147,6 @@
|
|||
</dependencyManagement>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>aspectj-logging</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>!skipAspectJ</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>aspectj-maven-plugin</artifactId>
|
||||
<version>${version.aspectj-maven-plugin}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjtools</artifactId>
|
||||
<version>${version.aspectj}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<complianceLevel>${java.version}</complianceLevel>
|
||||
<source>11</source>
|
||||
<target>8</target>
|
||||
<showWeaveInfo>false</showWeaveInfo>
|
||||
<verbose>true</verbose>
|
||||
<aspectLibraries>
|
||||
<aspectLibrary>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-logging</artifactId>
|
||||
</aspectLibrary>
|
||||
</aspectLibraries>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>snapshot</id>
|
||||
<build>
|
||||
|
@ -397,6 +352,39 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>aspectj-maven-plugin</artifactId>
|
||||
<version>${version.aspectj-maven-plugin}</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjtools</artifactId>
|
||||
<version>${version.aspectj}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<complianceLevel>${java.version}</complianceLevel>
|
||||
<source>11</source>
|
||||
<target>8</target>
|
||||
<showWeaveInfo>false</showWeaveInfo>
|
||||
<verbose>true</verbose>
|
||||
<aspectLibraries>
|
||||
<aspectLibrary>
|
||||
<groupId>pro.taskana</groupId>
|
||||
<artifactId>taskana-common-logging</artifactId>
|
||||
</aspectLibrary>
|
||||
</aspectLibraries>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
<goal>test-compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -5,7 +5,6 @@ import static java.util.function.Predicate.not;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.tngtech.archunit.base.Optional;
|
||||
import com.tngtech.archunit.core.domain.JavaClass;
|
||||
import com.tngtech.archunit.core.domain.JavaClasses;
|
||||
import com.tngtech.archunit.core.importer.ClassFileImporter;
|
||||
|
@ -13,6 +12,7 @@ import com.tngtech.archunit.lang.ArchCondition;
|
|||
import com.tngtech.archunit.lang.ArchRule;
|
||||
import com.tngtech.archunit.lang.ConditionEvents;
|
||||
import com.tngtech.archunit.lang.SimpleConditionEvent;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
Loading…
Reference in New Issue