mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#1411 Fix expected line in Diagnostic after reducing the test files copyright headers
This commit is contained in:
parent
b35126e609
commit
12bfff8f46
@ -37,7 +37,7 @@ public class ReferencedAccessibilityTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperPrivate.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Unmapped target property: \"bar\"\\. Mapping from property \"org\\.mapstruct\\.ap\\" +
|
||||
".test\\.accessibility\\.referenced\\.ReferencedSource referencedSource\" to \"org\\.mapstruct\\" +
|
||||
".ap\\.test\\.accessibility\\.referenced\\.ReferencedTarget referencedTarget\"")
|
||||
@ -65,7 +65,7 @@ public class ReferencedAccessibilityTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperDefaultOther.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "Unmapped target property: \"bar\"\\. Mapping from property \"org\\.mapstruct\\.ap\\" +
|
||||
".test\\.accessibility\\.referenced\\.ReferencedSource referencedSource\" to \"org\\.mapstruct\\" +
|
||||
".ap\\.test\\.accessibility\\.referenced\\.ReferencedTarget referencedTarget\"")
|
||||
@ -88,7 +88,7 @@ public class ReferencedAccessibilityTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = AbstractSourceTargetMapperPrivate.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "Unmapped target property: \"bar\"\\. Mapping from property \"org\\.mapstruct\\.ap\\" +
|
||||
".test\\.accessibility\\.referenced\\.ReferencedSource referencedSource\" to \"org\\.mapstruct\\" +
|
||||
".ap\\.test\\.accessibility\\.referenced\\.ReferencedTarget referencedTarget\"")
|
||||
|
@ -34,7 +34,7 @@ public class Issue1005Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = Issue1005ErroneousAbstractResultTypeMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "The result type .*\\.AbstractEntity may not be an abstract class nor interface.")
|
||||
})
|
||||
public void shouldFailDueToAbstractResultType() throws Exception {
|
||||
@ -46,7 +46,7 @@ public class Issue1005Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = Issue1005ErroneousAbstractReturnTypeMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "The return type .*\\.AbstractEntity is an abstract class or interface. Provide a non" +
|
||||
" abstract / non interface result type or a factory method.")
|
||||
})
|
||||
@ -59,7 +59,7 @@ public class Issue1005Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = Issue1005ErroneousInterfaceResultTypeMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "The result type .*\\.HasPrimaryKey may not be an abstract class nor interface.")
|
||||
})
|
||||
public void shouldFailDueToInterfaceResultType() throws Exception {
|
||||
@ -71,7 +71,7 @@ public class Issue1005Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = Issue1005ErroneousInterfaceReturnTypeMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "The return type .*\\.HasKey is an abstract class or interface. Provide a non " +
|
||||
"abstract / non interface result type or a factory method.")
|
||||
})
|
||||
|
@ -28,11 +28,11 @@ public class Issue1029Test {
|
||||
|
||||
@Test
|
||||
@ExpectedCompilationOutcome(value = CompilationResult.FAILED, diagnostics = {
|
||||
@Diagnostic(kind = Kind.WARNING, line = 39, type = ErroneousIssue1029Mapper.class,
|
||||
@Diagnostic(kind = Kind.WARNING, line = 26, type = ErroneousIssue1029Mapper.class,
|
||||
messageRegExp = "Unmapped target properties: \"knownProp, lastUpdated, computedMapping\"\\."),
|
||||
@Diagnostic(kind = Kind.WARNING, line = 50, type = ErroneousIssue1029Mapper.class,
|
||||
@Diagnostic(kind = Kind.WARNING, line = 37, type = ErroneousIssue1029Mapper.class,
|
||||
messageRegExp = "Unmapped target property: \"lastUpdated\"\\."),
|
||||
@Diagnostic(kind = Kind.ERROR, line = 55, type = ErroneousIssue1029Mapper.class,
|
||||
@Diagnostic(kind = Kind.ERROR, line = 42, type = ErroneousIssue1029Mapper.class,
|
||||
messageRegExp = "Unknown property \"unknownProp\" in result type " +
|
||||
"org.mapstruct.ap.test.bugs._1029.ErroneousIssue1029Mapper.Deck\\. Did you mean \"knownProp\"?")
|
||||
})
|
||||
|
@ -26,17 +26,17 @@ public class Issue1153Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousIssue1153Mapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "Property \"readOnly\" has no write accessor in " +
|
||||
"org.mapstruct.ap.test.bugs._1153.ErroneousIssue1153Mapper.Target\\."),
|
||||
@Diagnostic(type = ErroneousIssue1153Mapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Property \"nestedTarget.readOnly\" has no write accessor in " +
|
||||
"org.mapstruct.ap.test.bugs._1153.ErroneousIssue1153Mapper.Target\\."),
|
||||
@Diagnostic(type = ErroneousIssue1153Mapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "Unknown property \"nestedTarget2.writable2\" in result type " +
|
||||
"org.mapstruct.ap.test.bugs._1153.ErroneousIssue1153Mapper.Target\\. " +
|
||||
"Did you mean \"nestedTarget2\\.writable\"")
|
||||
|
@ -32,7 +32,7 @@ public class Issue1180Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SharedConfig.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "No property named \"sourceProperty\\.nonExistant\" exists.*")
|
||||
})
|
||||
public void shouldCompileButNotGiveNullPointer() {
|
||||
|
@ -57,7 +57,7 @@ public class Issue1242Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousIssue1242MapperMultipleSources.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Ambiguous factory methods found for creating .*TargetB:"
|
||||
+ " .*TargetB anotherTargetBCreator\\(.*SourceB source\\),"
|
||||
+ " .*TargetB .*TargetFactories\\.createTargetB\\(.*SourceB source,"
|
||||
@ -66,7 +66,7 @@ public class Issue1242Test {
|
||||
+ " .*TargetB .*TargetFactories\\.createTargetB\\(\\)."),
|
||||
@Diagnostic(type = ErroneousIssue1242MapperMultipleSources.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = ".*TargetB does not have an accessible parameterless constructor\\.")
|
||||
})
|
||||
public void ambiguousMethodErrorForTwoFactoryMethodsWithSourceParam() {
|
||||
|
@ -32,7 +32,7 @@ public class Issue1283Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousInverseTargetHasNoSuitableConstructorMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35L,
|
||||
line = 22L,
|
||||
messageRegExp = ".*\\._1283\\.Source does not have an accessible parameterless constructor"
|
||||
)
|
||||
}
|
||||
@ -47,7 +47,7 @@ public class Issue1283Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousTargetHasNoSuitableConstructorMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 31L,
|
||||
line = 18L,
|
||||
messageRegExp = ".*\\._1283\\.Source does not have an accessible parameterless constructor"
|
||||
)
|
||||
}
|
||||
|
@ -34,13 +34,13 @@ public class Issue1353Test {
|
||||
diagnostics = {
|
||||
@Diagnostic (type = Issue1353Mapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "The property named \" source.string1\" has whitespaces,"
|
||||
+ " using trimmed property \"source.string1\" instead."
|
||||
),
|
||||
@Diagnostic (type = Issue1353Mapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "The property named \"string2 \" has whitespaces,"
|
||||
+ " using trimmed property \"string2\" instead."
|
||||
)
|
||||
|
@ -29,11 +29,11 @@ public class Issue631Test {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Can't generate mapping method for a generic type variable target."),
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "Can't generate mapping method for a generic type variable source.")
|
||||
}
|
||||
)
|
||||
|
@ -40,7 +40,7 @@ public class Issue880Test {
|
||||
@ExpectedCompilationOutcome(
|
||||
value = CompilationResult.SUCCEEDED,
|
||||
diagnostics = @Diagnostic(kind = Kind.WARNING,
|
||||
type = UsesConfigFromAnnotationMapper.class, line = 29,
|
||||
type = UsesConfigFromAnnotationMapper.class, line = 16,
|
||||
messageRegExp = "Unmapped target property: \"core\"\\."))
|
||||
public void compilationSucceedsAndAppliesCorrectComponentModel() {
|
||||
generatedSource.forMapper( UsesConfigFromAnnotationMapper.class ).containsNoImportFor( Component.class );
|
||||
|
@ -39,7 +39,7 @@ public class MultipleBuilderMapperTest {
|
||||
@Diagnostic(
|
||||
type = ErroneousMoreThanOneBuildMethodMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "No build method \"build\" found in \".*\\.multiple\\.build\\.Process\\.Builder\" " +
|
||||
"for \".*\\.multiple\\.build\\.Process\"\\. " +
|
||||
"Found methods: " +
|
||||
@ -50,7 +50,7 @@ public class MultipleBuilderMapperTest {
|
||||
@Diagnostic(
|
||||
type = ErroneousMoreThanOneBuildMethodMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 34,
|
||||
line = 21,
|
||||
messageRegExp = "No build method \"missingBuild\" found " +
|
||||
"in \".*\\.multiple\\.build\\.Process\\.Builder\" " +
|
||||
"for \".*\\.multiple\\.build\\.Process\"\\. " +
|
||||
@ -71,7 +71,7 @@ public class MultipleBuilderMapperTest {
|
||||
@Diagnostic(
|
||||
type = ErroneousMoreThanOneBuildMethodWithMapperDefinedMappingMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 31,
|
||||
line = 18,
|
||||
messageRegExp =
|
||||
"No build method \"mapperBuild\" found in \".*\\.multiple\\.build\\.Process\\.Builder\" " +
|
||||
"for \".*\\.multiple\\.build\\.Process\"\\. " +
|
||||
@ -118,7 +118,7 @@ public class MultipleBuilderMapperTest {
|
||||
@Diagnostic(
|
||||
type = Case.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 24,
|
||||
line = 11,
|
||||
messageRegExp = "More than one builder creation method for \".*\\.multiple\\.builder.Case\"\\. " +
|
||||
"Found methods: " +
|
||||
"\".*wrongBuilder\\(\\) ?, " +
|
||||
@ -128,7 +128,7 @@ public class MultipleBuilderMapperTest {
|
||||
@Diagnostic(
|
||||
type = Case.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 24,
|
||||
line = 11,
|
||||
messageRegExp = "More than one builder creation method for \".*\\.multiple\\.builder.Case\"\\. " +
|
||||
"Found methods: " +
|
||||
"\".*wrongBuilder\\(\\) ?, " +
|
||||
|
@ -56,7 +56,7 @@ public class SimpleImmutableBuilderTest {
|
||||
diagnostics = @Diagnostic(
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
type = ErroneousSimpleBuilderMapper.class,
|
||||
line = 34,
|
||||
line = 21,
|
||||
messageRegExp = "Unmapped target property: \"name\"\\."))
|
||||
public void testSimpleImmutableBuilderMissingPropertyFailsToCompile() {
|
||||
}
|
||||
|
@ -34,11 +34,11 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionToNonCollectionMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 28,
|
||||
line = 15,
|
||||
messageRegExp = "Can't generate mapping method from iterable type to non-iterable type"),
|
||||
@Diagnostic(type = ErroneousCollectionToNonCollectionMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "Can't generate mapping method from non-iterable type to iterable type")
|
||||
}
|
||||
)
|
||||
@ -53,7 +53,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionToPrimitivePropertyMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 26,
|
||||
line = 13,
|
||||
messageRegExp = "Can't map property \"java.util.List<java.lang.String> strings\" to \"int strings\". "
|
||||
+ "Consider to declare/implement a mapping method: \"int map\\(java.util.List<java.lang.String>"
|
||||
+ " value\\)\"")
|
||||
@ -70,7 +70,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = EmptyItererableMappingMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "'nullValueMappingStrategy','dateformat', 'qualifiedBy' and 'elementTargetType' are "
|
||||
+ "undefined in @IterableMapping, define at least one of them.")
|
||||
}
|
||||
@ -86,7 +86,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = EmptyMapMappingMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "'nullValueMappingStrategy', 'keyDateFormat', 'keyQualifiedBy', 'keyTargetType', "
|
||||
+ "'valueDateFormat', 'valueQualfiedBy' and 'valueTargetType' are all undefined in @MapMapping, "
|
||||
+ "define at least one of them.")
|
||||
@ -103,7 +103,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionNoElementMappingFound.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Can't map Collection element \".*WithProperties withProperties\" to \".*NoProperties" +
|
||||
" noProperties\". Consider to declare/implement a mapping method: \".*NoProperties map\\(" +
|
||||
".*WithProperties value\\)")
|
||||
@ -120,7 +120,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionNoElementMappingFoundDisabledAuto.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp =
|
||||
"Can't map collection element \".*AttributedString\" to \".*String \". " +
|
||||
"Consider to declare/implement a mapping method: \".*String map\\(.*AttributedString value\\)")
|
||||
@ -137,7 +137,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionNoKeyMappingFound.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Can't map Map key \".*WithProperties withProperties\" to \".*NoProperties " +
|
||||
"noProperties\". Consider to declare/implement a mapping method: \".*NoProperties map\\(" +
|
||||
".*WithProperties value\\)")
|
||||
@ -154,7 +154,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionNoKeyMappingFoundDisabledAuto.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "Can't map map key \".*AttributedString\" to \".*String \". " +
|
||||
"Consider to declare/implement a mapping method: \".*String map\\(.*AttributedString value\\)")
|
||||
}
|
||||
@ -170,7 +170,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionNoValueMappingFound.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Can't map Map value \".*WithProperties withProperties\" to \".*NoProperties " +
|
||||
"noProperties\". Consider to declare/implement a mapping method: \".*NoProperties map\\(" +
|
||||
".*WithProperties value\\)")
|
||||
@ -187,7 +187,7 @@ public class ErroneousCollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionNoValueMappingFoundDisabledAuto.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "Can't map map value \".*AttributedString\" to \".*String \". " +
|
||||
"Consider to declare/implement a mapping method: \".*String map(.*AttributedString value)")
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public class CollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionNonMappableSetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "Can't map Collection element \".* nonMappableSet\" to \".* nonMappableSet\". "
|
||||
+ "Consider to declare/implement a mapping method: .*."),
|
||||
}
|
||||
@ -106,12 +106,12 @@ public class CollectionMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCollectionNonMappableMapMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "Can't map Map key \".* nonMappableMap\\{:key\\}\" to \".* nonMappableMap\\{:key\\}\". "
|
||||
+ "Consider to declare/implement a mapping method: .*."),
|
||||
@Diagnostic(type = ErroneousCollectionNonMappableMapMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "Can't map Map value \".* nonMappableMap\\{:value\\}\" to \".* " +
|
||||
"nonMappableMap\\{:value\\}\". Consider to declare/implement a mapping method: .*."),
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class ImmutableProductTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCupboardMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "No write accessor found for property \"content\" in target type.")
|
||||
}
|
||||
)
|
||||
|
@ -86,7 +86,7 @@ public class WildCardTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ErroneousIterableSuperBoundSourceMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't generate mapping method for a wildcard super bound source." )
|
||||
}
|
||||
)
|
||||
@ -100,7 +100,7 @@ public class WildCardTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ErroneousIterableExtendsBoundTargetMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't generate mapping method for a wildcard extends bound result." )
|
||||
}
|
||||
)
|
||||
@ -114,7 +114,7 @@ public class WildCardTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousIterableTypeVarBoundMapperOnMethod.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't generate mapping method for a generic type variable target." )
|
||||
}
|
||||
)
|
||||
@ -128,7 +128,7 @@ public class WildCardTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ErroneousIterableTypeVarBoundMapperOnMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't generate mapping method for a generic type variable source." )
|
||||
}
|
||||
)
|
||||
|
@ -39,7 +39,7 @@ public class ContextParameterErroneousTest {
|
||||
@ExpectedCompilationOutcome(value = CompilationResult.FAILED,
|
||||
diagnostics = @Diagnostic(
|
||||
kind = Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
type = ErroneousNodeMapperWithNonUniqueContextTypes.class,
|
||||
messageRegExp = "The types of @Context parameters must be unique"))
|
||||
public void reportsNonUniqueContextParamType() {
|
||||
|
@ -32,51 +32,51 @@ public class InvalidDateFormatTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern character 'q'\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 39,
|
||||
line = 26,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Unknown pattern letter: r\"\\."),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 27,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Unknown pattern letter: r\"\\."),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 28,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Unknown pattern letter: r\"\\."),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Unknown pattern letter: r\"\\."),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 30,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern component: q\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 31,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern component: q\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 32,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern component: q\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern component: q\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 37,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern character 'q'\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 40,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Unknown pattern letter: r\"\\."),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 41,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Unknown pattern letter: r\"\\."),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 42,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Unknown pattern letter: r\"\\."),
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern character 'q'\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 43,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern component: q\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 44,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern component: q\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 45,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern component: q\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 46,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern component: q\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 50,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern character 'q'\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 53,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern character 'q'\""),
|
||||
@Diagnostic(type = ErroneousFormatMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 56,
|
||||
messageRegExp = "Given date format \"qwertz\" is invalid. Message: \"Illegal pattern character 'q'\"")
|
||||
})
|
||||
@Test
|
||||
|
@ -181,7 +181,7 @@ public class DecoratorTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousPersonMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 27,
|
||||
line = 14,
|
||||
messageRegExp = "Specified decorator type is no subtype of the annotated mapper type")
|
||||
}
|
||||
)
|
||||
|
@ -125,12 +125,12 @@ public class DefaultValueTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ErroneousMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 31,
|
||||
line = 18,
|
||||
messageRegExp = "Constant and default value are both defined in @Mapping,"
|
||||
+ " either define a defaultValue or a constant." ),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't map property \".*Region region\" to \".*String region\"\\. Consider")
|
||||
}
|
||||
)
|
||||
@ -147,12 +147,12 @@ public class DefaultValueTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ErroneousMapper2.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 31,
|
||||
line = 18,
|
||||
messageRegExp = "Expression and default value are both defined in @Mapping,"
|
||||
+ " either define a defaultValue or an expression." ),
|
||||
@Diagnostic(type = ErroneousMapper2.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't map property \".*Region region\" to \".*String region\"\\. Consider")
|
||||
}
|
||||
)
|
||||
|
@ -62,7 +62,7 @@ public class OrderingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousAddressMapperWithCyclicDependency.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "Cycle\\(s\\) between properties given via dependsOn\\(\\): firstName -> lastName -> "
|
||||
+ "middleName -> firstName"
|
||||
)
|
||||
@ -79,7 +79,7 @@ public class OrderingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousAddressMapperWithUnknownPropertyInDependsOn.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "\"doesnotexist\" is no property of the method return type"
|
||||
)
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public class EnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = OrderMapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 41,
|
||||
line = 28,
|
||||
messageRegExp = "Mapping of Enums via @Mapping is going to be removed in future versions of "
|
||||
+ "MapStruct\\. Please use @ValueMapping instead!")
|
||||
}
|
||||
@ -55,7 +55,7 @@ public class EnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = OrderMapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 41,
|
||||
line = 28,
|
||||
messageRegExp = "Mapping of Enums via @Mapping is going to be removed in future versions of "
|
||||
+ "MapStruct\\. Please use @ValueMapping instead!")
|
||||
}
|
||||
@ -78,7 +78,7 @@ public class EnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = OrderMapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 41,
|
||||
line = 28,
|
||||
messageRegExp = "Mapping of Enums via @Mapping is going to be removed in future versions of "
|
||||
+ "MapStruct\\. Please use @ValueMapping instead!")
|
||||
}
|
||||
@ -100,12 +100,12 @@ public class EnumMappingTest {
|
||||
|
||||
@Diagnostic(type = ErroneousOrderMapperMappingSameConstantTwice.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 42,
|
||||
line = 29,
|
||||
messageRegExp = "One enum constant must not be mapped to more than one target constant, but " +
|
||||
"constant EXTRA is mapped to SPECIAL, DEFAULT\\."),
|
||||
@Diagnostic(type = ErroneousOrderMapperMappingSameConstantTwice.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 42,
|
||||
line = 29,
|
||||
messageRegExp = "Mapping of Enums via @Mapping is going to be removed in future versions of "
|
||||
+ "MapStruct\\. Please use @ValueMapping instead!")
|
||||
}
|
||||
@ -120,16 +120,16 @@ public class EnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousOrderMapperUsingUnknownEnumConstants.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 40,
|
||||
line = 27,
|
||||
messageRegExp = "Mapping of Enums via @Mapping is going to be removed in future versions of "
|
||||
+ "MapStruct\\. Please use @ValueMapping instead!"),
|
||||
@Diagnostic(type = ErroneousOrderMapperUsingUnknownEnumConstants.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "Constant FOO doesn't exist in enum type org.mapstruct.ap.test.enums.OrderType\\."),
|
||||
@Diagnostic(type = ErroneousOrderMapperUsingUnknownEnumConstants.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Constant BAR doesn't exist in enum type org.mapstruct.ap.test.enums." +
|
||||
"ExternalOrderType\\.")
|
||||
}
|
||||
@ -144,7 +144,7 @@ public class EnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousOrderMapperNotMappingConstantWithoutMatchInTargetType.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 34,
|
||||
line = 21,
|
||||
messageRegExp = "The following constants from the source enum have no corresponding constant in the " +
|
||||
"target enum and must be be mapped via adding additional mappings: EXTRA, STANDARD, NORMAL")
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public class AmbiguousAnnotatedFactoryTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperAndBarFactory.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Ambiguous factory methods found for creating "
|
||||
+ "org.mapstruct.ap.test.erroneous.ambiguousannotatedfactorymethod.Bar: "
|
||||
+ "org.mapstruct.ap.test.erroneous.ambiguousannotatedfactorymethod.Bar "
|
||||
@ -39,7 +39,7 @@ public class AmbiguousAnnotatedFactoryTest {
|
||||
+ "ambiguousannotatedfactorymethod.Foo foo\\)."),
|
||||
@Diagnostic(type = SourceTargetMapperAndBarFactory.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = ".*\\.ambiguousannotatedfactorymethod.Bar does not have an accessible parameterless " +
|
||||
"constructor\\.")
|
||||
|
||||
|
@ -33,14 +33,14 @@ public class FactoryTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperAndBarFactory.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Ambiguous factory methods found for creating "
|
||||
+ "org.mapstruct.ap.test.erroneous.ambiguousfactorymethod.Bar: "
|
||||
+ "org.mapstruct.ap.test.erroneous.ambiguousfactorymethod.Bar createBar\\(\\), "
|
||||
+ "org.mapstruct.ap.test.erroneous.ambiguousfactorymethod.Bar .*BarFactory.createBar\\(\\)."),
|
||||
@Diagnostic(type = SourceTargetMapperAndBarFactory.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = ".*\\.ambiguousfactorymethod\\.Bar does not have an accessible parameterless "
|
||||
+ "constructor\\.")
|
||||
|
||||
|
@ -32,7 +32,7 @@ public class AnnotationNotFoundTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "NotFoundAnnotation")
|
||||
}
|
||||
)
|
||||
|
@ -33,26 +33,26 @@ public class ErroneousMappingsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "No property named \"bar\" exists in source parameter\\(s\\)\\. " +
|
||||
"Did you mean \"foo\"?"),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "No property named \"source1.foo\" exists in source parameter\\(s\\)\\. " +
|
||||
"Did you mean \"foo\"?"),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 31,
|
||||
line = 18,
|
||||
messageRegExp = "Unknown property \"bar\" in result type " +
|
||||
"org.mapstruct.ap.test.erroneous.attributereference.Target. Did you mean \"foo\"?"),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Target property \"foo\" must not be mapped more than once"),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Unmapped target property: \"bar\"")
|
||||
}
|
||||
)
|
||||
@ -66,7 +66,7 @@ public class ErroneousMappingsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper1.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "The type of parameter \"source\" has no property named \"foobar\"")
|
||||
}
|
||||
)
|
||||
@ -80,7 +80,7 @@ public class ErroneousMappingsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper2.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "Target property \"foo\" must not be mapped more than once" )
|
||||
}
|
||||
)
|
||||
|
@ -32,25 +32,25 @@ public class ErroneousMappingsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 27,
|
||||
line = 14,
|
||||
messageRegExp = "Can't map property \"boolean foo\" to \"int foo\". Consider to declare/implement a "
|
||||
+ "mapping method: \"int map\\(boolean value\\)\"."),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \"int foo\" to \"boolean foo\". Consider to declare/implement a "
|
||||
+ "mapping method: \"boolean map\\(int value\\)\"."),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 31,
|
||||
line = 18,
|
||||
messageRegExp = "Can't generate mapping method with primitive return type\\."),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't generate mapping method with primitive parameter type\\."),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp =
|
||||
"Can't generate mapping method that has a parameter annotated with @TargetType\\.")
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class IgnorePropertyTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousTargetHasNoWriteAccessorMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Property \"hasClaws\" has no write accessor in " +
|
||||
"org.mapstruct.ap.test.ignore.PreditorDto\\.")
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class AttributeInheritanceTest {
|
||||
diagnostics = @Diagnostic(
|
||||
type = ErroneousTargetSourceMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \"java.lang.CharSequence foo\" to \"java.lang.String foo\""
|
||||
))
|
||||
public void shouldReportErrorDueToUnmappableAttribute() {
|
||||
|
@ -68,7 +68,7 @@ public class ComplexInheritanceTest {
|
||||
diagnostics = @Diagnostic(
|
||||
kind = Kind.ERROR,
|
||||
type = ErroneousSourceCompositeTargetCompositeMapper.class,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp =
|
||||
"Ambiguous mapping methods found for mapping property "
|
||||
+ "\"org.mapstruct.ap.test.inheritance.complex.SourceExt prop1\" to .*Reference: "
|
||||
|
@ -202,25 +202,25 @@ public class InheritFromConfigTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = Erroneous1Mapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "More than one configuration prototype method is applicable. Use @InheritConfiguration"
|
||||
+ " to select one of them explicitly:"
|
||||
+ " .*BaseVehicleEntity baseDtoToEntity\\(.*BaseVehicleDto dto\\),"
|
||||
+ " .*BaseVehicleEntity anythingToEntity\\(java.lang.Object anyting\\)\\."),
|
||||
@Diagnostic(type = Erroneous1Mapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "Unmapped target properties: \"primaryKey, auditTrail\"\\."),
|
||||
@Diagnostic(type = Erroneous1Mapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 42,
|
||||
line = 29,
|
||||
messageRegExp = "More than one configuration prototype method is applicable. Use @InheritConfiguration"
|
||||
+ " to select one of them explicitly:"
|
||||
+ " .*BaseVehicleEntity baseDtoToEntity\\(.*BaseVehicleDto dto\\),"
|
||||
+ " .*BaseVehicleEntity anythingToEntity\\(java.lang.Object anyting\\)\\."),
|
||||
@Diagnostic(type = Erroneous1Mapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 42,
|
||||
line = 29,
|
||||
messageRegExp = "Unmapped target property: \"primaryKey\"\\.")
|
||||
}
|
||||
)
|
||||
@ -235,7 +235,7 @@ public class InheritFromConfigTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = Erroneous2Mapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Cycle detected while evaluating inherited configurations. Inheritance path:"
|
||||
+ " .*CarEntity toCarEntity1\\(.*CarDto carDto\\)"
|
||||
+ " -> .*CarEntity toCarEntity2\\(.*CarDto carDto\\)"
|
||||
@ -255,7 +255,7 @@ public class InheritFromConfigTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapperAutoInheritance.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Unmapped target properties: \"primaryKey, auditTrail\"\\.")
|
||||
}
|
||||
)
|
||||
@ -269,7 +269,7 @@ public class InheritFromConfigTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapperReverseWithAutoInheritance.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "Unmapped target property: \"id\"\\.")
|
||||
}
|
||||
)
|
||||
@ -283,12 +283,12 @@ public class InheritFromConfigTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = Erroneous3Mapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "More than one configuration prototype method is applicable. "
|
||||
+ "Use @InheritInverseConfiguration.*"),
|
||||
@Diagnostic(type = Erroneous3Mapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Unmapped target property: \"id\"\\.")
|
||||
}
|
||||
)
|
||||
|
@ -41,11 +41,11 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStreamToNonStreamMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 28,
|
||||
line = 15,
|
||||
messageRegExp = "Can't generate mapping method from iterable type to non-iterable type"),
|
||||
@Diagnostic(type = ErroneousStreamToNonStreamMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "Can't generate mapping method from non-iterable type to iterable type")
|
||||
}
|
||||
)
|
||||
@ -59,7 +59,7 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStreamToPrimitivePropertyMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 26,
|
||||
line = 13,
|
||||
messageRegExp =
|
||||
"Can't map property \"java.util.stream.Stream<java.lang.String> strings\" to \"int strings\". "
|
||||
+
|
||||
@ -78,17 +78,17 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = EmptyStreamMappingMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "'nullValueMappingStrategy','dateformat', 'qualifiedBy' and 'elementTargetType' are "
|
||||
+ "undefined in @IterableMapping, define at least one of them."),
|
||||
@Diagnostic(type = EmptyStreamMappingMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 39,
|
||||
line = 26,
|
||||
messageRegExp = "'nullValueMappingStrategy','dateformat', 'qualifiedBy' and 'elementTargetType' are "
|
||||
+ "undefined in @IterableMapping, define at least one of them."),
|
||||
@Diagnostic(type = EmptyStreamMappingMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 42,
|
||||
line = 29,
|
||||
messageRegExp = "'nullValueMappingStrategy','dateformat', 'qualifiedBy' and 'elementTargetType' are "
|
||||
+ "undefined in @IterableMapping, define at least one of them.")
|
||||
}
|
||||
@ -103,7 +103,7 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStreamToStreamNoElementMappingFound.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "Can't map Stream element \".*WithProperties withProperties\" to \".*NoProperties " +
|
||||
"noProperties\". Consider to declare/implement a mapping method: \".*NoProperties map\\(" +
|
||||
".*WithProperties value\\)")
|
||||
@ -120,7 +120,7 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStreamToStreamNoElementMappingFoundDisabledAuto.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "Can't map stream element \".*AttributedString\" to \".*String \". Consider to " +
|
||||
"declare/implement a mapping method: \".*String map(.*AttributedString value)")
|
||||
}
|
||||
@ -135,7 +135,7 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousListToStreamNoElementMappingFound.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp =
|
||||
"Can't map Stream element \".*WithProperties withProperties\" to \".*NoProperties noProperties\"." +
|
||||
" Consider to declare/implement a mapping method: \".*NoProperties map\\(.*WithProperties " +
|
||||
@ -153,7 +153,7 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousListToStreamNoElementMappingFoundDisabledAuto.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't map stream element \".*AttributedString\" to \".*String \". Consider to " +
|
||||
"declare/implement a mapping method: \".*String map\\(.*AttributedString value\\)")
|
||||
}
|
||||
@ -168,7 +168,7 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStreamToListNoElementMappingFound.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp =
|
||||
"Can't map Stream element \".*WithProperties withProperties\" to .*NoProperties noProperties\"." +
|
||||
" Consider to declare/implement a mapping method: \".*NoProperties map(.*WithProperties value)")
|
||||
@ -185,7 +185,7 @@ public class ErroneousStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStreamToListNoElementMappingFoundDisabledAuto.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Can't map stream element \".*AttributedString\" to .*String \". Consider to " +
|
||||
"declare/implement a mapping method: \".*String map(.*AttributedString value)")
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ public class ForgedStreamMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStreamNonMappableStreamMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "Can't map Stream element \".* nonMappableStream\" to \".* nonMappableStream\". "
|
||||
+ "Consider to declare/implement a mapping method: .*."),
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class WildCardTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousIterableSuperBoundSourceMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 34,
|
||||
line = 21,
|
||||
messageRegExp = "Can't generate mapping method for a wildcard super bound source.")
|
||||
}
|
||||
)
|
||||
@ -84,7 +84,7 @@ public class WildCardTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousIterableExtendsBoundTargetMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 34,
|
||||
line = 21,
|
||||
messageRegExp = "Can't generate mapping method for a wildcard extends bound result.")
|
||||
}
|
||||
)
|
||||
@ -98,7 +98,7 @@ public class WildCardTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousIterableTypeVarBoundMapperOnMethod.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 34,
|
||||
line = 21,
|
||||
messageRegExp = "Can't generate mapping method for a generic type variable target.")
|
||||
}
|
||||
)
|
||||
@ -112,7 +112,7 @@ public class WildCardTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousIterableTypeVarBoundMapperOnMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 34,
|
||||
line = 21,
|
||||
messageRegExp = "Can't generate mapping method for a generic type variable source.")
|
||||
}
|
||||
)
|
||||
|
@ -57,7 +57,7 @@ public class ConfigTest {
|
||||
@ExpectedCompilationOutcome(value = CompilationResult.SUCCEEDED,
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperWarn.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING, line = 37,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING, line = 24,
|
||||
messageRegExp = "Unmapped target property: \"noFoo\"")
|
||||
})
|
||||
public void shouldUseWARNViaMapper() {
|
||||
@ -68,7 +68,7 @@ public class ConfigTest {
|
||||
@ExpectedCompilationOutcome(value = CompilationResult.FAILED,
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperErroneous.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR, line = 33,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR, line = 20,
|
||||
messageRegExp = "Unmapped target property: \"noFoo\"")
|
||||
})
|
||||
public void shouldUseERRORViaMapperConfig() {
|
||||
|
@ -32,7 +32,7 @@ public class SuggestMostSimilarNameTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = PersonAgeMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = ".*Did you mean \"age\"\\?")
|
||||
}
|
||||
)
|
||||
@ -48,7 +48,7 @@ public class SuggestMostSimilarNameTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = PersonNameMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = ".*Did you mean \"fullName\"\\?")
|
||||
}
|
||||
)
|
||||
@ -64,11 +64,11 @@ public class SuggestMostSimilarNameTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = PersonGarageWrongTargetMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "Unknown property \"garage\\.colour\\.rgb\".*Did you mean \"garage\\.color\"\\?"),
|
||||
@Diagnostic(type = PersonGarageWrongTargetMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Unknown property \"garage\\.colour\".*Did you mean \"garage\\.color\"\\?")
|
||||
}
|
||||
)
|
||||
@ -84,11 +84,11 @@ public class SuggestMostSimilarNameTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = PersonGarageWrongSourceMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "No property named \"garage\\.colour\\.rgb\".*Did you mean \"garage\\.color\"\\?"),
|
||||
@Diagnostic(type = PersonGarageWrongSourceMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "No property named \"garage\\.colour\".*Did you mean \"garage\\.color\"\\?")
|
||||
}
|
||||
)
|
||||
|
@ -32,7 +32,7 @@ public class DisablingNestedSimpleBeansMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousDisabledHouseMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \".*\\.Roof roof\" to \".*\\.RoofDto roof\"\\. Consider to " +
|
||||
"declare/implement a mapping method: \".*\\.RoofDto map\\(.*\\.Roof value\\)\"\\."
|
||||
)
|
||||
@ -49,7 +49,7 @@ public class DisablingNestedSimpleBeansMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousDisabledViaConfigHouseMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \".*\\.Roof roof\" to \".*\\.RoofDto roof\"\\. Consider to " +
|
||||
"declare/implement a mapping method: \".*\\.RoofDto map\\(.*\\.Roof value\\)\"\\."
|
||||
)
|
||||
|
@ -99,7 +99,7 @@ public class DottedErrorMessageTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = BaseDeepNestingMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"rgb\"\\. Mapping from " + PROPERTY +
|
||||
" \".*Color house\\.roof\\.color\" to \".*ColorDto house\\.roof\\.color\"\\.")
|
||||
}
|
||||
@ -116,7 +116,7 @@ public class DottedErrorMessageTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = BaseDeepListMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"left\"\\. Mapping from " + COLLECTION_ELEMENT +
|
||||
" \".*Wheel car\\.wheels\" to \".*WheelDto car\\.wheels\"\\.")
|
||||
}
|
||||
@ -133,7 +133,7 @@ public class DottedErrorMessageTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = BaseDeepMapKeyMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"pronunciation\"\\. Mapping from " + MAP_KEY +
|
||||
" \".*Word dictionary\\.wordMap\\{:key\\}\" to \".*WordDto dictionary\\.wordMap\\{:key\\}\"\\.")
|
||||
}
|
||||
@ -150,7 +150,7 @@ public class DottedErrorMessageTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = BaseDeepMapValueMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"pronunciation\"\\. Mapping from " + MAP_VALUE +
|
||||
" \".*ForeignWord dictionary\\.wordMap\\{:value\\}\" " +
|
||||
"to \".*ForeignWordDto dictionary\\.wordMap\\{:value\\}\"\\.")
|
||||
@ -168,7 +168,7 @@ public class DottedErrorMessageTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = BaseCollectionElementPropertyMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"color\"\\. Mapping from " + PROPERTY +
|
||||
" \".*Info computers\\[\\].info\" to \".*InfoDto computers\\[\\].info\"\\.")
|
||||
}
|
||||
@ -185,7 +185,7 @@ public class DottedErrorMessageTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = BaseValuePropertyMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"color\"\\. Mapping from " + PROPERTY +
|
||||
" \".*Info catNameMap\\{:value\\}.info\" to \".*InfoDto catNameMap\\{:value\\}.info\"\\.")
|
||||
}
|
||||
@ -202,7 +202,7 @@ public class DottedErrorMessageTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = UnmappableEnumMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "The following constants from the property \".*RoofType house\\.roof\\.type\" enum " +
|
||||
"have no corresponding constant in the \".*ExternalRoofType house\\.roof\\.type\" enum and must " +
|
||||
"be be mapped via adding additional mappings: NORMAL\\."
|
||||
@ -226,33 +226,33 @@ public class DottedErrorMessageTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = BaseDeepNestingMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"rgb\"\\. Mapping from " + PROPERTY +
|
||||
" \".*Color house\\.roof\\.color\" to \".*ColorDto house\\.roof\\.color\"\\."),
|
||||
@Diagnostic(type = BaseDeepListMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"left\"\\. Mapping from " + COLLECTION_ELEMENT +
|
||||
" \".*Wheel car\\.wheels\" to \".*WheelDto car\\.wheels\"\\."),
|
||||
@Diagnostic(type = BaseDeepMapKeyMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"pronunciation\"\\. Mapping from " + MAP_KEY +
|
||||
" \".*Word dictionary\\.wordMap\\{:key\\}\" to \".*WordDto dictionary\\.wordMap\\{:key\\}\"\\."),
|
||||
@Diagnostic(type = BaseDeepMapValueMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"pronunciation\"\\. Mapping from " + MAP_VALUE +
|
||||
" \".*ForeignWord dictionary\\.wordMap\\{:value\\}\" " +
|
||||
"to \".*ForeignWordDto dictionary\\.wordMap\\{:value\\}\"\\."),
|
||||
@Diagnostic(type = BaseCollectionElementPropertyMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"color\"\\. Mapping from " + PROPERTY +
|
||||
" \".*Info computers\\[\\].info\" to \".*InfoDto computers\\[\\].info\"\\."),
|
||||
@Diagnostic(type = BaseValuePropertyMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 23,
|
||||
line = 10,
|
||||
messageRegExp = "Unmapped target property: \"color\"\\. Mapping from " + PROPERTY +
|
||||
" \".*Info catNameMap\\{:value\\}.info\" to \".*InfoDto catNameMap\\{:value\\}.info\"\\.")
|
||||
}
|
||||
|
@ -30,24 +30,24 @@ public class ErroneousJavaInternalTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousJavaInternalMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \".*MyType date\" to \"java\\.util\\.Date date\"\\. Consider to " +
|
||||
"declare/implement a mapping method: \"java\\.util\\.Date map\\(.*MyType value\\)\"\\."),
|
||||
@Diagnostic(type = ErroneousJavaInternalMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \".*MyType calendar\" to \"java\\.util\\.GregorianCalendar " +
|
||||
"calendar\"\\. Consider to declare/implement a mapping method: \"java\\.util\\.GregorianCalendar " +
|
||||
"map\\(.*MyType value\\)\"\\."),
|
||||
@Diagnostic(type = ErroneousJavaInternalMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \".*List<.*MyType> types\" to \".*List<.*String> types\"\\" +
|
||||
". Consider to declare/implement a mapping method: \".*List<.*String> map\\(.*List<.*MyType> " +
|
||||
"value\\)\"\\."),
|
||||
@Diagnostic(type = ErroneousJavaInternalMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \".*List<.*MyType> nestedMyType\\.deepNestedType\\.types\" to \"" +
|
||||
".*List<.*String> nestedMyType\\.deepNestedType\\.types\"\\. Consider to declare/implement a " +
|
||||
"mapping method: \".*List<.*String> map\\(.*List<.*MyType> value\\)\"\\.")
|
||||
|
@ -32,7 +32,7 @@ public class ErroneousCustomExclusionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousCustomExclusionMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "Can't map property \".*NestedSource nested\" to \".*NestedTarget nested\"\\. " +
|
||||
"Consider to declare/implement a mapping method: \".*NestedTarget map\\(.*NestedSource value\\)" +
|
||||
"\"\\.")
|
||||
|
@ -170,7 +170,7 @@ public class NestedSourcePropertiesTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ArtistToChartEntryErroneous.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 47,
|
||||
line = 34,
|
||||
messageRegExp = "java.lang.Integer does not have an accessible parameterless constructor." )
|
||||
}
|
||||
)
|
||||
|
@ -60,12 +60,12 @@ public class InheritInverseConfigurationTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous1.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 51,
|
||||
line = 38,
|
||||
messageRegExp = "Several matching inverse methods exist: forward\\(\\), "
|
||||
+ "forwardNotToReverse\\(\\). Specify a name explicitly."),
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous1.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 56,
|
||||
line = 43,
|
||||
messageRegExp = "Unmapped target properties: \"stringPropX, integerPropX\"")
|
||||
}
|
||||
)
|
||||
@ -79,12 +79,12 @@ public class InheritInverseConfigurationTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous2.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 51,
|
||||
line = 38,
|
||||
messageRegExp = "None of the candidates forward\\(\\), forwardNotToReverse\\(\\) matches given "
|
||||
+ "name: \"blah\"."),
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous2.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 56,
|
||||
line = 43,
|
||||
messageRegExp = "Unmapped target properties: \"stringPropX, integerPropX\"")
|
||||
}
|
||||
)
|
||||
@ -98,12 +98,12 @@ public class InheritInverseConfigurationTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous3.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 52,
|
||||
line = 39,
|
||||
messageRegExp = "Given name \"forward\" matches several candidate methods: .*forward\\(.+\\), "
|
||||
+ ".*forward\\(.+\\)"),
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous3.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 57,
|
||||
line = 44,
|
||||
messageRegExp = "Unmapped target properties: \"stringPropX, integerPropX\"")
|
||||
}
|
||||
)
|
||||
@ -117,12 +117,12 @@ public class InheritInverseConfigurationTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperNonMatchingName.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 44,
|
||||
line = 31,
|
||||
messageRegExp = "Given name \"blah\" does not match the only candidate. Did you mean: "
|
||||
+ "\"forward\"."),
|
||||
@Diagnostic(type = SourceTargetMapperNonMatchingName.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 49,
|
||||
line = 36,
|
||||
messageRegExp = "Unmapped target properties: \"stringPropX, integerPropX\"")
|
||||
}
|
||||
)
|
||||
|
@ -84,7 +84,7 @@ public class ConversionTest {
|
||||
@ExpectedCompilationOutcome(value = CompilationResult.FAILED,
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper1.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR, line = 29,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR, line = 16,
|
||||
messageRegExp = "Can't map property \"org.mapstruct.ap.test.selection.generics.UpperBoundWrapper"
|
||||
+ "<org.mapstruct.ap.test.selection.generics.TypeA> fooUpperBoundFailure\" to "
|
||||
+ "\"org.mapstruct.ap.test.selection.generics.TypeA fooUpperBoundFailure\"")
|
||||
@ -98,7 +98,7 @@ public class ConversionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper2.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \"org.mapstruct.ap.test.selection.generics.WildCardExtendsWrapper"
|
||||
+ "<org.mapstruct.ap.test.selection.generics.TypeA> fooWildCardExtendsTypeAFailure\" to"
|
||||
+ " \"org.mapstruct.ap.test.selection.generics.TypeA fooWildCardExtendsTypeAFailure\"")
|
||||
@ -112,7 +112,7 @@ public class ConversionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper3.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \"org.mapstruct.ap.test.selection.generics."
|
||||
+ "WildCardExtendsMBWrapper<org.mapstruct.ap.test.selection.generics.TypeB> "
|
||||
+ "fooWildCardExtendsMBTypeBFailure\" to \"org.mapstruct.ap.test.selection.generics.TypeB "
|
||||
@ -127,7 +127,7 @@ public class ConversionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper4.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \"org.mapstruct.ap.test.selection.generics.WildCardSuperWrapper"
|
||||
+ "<org.mapstruct.ap.test.selection.generics.TypeA> fooWildCardSuperTypeAFailure\" to"
|
||||
+ " \"org.mapstruct.ap.test.selection.generics.TypeA fooWildCardSuperTypeAFailure\"")
|
||||
@ -141,7 +141,7 @@ public class ConversionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper5.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \"org.mapstruct.ap.test.selection.generics.WildCardSuperWrapper"
|
||||
+ "<org.mapstruct.ap.test.selection.generics.TypeC> fooWildCardSuperTypeCFailure\" to"
|
||||
+ " \"org.mapstruct.ap.test.selection.generics.TypeC fooWildCardSuperTypeCFailure\"")
|
||||
@ -160,14 +160,14 @@ public class ConversionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper6.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Can't map property \".*NoProperties "
|
||||
+ "foo\\.wrapped\" to"
|
||||
+ " \"org.mapstruct.ap.test.selection.generics.TypeA " +
|
||||
"foo\\.wrapped\""),
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper6.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = ".*\\.generics\\.WildCardSuperWrapper<.*\\.generics\\.TypeA> does not have an " +
|
||||
"accessible parameterless constructor\\.")
|
||||
|
||||
|
@ -100,7 +100,7 @@ public class QualifierTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 42,
|
||||
line = 29,
|
||||
messageRegExp = "Ambiguous mapping methods found for mapping property "
|
||||
+ "\"java.lang.String title\" to java.lang.String.*" )
|
||||
}
|
||||
@ -173,12 +173,12 @@ public class QualifierTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMovieFactoryMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "'nullValueMappingStrategy', 'resultType' and 'qualifiedBy' are undefined in " +
|
||||
"@BeanMapping, define at least one of them."),
|
||||
@Diagnostic(type = ErroneousMovieFactoryMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "The return type .*\\.AbstractEntry is an abstract class or interface. Provide a non " +
|
||||
"abstract / non interface result type or a factory method.")
|
||||
}
|
||||
|
@ -44,13 +44,13 @@ public class InheritanceSelectionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousFruitMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "Ambiguous factory methods found for creating .*Fruit: "
|
||||
+ ".*Apple .*ConflictingFruitFactory\\.createApple\\(\\), "
|
||||
+ ".*Banana .*ConflictingFruitFactory\\.createBanana\\(\\)\\."),
|
||||
@Diagnostic(type = ErroneousFruitMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = ".*Fruit does not have an accessible parameterless constructor\\.")
|
||||
}
|
||||
)
|
||||
@ -65,7 +65,7 @@ public class InheritanceSelectionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousResultTypeNoEmptyConstructorMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 31,
|
||||
line = 18,
|
||||
messageRegExp = ".*\\.resulttype\\.Banana does not have an accessible parameterless constructor\\.")
|
||||
}
|
||||
)
|
||||
@ -111,7 +111,7 @@ public class InheritanceSelectionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ResultTypeConstructingFruitInterfaceErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "The return type .*\\.IsFruit is an abstract class or interface. Provide a non " +
|
||||
"abstract / non interface result type or a factory method."
|
||||
)
|
||||
@ -128,7 +128,7 @@ public class InheritanceSelectionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousFruitMapper2.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = ".*\\.Banana not assignable to: .*\\.Apple.")
|
||||
}
|
||||
)
|
||||
|
@ -142,15 +142,15 @@ public class SeveralSourceParametersTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Several possible source properties for target property \"street\"."),
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Several possible source properties for target property \"zipCode\"."),
|
||||
@Diagnostic(type = ErroneousSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Several possible source properties for target property \"description\".")
|
||||
})
|
||||
public void shouldFailToGenerateMappingsForAmbigiousSourceProperty() {
|
||||
@ -169,7 +169,7 @@ public class SeveralSourceParametersTest {
|
||||
@Diagnostic(
|
||||
type = ErroneousSourceTargetMapper2.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 28,
|
||||
line = 15,
|
||||
messageRegExp = "Method has no source parameter named \"houseNo\"\\." +
|
||||
" Method source parameters are: \"address, person\"\\."
|
||||
)
|
||||
|
@ -69,31 +69,31 @@ public class ConstantsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 39,
|
||||
line = 25,
|
||||
messageRegExp = "^.*only 'true' or 'false' are supported\\.$"),
|
||||
@Diagnostic(type = ErroneousConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 40,
|
||||
line = 26,
|
||||
messageRegExp = "^.*invalid character literal\\.$"),
|
||||
@Diagnostic(type = ErroneousConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 41,
|
||||
line = 27,
|
||||
messageRegExp = "^.*Value out of range. Value:\"200\" Radix:10\\.$"),
|
||||
@Diagnostic(type = ErroneousConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 42,
|
||||
line = 28,
|
||||
messageRegExp = "^.*integer number too large.$"),
|
||||
@Diagnostic(type = ErroneousConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 43,
|
||||
line = 29,
|
||||
messageRegExp = "^.*L/l mandatory for long types.$"),
|
||||
@Diagnostic(type = ErroneousConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 44,
|
||||
line = 30,
|
||||
messageRegExp = "^.*improperly placed underscores.$"),
|
||||
@Diagnostic(type = ErroneousConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 45,
|
||||
line = 31,
|
||||
messageRegExp = "^.*floating point number too small.$")
|
||||
}
|
||||
)
|
||||
|
@ -90,12 +90,12 @@ public class SourceConstantsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper1.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "Source and constant are both defined in @Mapping, either define a source or a "
|
||||
+ "constant"),
|
||||
@Diagnostic(type = ErroneousMapper1.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 43,
|
||||
line = 30,
|
||||
messageRegExp = "Unmapped target property: \"integerConstant\"")
|
||||
}
|
||||
)
|
||||
@ -116,13 +116,13 @@ public class SourceConstantsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper3.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp =
|
||||
"Expression and constant are both defined in @Mapping, either define an expression or a "
|
||||
+ "constant"),
|
||||
@Diagnostic(type = ErroneousMapper3.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 43,
|
||||
line = 30,
|
||||
messageRegExp = "Unmapped target property: \"integerConstant\"")
|
||||
}
|
||||
)
|
||||
@ -143,12 +143,12 @@ public class SourceConstantsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper4.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "Source and expression are both defined in @Mapping, either define a source or an "
|
||||
+ "expression"),
|
||||
@Diagnostic(type = ErroneousMapper4.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 43,
|
||||
line = 30,
|
||||
messageRegExp = "Unmapped target property: \"integerConstant\"")
|
||||
}
|
||||
)
|
||||
@ -191,12 +191,12 @@ public class SourceConstantsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper5.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 43,
|
||||
line = 30,
|
||||
messageRegExp = "^Constant \"DENMARK\" doesn't exist in enum type org.mapstruct.ap.test.source."
|
||||
+ "constants.CountryEnum for property \"country\".$"),
|
||||
@Diagnostic(type = ErroneousMapper5.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 41,
|
||||
line = 28,
|
||||
messageRegExp = "^Can't map \"java.lang.String \"DENMARK\"\" to \"org.mapstruct.ap.test.source."
|
||||
+ "constants.CountryEnum country\".$")
|
||||
}
|
||||
@ -218,7 +218,7 @@ public class SourceConstantsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousMapper6.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "^.*Can't map \"java.lang.String \"3001\"\" to \"java.lang.Long "
|
||||
+ "longWrapperConstant\".*$")
|
||||
}
|
||||
|
@ -55,13 +55,13 @@ public class JavaDefaultExpressionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousDefaultExpressionExpressionMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Expression and default expression are both defined in @Mapping,"
|
||||
+ " either define an expression or a default expression."
|
||||
),
|
||||
@Diagnostic(type = ErroneousDefaultExpressionExpressionMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 39,
|
||||
line = 26,
|
||||
messageRegExp = "Unmapped target property: \"sourceId\""
|
||||
)
|
||||
}
|
||||
@ -76,13 +76,13 @@ public class JavaDefaultExpressionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousDefaultExpressionConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Constant and default expression are both defined in @Mapping,"
|
||||
+ " either define a constant or a default expression."
|
||||
),
|
||||
@Diagnostic(type = ErroneousDefaultExpressionConstantMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Unmapped target property: \"sourceId\""
|
||||
)
|
||||
}
|
||||
@ -97,13 +97,13 @@ public class JavaDefaultExpressionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousDefaultExpressionDefaultValueMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Default value and default expression are both defined in @Mapping,"
|
||||
+ " either define a default value or a default expression."
|
||||
),
|
||||
@Diagnostic(type = ErroneousDefaultExpressionDefaultValueMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Unmapped target property: \"sourceId\""
|
||||
)
|
||||
}
|
||||
@ -118,7 +118,7 @@ public class JavaDefaultExpressionTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousDefaultExpressionMapper.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Value for default expression must be given in the form \"java\\(<EXPRESSION>\\)\""
|
||||
)
|
||||
}
|
||||
|
@ -121,12 +121,12 @@ public class InheritConfigurationTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous1.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 56,
|
||||
line = 43,
|
||||
messageRegExp = "Several matching methods exist: forwardCreate\\(\\), "
|
||||
+ "forwardCreate1\\(\\). Specify a name explicitly."),
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous1.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 57,
|
||||
line = 44,
|
||||
messageRegExp = "Unmapped target properties: \"stringPropY, integerPropY, constantProp, "
|
||||
+ "expressionProp, nestedResultProp\"")
|
||||
}
|
||||
@ -141,12 +141,12 @@ public class InheritConfigurationTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous2.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 56,
|
||||
line = 43,
|
||||
messageRegExp = "None of the candidates forwardCreate\\(\\), forwardCreate1\\(\\) matches given "
|
||||
+ "name: \"blah\"."),
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous2.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 57,
|
||||
line = 44,
|
||||
messageRegExp = "Unmapped target properties: \"stringPropY, integerPropY, constantProp, "
|
||||
+ "expressionProp, nestedResultProp\"")
|
||||
}
|
||||
@ -161,12 +161,12 @@ public class InheritConfigurationTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous3.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 56,
|
||||
line = 43,
|
||||
messageRegExp = "Given name \"forwardCreate\" matches several candidate methods: "
|
||||
+ ".*forwardCreate.*, .*forwardCreate.*"),
|
||||
@Diagnostic(type = SourceTargetMapperAmbiguous3.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 57,
|
||||
line = 44,
|
||||
messageRegExp = "Unmapped target properties: \"stringPropY, integerPropY, constantProp, "
|
||||
+ "expressionProp, nestedResultProp\"") }
|
||||
)
|
||||
@ -180,12 +180,12 @@ public class InheritConfigurationTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapperNonMatchingName.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 47,
|
||||
line = 34,
|
||||
messageRegExp = "Given name \"blah\" does not match the only candidate. Did you mean: "
|
||||
+ "\"forwardCreate\"."),
|
||||
@Diagnostic(type = SourceTargetMapperNonMatchingName.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 48,
|
||||
line = 35,
|
||||
messageRegExp = "Unmapped target properties: \"stringPropY, integerPropY, constantProp, "
|
||||
+ "expressionProp, nestedResultProp\"")
|
||||
}
|
||||
|
@ -34,11 +34,11 @@ public class UnmappedSourceTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Unmapped source property: \"qux\""),
|
||||
@Diagnostic(type = SourceTargetMapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Unmapped source property: \"bar\"")
|
||||
}
|
||||
)
|
||||
@ -60,11 +60,11 @@ public class UnmappedSourceTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStrictSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 33,
|
||||
line = 20,
|
||||
messageRegExp = "Unmapped source property: \"qux\""),
|
||||
@Diagnostic(type = ErroneousStrictSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
line = 22,
|
||||
messageRegExp = "Unmapped source property: \"bar\"")
|
||||
}
|
||||
)
|
||||
|
@ -35,11 +35,11 @@ public class UnmappedProductTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Unmapped target property: \"bar\""),
|
||||
@Diagnostic(type = SourceTargetMapper.class,
|
||||
kind = Kind.WARNING,
|
||||
line = 31,
|
||||
line = 18,
|
||||
messageRegExp = "Unmapped target property: \"qux\"")
|
||||
}
|
||||
)
|
||||
@ -61,11 +61,11 @@ public class UnmappedProductTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousStrictSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 30,
|
||||
line = 17,
|
||||
messageRegExp = "Unmapped target property: \"bar\""),
|
||||
@Diagnostic(type = ErroneousStrictSourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 32,
|
||||
line = 19,
|
||||
messageRegExp = "Unmapped target property: \"qux\"")
|
||||
}
|
||||
)
|
||||
@ -80,11 +80,11 @@ public class UnmappedProductTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = SourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 16,
|
||||
messageRegExp = "Unmapped target property: \"bar\""),
|
||||
@Diagnostic(type = SourceTargetMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 31,
|
||||
line = 18,
|
||||
messageRegExp = "Unmapped target property: \"qux\"")
|
||||
}
|
||||
)
|
||||
|
@ -154,7 +154,7 @@ public class UpdateMethodsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousOrganizationMapper1.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "No read accessor found for property \"company\" in target type.")
|
||||
}
|
||||
)
|
||||
@ -170,11 +170,11 @@ public class UpdateMethodsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousOrganizationMapper2.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "No read accessor found for property \"type\" in target type."),
|
||||
@Diagnostic(type = ErroneousOrganizationMapper2.class,
|
||||
kind = javax.tools.Diagnostic.Kind.ERROR,
|
||||
line = 48,
|
||||
line = 35,
|
||||
messageRegExp = ".*\\.updatemethods\\.DepartmentEntity does not have an accessible parameterless " +
|
||||
"constructor\\.")
|
||||
|
||||
@ -194,7 +194,7 @@ public class UpdateMethodsTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = CompanyMapper1.class,
|
||||
kind = javax.tools.Diagnostic.Kind.WARNING,
|
||||
line = 36,
|
||||
line = 23,
|
||||
messageRegExp = "Unmapped target property: \"employees\"\\. Mapping from property \"" +
|
||||
".*UnmappableDepartmentDto department\" to \".*DepartmentEntity department.")
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ public class EnumToEnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousOrderMapperMappingSameConstantTwice.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Source value mapping: \"EXTRA\" cannot be mapped more than once\\.")
|
||||
}
|
||||
)
|
||||
@ -228,11 +228,11 @@ public class EnumToEnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousOrderMapperUsingUnknownEnumConstants.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
line = 24,
|
||||
messageRegExp = "Constant FOO doesn't exist in enum type org.mapstruct.ap.test.value.OrderType\\."),
|
||||
@Diagnostic(type = ErroneousOrderMapperUsingUnknownEnumConstants.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 38,
|
||||
line = 25,
|
||||
messageRegExp = "Constant BAR doesn't exist in enum type org.mapstruct.ap.test.value." +
|
||||
"ExternalOrderType\\.")
|
||||
}
|
||||
@ -247,7 +247,7 @@ public class EnumToEnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousOrderMapperNotMappingConstantWithoutMatchInTargetType.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 34,
|
||||
line = 21,
|
||||
messageRegExp = "The following constants from the source enum have no corresponding constant in the " +
|
||||
"target enum and must be be mapped via adding additional mappings: EXTRA, STANDARD, NORMAL")
|
||||
}
|
||||
@ -262,7 +262,7 @@ public class EnumToEnumMappingTest {
|
||||
diagnostics = {
|
||||
@Diagnostic(type = ErroneousOrderMapperDuplicateANY.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 39,
|
||||
line = 26,
|
||||
messageRegExp = "Source = \"<ANY_REMAINING>\" or \"<ANY_UNMAPPED>\" can only be used once\\." )
|
||||
}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user