mirror of
https://github.com/jlengrand/atrium.git
synced 2026-03-10 08:01:19 +00:00
fix typo in DEDSCRIPTION -> DESCRIPTION
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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."),
|
||||
|
||||
|
||||
@@ -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."),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user