fix typo in DEDSCRIPTION -> DESCRIPTION

This commit is contained in:
Robert Stoll
2020-12-09 20:54:31 +01:00
parent 6345a9e689
commit 893955048b
7 changed files with 18 additions and 3 deletions

View File

@@ -20,6 +20,8 @@ fun <T> AssertionContainer<T>.notToBe(expected: T): Assertion = impl.notToBe(thi
fun <T> AssertionContainer<T>.isSameAs(expected: T): Assertion = impl.isSameAs(this, expected)
fun <T> AssertionContainer<T>.isNotSameAs(expected: T): Assertion = impl.isNotSameAs(this, expected)
// TODO remove with 0.16.0 it is enough to have toBe
// TODO deprecate with 0.15.0
fun <T : Any?> AssertionContainer<T>.toBeNull(): Assertion = impl.toBeNull(this)
fun <T : Any> AssertionContainer<T?>.toBeNullIfNullGivenElse(type: KClass<T>, assertionCreatorOrNull: (Expect<T>.() -> Unit)?): Assertion =

View File

@@ -15,6 +15,8 @@ interface AnyAssertions {
fun <T> isSameAs(container: AssertionContainer<T>, expected: T): Assertion
fun <T> isNotSameAs(container: AssertionContainer<T>, expected: T): Assertion
// TODO remove with 0.16.0 it is enough to have toBe
// TODO deprecate with 0.15.0
fun <T : Any?> toBeNull(container: AssertionContainer<T>): Assertion
fun <T : Any> toBeNullIfNullGivenElse(

View File

@@ -46,7 +46,8 @@ class CharSequenceContainsAssertionCreator<T : CharSequence, in SC : Any, S : Se
container.changeSubject.unreported { it.toString() }.toAssertionContainer()
override fun search(multiConsumableContainer: AssertionContainer<String>, searchCriterion: SC): Int =
// if the maybeSubject is None it means we are in an explanation like context in which it does not matter if it is found or not.
// if the maybeSubject is None it means we are in an explanation like context in which
// it should not matter what this number is. Moreover, we check in the atMostChecker that times is >= 0
multiConsumableContainer.maybeSubject.fold({ -1 }) { searcher.search(it, searchCriterion) }
override fun decorateAssertion(

View File

@@ -27,7 +27,7 @@ fun <T, R> AssertionContainer<T>.genericSubjectBasedFeature(
private fun <R> createFeatureSubjectNotDefined(): MetaFeature<R> =
MetaFeature(
ErrorMessages.DEDSCRIPTION_BASED_ON_SUBJECT,
ErrorMessages.DESCRIPTION_BASED_ON_SUBJECT,
ErrorMessages.REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED,
None
)

View File

@@ -159,7 +159,7 @@ abstract class FeatureAssertionsSpec(
if (isAbleToEvaluateDescription) {
messageContains(stringInExceptionMessage)
} else {
messageContains(ch.tutteli.atrium.translations.ErrorMessages.DEDSCRIPTION_BASED_ON_SUBJECT.getDefault())
messageContains(ch.tutteli.atrium.translations.ErrorMessages.DESCRIPTION_BASED_ON_SUBJECT.getDefault())
}
}
}

View File

@@ -8,6 +8,11 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable
*/
enum class ErrorMessages(override val value: String) : StringBasedTranslatable {
DESCRIPTION_BASED_ON_SUBJECT("Kann die Beschreibung NICHT anzeigen, da sie auf dem Subjekt der Behauptung beruht, welches nicht definiert ist"),
@Deprecated(
"Use DESCRIPTION_BASED_ON_SUBJECT; will be removed with 1.0.0",
ReplaceWith("DESCRIPTION_BASED_ON_SUBJECT")
)
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."),

View File

@@ -9,6 +9,11 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable
enum class ErrorMessages(override val value: String) : StringBasedTranslatable {
DESCRIPTION_BASED_ON_SUBJECT("CANNOT show description as it is based on subject which is not defined"),
@Deprecated(
"Use DESCRIPTION_BASED_ON_SUBJECT; will be removed with 1.0.0",
ReplaceWith("DESCRIPTION_BASED_ON_SUBJECT")
)
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."),