import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.sourceForResource;
import java.util.List;
import org.junit.Test;
import org.opendaylight.yangtools.yang.model.api.ListSchemaNode;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
+import org.opendaylight.yangtools.yang.parser.spi.source.StatementStreamSource;
import org.opendaylight.yangtools.yang.parser.stmt.reactor.CrossSourceStatementReactor;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangInferencePipeline;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.YangStatementSourceImpl;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.EffectiveSchemaContext;
public class ListTest {
- private static final YangStatementSourceImpl LIST_MODULE = new YangStatementSourceImpl("/list-test/list-test.yang",
- false);
+ private static final StatementStreamSource LIST_MODULE = sourceForResource("/list-test/list-test.yang");
@Test
public void listAndLeavesTest() throws ReactorException {
final CrossSourceStatementReactor.BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR.newBuild();
- StmtTestUtils.addSources(reactor, LIST_MODULE);
+ reactor.addSources(LIST_MODULE);
final EffectiveSchemaContext result = reactor.buildEffective();
assertNotNull(result);