Package liquibase.parser.core.xml

Source Code of liquibase.parser.core.xml.LiquibaseEntityResolverTest

package liquibase.parser.core.xml;

import static org.junit.Assert.*;

import liquibase.test.JUnitResourceAccessor;
import org.junit.Test;

public class LiquibaseEntityResolverTest {

    @Test
    public void resolveSchemas() throws Exception {
        LiquibaseEntityResolver liquibaseSchemaResolver = new LiquibaseEntityResolver(new XMLChangeLogSAXParser());
        liquibaseSchemaResolver.useResoureAccessor(new JUnitResourceAccessor(), "");

        assertNotNull(liquibaseSchemaResolver.resolveEntity(null, null, null, "http://www.liquibase.org/xml/ns/migrator/dbchangelog-1.0.xsd"));
        assertNotNull(liquibaseSchemaResolver.resolveEntity(null, null, null, "http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd"));
        assertNull(liquibaseSchemaResolver.resolveEntity(null,null,null, "http://www.liquibase.org/xml/ns/migrator/invalid.xsd"));
    }
}
TOP

Related Classes of liquibase.parser.core.xml.LiquibaseEntityResolverTest

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.