public void endsWith ( String string ) { checkNotNull ( string ) ; if ( actual ( ) == null ) { failWithActual ( "expected a string that ends with" , string ) ; } else if ( ! actual ( ) . endsWith ( string ) ) { failWithActual ( "expected to end with" , string ) ; } }
Fails if the string does not end with the given string .