Package org.hamcrest

Examples of org.hamcrest.ResourceBundleDescription


  private <T> boolean genericThat(T actual, Matcher<? super T> matcher, Object category, String reason, Object... messageParameters) {
    if (!matcher.matches(actual)) {
          if (reason != null) {
            errors.add(i18nMessage(category, reason, messageParameters));
            } else {
                Description description = new ResourceBundleDescription();
                description.appendDescriptionOf(matcher);
                errors.add(i18nMessage(category, description.toString(), actual));
            }
            return false;
        }
        return true;
  }
View Full Code Here


  private <T> boolean genericThat(T actual, Matcher<? super T> matcher, Object category, String reason, Object... messageParameters) {
    if (!matcher.matches(actual)) {
    if (reason != null) {
      errors.add(i18nMessage(category, reason, messageParameters));
    } else {
    Description description = new ResourceBundleDescription();
    description.appendDescriptionOf(matcher);
    errors.add(i18nMessage(category, description.toString(), actual));
    }
    return false;
  }
  return true;
  }
View Full Code Here

    public <T> boolean that(T actual, Matcher<? super T> matcher, String category, String reason, Object... messageParameters) {
        if (!matcher.matches(actual)) {
          if (reason != null) {
            errors.add(new I18nMessage(category, reason, messageParameters));
            } else {
                Description description = new ResourceBundleDescription();
                description.appendDescriptionOf(matcher);
                errors.add(new I18nMessage(description.toString(), category));
            }
            return false;
        }
        return true;
    }
View Full Code Here

    public <T> boolean that(T actual, Matcher<? super T> matcher, String category, String reason, Object... messageParameters) {
        if (!matcher.matches(actual)) {
            if (reason != null) {
                errors.add(new ValidationMessage(i18n(reason), category, messageParameters));
            } else {
                Description description = new ResourceBundleDescription(bundle);
                description.appendDescriptionOf(matcher);
                errors.add(new ValidationMessage(description.toString(), category));
            }
            return false;
        }
        return true;
    }
View Full Code Here

    public <T> boolean that(T actual, Matcher<? super T> matcher, String category, String reason, Object... messageParameters) {
        if (!matcher.matches(actual)) {
            if (reason != null) {
                errors.add(new ValidationMessage(getString(reason), category, messageParameters));
            } else {
                Description description = new ResourceBundleDescription(bundle);
                description.appendDescriptionOf(matcher);
                errors.add(new ValidationMessage(description.toString(), category));
            }
            return false;
        }
        return true;
    }
View Full Code Here

  private <T> boolean genericThat(T actual, Matcher<? super T> matcher, Object category, String reason, Object... messageParameters) {
    if (!matcher.matches(actual)) {
          if (reason != null) {
            errors.add(i18nMessage(category, reason, messageParameters));
            } else {
                Description description = new ResourceBundleDescription();
                description.appendDescriptionOf(matcher);
                errors.add(i18nMessage(category, description.toString(), actual));
            }
            return false;
        }
        return true;
  }
View Full Code Here

TOP

Related Classes of org.hamcrest.ResourceBundleDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.