doc / ch.tutteli.atrium.api.cc.en_UK / containsDefaultTranslationOf

containsDefaultTranslationOf

fun <T : CharSequence> Assert<T>.containsDefaultTranslationOf(expected: Translatable, vararg otherExpected: Translatable): AssertionPlant<T> (source)
Deprecated: Use pendant from package en_GB; will be removed with 1.0.0

Makes the assertion that the Assert.subject contains expected's getDefault representation and the getDefault representations of the otherExpected (if given), using a non disjoint search.

It is a shortcut for contains.atLeast(1).defaultTranslationOf(expected, *otherExpected).

By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. Also notice, that it does not search for unique matches. Meaning, if the input of the search is 'a' and the default translation of expected is defined as 'a' and one default translation of the otherExpected is defined as 'a' as well, then both match, even though they match the same sequence in the input of the search. Use an option such as atLeast, atMost and exactly to control the number of occurrences you expect.

Meaning you might want to use: contains.exactly(2).defaultTranslationOf(IS) instead of: containsDefaultTranslationOf(IS, IS)

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
This plant to support a fluent API.