Search in sources :

Example 1 with StringView

use of com.squarespace.template.StringView in project template-compiler by Squarespace.

the class InternationalFormattersTest method testExtraArgument.

public void testExtraArgument() throws Exception {
    if (isJava8()) {
        try {
            MONEY_FORMATTER.validateArgs(new Arguments(new StringView(" en-US bad-arg")));
            Assert.fail("expected ArgumentsException, too many arguments passed");
        } catch (ArgumentsException e) {
        // fall through
        }
    }
}
Also used : ArgumentsException(com.squarespace.template.ArgumentsException) Arguments(com.squarespace.template.Arguments) StringView(com.squarespace.template.StringView)

Aggregations

Arguments (com.squarespace.template.Arguments)1 ArgumentsException (com.squarespace.template.ArgumentsException)1 StringView (com.squarespace.template.StringView)1