Examples of MessageFormatter


Examples of org.apache.tapestry5.ioc.MessageFormatter

    }

    @Test
    public void get_formatter()
    {
        MessageFormatter mf = messages.getFormatter("result");

        assertEquals(mf.format("great"), "The result is 'great'.");
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.MessageFormatter

    }

    @Test
    public void formatters_are_cached()
    {
        MessageFormatter mf1 = messages.getFormatter("result");
        MessageFormatter mf2 = messages.getFormatter("result");

        assertSame(mf2, mf1);
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.MessageFormatter

        String formValidationid = formSupport.getFormValidationId();

        Object coercedConstraintValue = computeConstraintValue(validatorType, validator, spec.getConstraintValue(),
                formValidationid, overrideId, overrideMessages);

        MessageFormatter formatter = findMessageFormatter(formValidationid, overrideId, overrideMessages, validatorType,
                validator);

        return new FieldValidatorImpl(field, coercedConstraintValue, formatter, validator, formSupport);
    }
View Full Code Here

Examples of org.apache.xerces.util.MessageFormatter

    public void reportError(String domain, String key, Object[] arguments, short severity)
        throws SAXException {

        SAXParseException spe;

        MessageFormatter msgFormatter = (MessageFormatter) fMessageFormatters.get(domain);

        spe = new SAXParseException(msgFormatter.formatMessage(fLocale, key, arguments), fLocator);

        // default error handling  
        if (fErrorHandler == null) {
            if ( severity == SEVERITY_FATAL_ERROR
                 && !fContinueAfterFatalError) {
View Full Code Here

Examples of org.fest.assertions.error.MessageFormatter

  @Test
  public void should_fail_if_actual_is_not_NaN() {
    try {
      floats.assertIsNaN(description, 8f);
    } catch (org.junit.ComparisonFailure e) {
      MessageFormatter messageFormatter = MessageFormatter.instance();
      String message = messageFormatter.format(description, "expected:<%s> but was:<%s>", Float.NaN, 8f);
      e.getMessage().equalsIgnoreCase(message);
      return;
    }
    expectedAssertionErrorNotThrown();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.