containsCharSequence

open fun containsCharSequence(substring: CharSequence): Matcher<CharSequence>

Creates a matcher that matches if the examined CharSequence contains the specified CharSequence anywhere.

For example:

assertThat("myStringOfNote", containsCharSequence("ring"))

Parameters

substring

the substring that the returned matcher will expect to find within any examined string