Package liquibase.parser.core.sql

Examples of liquibase.parser.core.sql.SqlChangeLogParser


        ChangeLogParser mockChangeLogParser = new MockChangeLogParser();

        factory.register(new XMLChangeLogSAXParser());
        factory.register(mockChangeLogParser);
        factory.register(new SqlChangeLogParser());

        assertEquals(3, factory.getParsers().size());

        factory.unregister(mockChangeLogParser);
        assertEquals(2, factory.getParsers().size());
View Full Code Here


    public void getParser_byExtension() throws Exception {
        ChangeLogParserFactory.getInstance().getParsers().clear();

        XMLChangeLogSAXParser xmlChangeLogParser = new XMLChangeLogSAXParser();
        ChangeLogParserFactory.getInstance().register(xmlChangeLogParser);
        ChangeLogParserFactory.getInstance().register(new SqlChangeLogParser());

        ChangeLogParser parser = ChangeLogParserFactory.getInstance().getParser("xml", new JUnitResourceAccessor());

        assertNotNull(parser);
        assertTrue(xmlChangeLogParser == parser);
View Full Code Here

    public void getParser_byFile() throws Exception {
        ChangeLogParserFactory.getInstance().getParsers().clear();

        XMLChangeLogSAXParser xmlChangeLogParser = new XMLChangeLogSAXParser();
        ChangeLogParserFactory.getInstance().register(xmlChangeLogParser);
        ChangeLogParserFactory.getInstance().register(new SqlChangeLogParser());

        ChangeLogParser parser = ChangeLogParserFactory.getInstance().getParser("path/to/a/file.xml", new JUnitResourceAccessor());

        assertNotNull(parser);
        assertTrue(xmlChangeLogParser == parser);
View Full Code Here

        ChangeLogParserFactory.getInstance().getParsers().clear();

        XMLChangeLogSAXParser xmlChangeLogParser = new XMLChangeLogSAXParser();
        ChangeLogParserFactory.getInstance().register(xmlChangeLogParser);
        ChangeLogParserFactory.getInstance().register(new SqlChangeLogParser());

        try {
            ChangeLogParserFactory.getInstance().getParser("badextension", new JUnitResourceAccessor());
            fail("Did not throw an exception");
        } catch (Exception e) {
View Full Code Here

        assertEquals(0, factory.getParsers().size());

        XMLChangeLogSAXParser changeLogParser = new XMLChangeLogSAXParser();

        factory.register(new SqlChangeLogParser());
        factory.register(changeLogParser);

        assertEquals(2, factory.getParsers().size());

        factory.unregister(changeLogParser);
View Full Code Here

TOP

Related Classes of liquibase.parser.core.sql.SqlChangeLogParser

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.