/** * Creates a matcher of {@link String} that matches when the examined string is <code>null</code>, or * has zero length. * <p/> * For example: * <pre>assertThat(((String)null), isEmptyString())</pre> */ public static org.hamcrest.Matcher<java.lang.String> isEmptyOrNullString() { return org.hamcrest.text.IsEmptyString.isEmptyOrNullString(); }
/** * Creates a matcher of {@link String} that matches when the examined string is <code>null</code>, or * has zero length. * For example: * <pre>assertThat(((String)null), isEmptyOrNullString())</pre> * * @deprecated use is(emptyOrNullString()) instead */ @SuppressWarnings("deprecation") public static Matcher<java.lang.String> isEmptyOrNullString() { return org.hamcrest.text.IsEmptyString.isEmptyOrNullString(); }
public void notEmpty() { verifyUsingMatcher(Matchers.not(IsEmptyString.isEmptyOrNullString())); } }
public void isNullOrEmpty() { verifyUsingMatcher(IsEmptyString.isEmptyOrNullString()); }
public void isNonEmpty() { verifyUsingMatcher(Matchers.not(IsEmptyString.isEmptyOrNullString())); }
/** * Creates a matcher of {@link String} that matches when the examined string is <code>null</code>, or * has zero length. * For example: * <pre>assertThat(((String)null), isEmptyOrNullString())</pre> * * @deprecated use is(emptyOrNullString()) instead */ public static org.hamcrest.Matcher<java.lang.String> isEmptyOrNullString() { return org.hamcrest.text.IsEmptyString.isEmptyOrNullString(); }
/** * Creates a matcher of {@link String} that matches when the examined string is <code>null</code>, or * has zero length. * For example: * <pre>assertThat(((String)null), isEmptyOrNullString())</pre> * * @deprecated use is(emptyOrNullString()) instead */ @SuppressWarnings("deprecation") public static Matcher<java.lang.String> isEmptyOrNullString() { return org.hamcrest.text.IsEmptyString.isEmptyOrNullString(); }
protected void expectPut4xxResponseBody(String invalidProp) { Response putResponse = expectPut4xxStatus(invalidProp); assertThat(putResponse.body().asString(), not(isEmptyOrNullString())); }
public RepositoryRouteResource getResourceFromText(String responseString) { assertThat(responseString, not(IsEmptyString.isEmptyOrNullString())); XStreamRepresentation representation = new XStreamRepresentation(xstream, responseString, mediaType); RepositoryRouteResourceResponse resourceResponse = (RepositoryRouteResourceResponse) representation.getPayload(new RepositoryRouteResourceResponse()); return resourceResponse.getData(); }