/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}, ignoring case. * For example: * <pre>assertThat("myStringOfNote", endsWithIgnoringCase("note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ public static Matcher<String> endsWithIgnoringCase(String suffix) { return new StringEndsWith(true, suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(false, suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
private static ResultMatcher invalidTokenHeader(String message) { return header().string(HttpHeaders.WWW_AUTHENTICATE, AllOf.allOf( new StringStartsWith("Bearer " + "error=\"invalid_token\", " + "error_description=\""), new StringContains(message), new StringEndsWith(", " + "error_uri=\"https://tools.ietf.org/html/rfc6750#section-3.1\"") ) ); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}, ignoring case. * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ public static Matcher<String> endsWithIgnoringCase(String suffix) { return new StringEndsWith(true, suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(false, suffix); }
private static ResultMatcher invalidRequestHeader(String message) { return header().string(HttpHeaders.WWW_AUTHENTICATE, AllOf.allOf( new StringStartsWith("Bearer " + "error=\"invalid_request\", " + "error_description=\""), new StringContains(message), new StringEndsWith(", " + "error_uri=\"https://tools.ietf.org/html/rfc6750#section-3.1\"") ) ); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
@Test public void dumpConfig() throws IOException { createConfFile("metastore-site.xml", true, "METASTORE_HOME", instaMap( "test.long", "23" )); conf = MetastoreConf.newMetastoreConf(); String dump = MetastoreConf.dumpConfig(conf); Assert.assertThat(dump, new StringContains("Used metastore-site file: file:/")); Assert.assertThat(dump, new StringContains("Key: <test.long> old hive key: <hive.test.long> value: <23>")); Assert.assertThat(dump, new StringContains("Key: <test.str> old hive key: <hive.test.str> value: <defaultval>")); Assert.assertThat(dump, new StringEndsWith("Finished MetastoreConf object.\n")); // Make sure the hidden keys didn't get published Assert.assertThat(dump, CoreMatchers.not(new StringContains(ConfVars.PWD.getVarname()))); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}, ignoring case. * For example: * <pre>assertThat("myStringOfNote", endsWithIgnoringCase("note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ public static Matcher<String> endsWithIgnoringCase(String suffix) { return new StringEndsWith(true, suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(false, suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }
/** * Creates a matcher that matches if the examined {@link String} ends with the specified * {@link String}. * <p/> * For example: * <pre>assertThat("myStringOfNote", endsWith("Note"))</pre> * * @param suffix * the substring that the returned matcher will expect at the end of any examined string */ @Factory public static Matcher<String> endsWith(String suffix) { return new StringEndsWith(suffix); }