mirror of
https://github.com/jlengrand/atrium.git
synced 2026-03-27 15:49:05 +00:00
deprecate translations which shall be removed with 0.10.0
This commit is contained in:
@@ -44,6 +44,7 @@ fun <T> _collectForComposition(
|
||||
|
||||
collectedAssertions
|
||||
} catch (@Suppress("DEPRECATION") e: ch.tutteli.atrium.creating.PlantHasNoSubjectException) {
|
||||
@Suppress("DEPRECATION")
|
||||
listOf(
|
||||
AssertImpl.builder.explanatoryGroup
|
||||
.withWarningType
|
||||
|
||||
@@ -63,7 +63,10 @@ abstract class IterableAnyAssertionsSpec(
|
||||
@Suppress("DEPRECATION")
|
||||
asAssert().returnValueOf(subject::dec).asExpect().toBe(1.0)
|
||||
}
|
||||
}.toThrow<AssertionError> { messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault()) }
|
||||
}.toThrow<AssertionError> {
|
||||
@Suppress("DEPRECATION")
|
||||
messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,10 @@ abstract class IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec(
|
||||
@Suppress("DEPRECATION")
|
||||
asAssert().returnValueOf(subject::dec).asExpect().toBe(1.0)
|
||||
})
|
||||
}.toThrow<AssertionError> { messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault()) }
|
||||
}.toThrow<AssertionError> {
|
||||
@Suppress("DEPRECATION")
|
||||
messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,10 @@ abstract class IterableContainsInAnyOrderOnlyEntriesAssertionsSpec(
|
||||
@Suppress("DEPRECATION")
|
||||
asAssert().returnValueOf(subject::dec).asExpect().toBe(1.0)
|
||||
})
|
||||
}.toThrow<AssertionError> { messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault()) }
|
||||
}.toThrow<AssertionError> {
|
||||
@Suppress("DEPRECATION")
|
||||
messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ abstract class IterableContainsInOrderOnlyEntriesAssertionsSpec(
|
||||
asAssert().returnValueOf(subject::dec).asExpect().toBe(1.0)
|
||||
})
|
||||
}.toThrow<AssertionError> {
|
||||
@Suppress("DEPRECATION")
|
||||
messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,9 @@ enum class DescriptionIterableAssertion(override val value: String) : StringBase
|
||||
INDEX_FROM_TO("Index %s..%s"),
|
||||
NUMBER_OF_OCCURRENCES("Anzahl Treffer"),
|
||||
SIZE_EXCEEDED("❗❗ hasNext() hat `false` zurückgegeben"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- `Iterable` gibt keinen nächsten Eintrag zurück.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
CANNOT_EVALUATE_SUBJECT_ONLY_NULL("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- `Iterable` gibt nur `null` zurück.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
WARNING_ADDITIONAL_ENTRIES("zusätzliche Einträge entdeckt"),
|
||||
WARNING_MISMATCHES("folgende Einträge erfüllten keine Aussage (Diskrepanzen)"),
|
||||
|
||||
@@ -7,6 +7,7 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable
|
||||
* Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Map].
|
||||
*/
|
||||
enum class DescriptionListAssertion(override val value: String) : StringBasedTranslatable {
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
CANNOT_EVALUATE_INDEX_OUT_OF_BOUNDS("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- Index ausserhalb der Grenzen (index out of bounds).\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
INDEX_OUT_OF_BOUNDS("❗❗ Index ausserhalb der Grenzen (index out of bounds)")
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable
|
||||
* Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Map].
|
||||
*/
|
||||
enum class DescriptionMapAssertion(override val value: String) : StringBasedTranslatable {
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
CANNOT_EVALUATE_KEY_DOES_NOT_EXIST("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- der gegebene Key existiert nicht.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
CONTAINS_IN_ANY_ORDER("enthält, in beliebiger Reihenfolge"),
|
||||
CONTAINS_KEY("enthält Key"),
|
||||
|
||||
@@ -18,6 +18,8 @@ enum class DescriptionThrowableAssertion(override val value: String) : StringBas
|
||||
OCCURRED_EXCEPTION_MESSAGE("message"),
|
||||
OCCURRED_EXCEPTION_STACKTRACE("stacktrace"),
|
||||
OCCURRED_EXCEPTION_SUPPRESSED("suppressed"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
IS_NOT_THROWN_1("wird"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
IS_NOT_THROWN_2("nicht geworfen"),
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@ enum class ErrorMessages(override val value: String) : StringBasedTranslatable {
|
||||
HINT_AT_LEAST_ONE_ASSERTION_DEFINED("Manchmal kann man eine Alternative zu `{ }` verwenden. Zum Beispiel, anstelle von `wirft<..> { }` sollten Sie `wirft<..>()` verwenden."),
|
||||
DEDSCRIPTION_BASED_ON_SUBJECT("Kann die Beschreibung NICHT anzeigen, da sie auf dem Subjekt der Behauptung beruht, welches nicht definiert ist"),
|
||||
REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED("kann die Representation NICHT evaluieren, da sie auf dem Subjekt der Behauptung beruht, welches nicht definiert ist."),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
SUBJECT_ACCESSED_TOO_EARLY("Konnte die zusätzlichen Aussagen (Assertions) nicht auswerten; das Subjekt (subject) wurde zu früh verwendet. Bitte erfassen Sie einen Bug-Report unter $BUG_REPORT_URL inklusive Stacktrace wenn möglich -- vielen Dank."),
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ enum class DescriptionAnyAssertion(override val value: String) : StringBasedTran
|
||||
)
|
||||
NOT_TO_BE(DescriptionBasic.NOT_TO_BE.value),
|
||||
IS_A("is instance of type"),
|
||||
IS_SAME("is the same as"),
|
||||
IS_NOT_SAME("is not the same as")
|
||||
IS_SAME("is the same instance as"),
|
||||
IS_NOT_SAME("is not the same instance as")
|
||||
}
|
||||
|
||||
@@ -26,7 +26,9 @@ enum class DescriptionIterableAssertion(override val value: String) : StringBase
|
||||
INDEX_FROM_TO("index %s..%s"),
|
||||
NUMBER_OF_OCCURRENCES("number of occurrences"),
|
||||
SIZE_EXCEEDED("❗❗ hasNext() returned false"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- `Iterable` has no next entry.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
CANNOT_EVALUATE_SUBJECT_ONLY_NULL("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- `Iterable` returns only `null` for `next()`.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
WARNING_ADDITIONAL_ENTRIES("additional entries detected"),
|
||||
WARNING_MISMATCHES("following entries were mismatched"),
|
||||
|
||||
@@ -7,6 +7,7 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable
|
||||
* Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Map].
|
||||
*/
|
||||
enum class DescriptionListAssertion(override val value: String) : StringBasedTranslatable {
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
CANNOT_EVALUATE_INDEX_OUT_OF_BOUNDS("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- index out of bounds.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
INDEX_OUT_OF_BOUNDS("❗❗ index out of bounds"),
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable
|
||||
* Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Map].
|
||||
*/
|
||||
enum class DescriptionMapAssertion(override val value: String) : StringBasedTranslatable {
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
CANNOT_EVALUATE_KEY_DOES_NOT_EXIST("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- given key does not exist.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
CONTAINS_IN_ANY_ORDER("contains, in any order"),
|
||||
CONTAINS_KEY("contains key"),
|
||||
|
||||
@@ -18,6 +18,8 @@ enum class DescriptionThrowableAssertion(override val value: String) : StringBas
|
||||
OCCURRED_EXCEPTION_MESSAGE("message"),
|
||||
OCCURRED_EXCEPTION_STACKTRACE("stacktrace"),
|
||||
OCCURRED_EXCEPTION_SUPPRESSED("suppressed"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
IS_NOT_THROWN_1("is"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
IS_NOT_THROWN_2("not thrown at all"),
|
||||
}
|
||||
|
||||
@@ -16,5 +16,6 @@ enum class DescriptionTypeTransformationAssertion(override val value: String) :
|
||||
ReplaceWith("DescriptionAnyAssertion.IS_A", "ch.tutteli.atrium.translations.DescriptionAnyAssertion")
|
||||
)
|
||||
IS_A("is type or sub-type of"),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
WARNING_DOWN_CAST_FAILED("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- the down-cast to %s failed.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"),
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@ enum class ErrorMessages(override val value: String) : StringBasedTranslatable {
|
||||
HINT_AT_LEAST_ONE_ASSERTION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"),
|
||||
DEDSCRIPTION_BASED_ON_SUBJECT("CANNOT show description as it is based on subject which is not defined"),
|
||||
REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED("CANNOT evaluate representation as it is based on subject which is not defined."),
|
||||
@Deprecated("Will be removed with 0.10.0")
|
||||
SUBJECT_ACCESSED_TOO_EARLY("Could not evaluate sub-assertions; the subject was accessed too early. Please report a bug at $BUG_REPORT_URL including stacktrace if possible -- thank you"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user