public void contains ( CharSequence string ) { checkNotNull ( string ) ; if ( actual ( ) == null ) { failWithActual ( "expected a string that contains" , string ) ; } else if ( ! actual ( ) . contains ( string ) ) { failWithActual ( "expected to contain" , string ) ; } }
Fails if the string does not contain the given sequence .