Package org.threeten.bp.format.DateTimeFormatterBuilder

Examples of org.threeten.bp.format.DateTimeFormatterBuilder.SettingsParser


@Test
public class TestSettingsParser extends AbstractTestPrinterParser {

    //-----------------------------------------------------------------------
    public void test_print_sensitive() throws Exception {
        SettingsParser pp = SettingsParser.SENSITIVE;
        StringBuilder buf = new StringBuilder();
        pp.print(printContext, buf);
        assertEquals(buf.toString(), "");
    }
View Full Code Here


        pp.print(printContext, buf);
        assertEquals(buf.toString(), "");
    }

    public void test_print_strict() throws Exception {
        SettingsParser pp = SettingsParser.STRICT;
        StringBuilder buf = new StringBuilder();
        pp.print(printContext, buf);
        assertEquals(buf.toString(), "");
    }
View Full Code Here

        pp.print(printContext, buf);
        assertEquals(buf.toString(), "");
    }

    public void test_print_nulls() throws Exception {
        SettingsParser pp = SettingsParser.SENSITIVE;
        pp.print(null, null);
    }
View Full Code Here

        pp.print(null, null);
    }

    //-----------------------------------------------------------------------
    public void test_parse_changeStyle_sensitive() throws Exception {
        SettingsParser pp = SettingsParser.SENSITIVE;
        int result = pp.parse(parseContext, "a", 0);
        assertEquals(result, 0);
        assertEquals(parseContext.isCaseSensitive(), true);
    }
View Full Code Here

        assertEquals(result, 0);
        assertEquals(parseContext.isCaseSensitive(), true);
    }

    public void test_parse_changeStyle_insensitive() throws Exception {
        SettingsParser pp = SettingsParser.INSENSITIVE;
        int result = pp.parse(parseContext, "a", 0);
        assertEquals(result, 0);
        assertEquals(parseContext.isCaseSensitive(), false);
    }
View Full Code Here

        assertEquals(result, 0);
        assertEquals(parseContext.isCaseSensitive(), false);
    }

    public void test_parse_changeStyle_strict() throws Exception {
        SettingsParser pp = SettingsParser.STRICT;
        int result = pp.parse(parseContext, "a", 0);
        assertEquals(result, 0);
        assertEquals(parseContext.isStrict(), true);
    }
View Full Code Here

        assertEquals(result, 0);
        assertEquals(parseContext.isStrict(), true);
    }

    public void test_parse_changeStyle_lenient() throws Exception {
        SettingsParser pp = SettingsParser.LENIENT;
        int result = pp.parse(parseContext, "a", 0);
        assertEquals(result, 0);
        assertEquals(parseContext.isStrict(), false);
    }
View Full Code Here

        assertEquals(parseContext.isStrict(), false);
    }

    //-----------------------------------------------------------------------
    public void test_toString_sensitive() throws Exception {
        SettingsParser pp = SettingsParser.SENSITIVE;
        assertEquals(pp.toString(), "ParseCaseSensitive(true)");
    }
View Full Code Here

        SettingsParser pp = SettingsParser.SENSITIVE;
        assertEquals(pp.toString(), "ParseCaseSensitive(true)");
    }

    public void test_toString_insensitive() throws Exception {
        SettingsParser pp = SettingsParser.INSENSITIVE;
        assertEquals(pp.toString(), "ParseCaseSensitive(false)");
    }
View Full Code Here

        SettingsParser pp = SettingsParser.INSENSITIVE;
        assertEquals(pp.toString(), "ParseCaseSensitive(false)");
    }

    public void test_toString_strict() throws Exception {
        SettingsParser pp = SettingsParser.STRICT;
        assertEquals(pp.toString(), "ParseStrict(true)");
    }
View Full Code Here

TOP

Related Classes of org.threeten.bp.format.DateTimeFormatterBuilder.SettingsParser

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.