Fix yang-export warnings
[yangtools.git] / model / yang-model-export / src / test / java / org / opendaylight / yangtools / yang / model / export / Bug6856Test.java
index b2f8fe312ca9a09414da739b0ee008b7f2bce1c4..68c4a86ee64473d8282337da5df4c3d092a17074 100644 (file)
@@ -17,6 +17,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.OutputStream;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.Revision;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 import org.opendaylight.yangtools.yang.model.api.Module;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
@@ -25,7 +26,7 @@ public class Bug6856Test {
 
     @Test
     public void testImplicitInputAndOutputInRpc() throws Exception {
-        final SchemaContext schemaContext = YangParserTestUtils.parseYangResources(Bug6856Test.class,
+        final EffectiveModelContext schemaContext = YangParserTestUtils.parseYangResources(Bug6856Test.class,
             "/bugs/bug-6856/foo.yang");
         assertNotNull(schemaContext);
 
@@ -33,7 +34,7 @@ public class Bug6856Test {
         final BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(byteArrayOutputStream);
 
         final Module fooModule = schemaContext.findModule("foo", Revision.of("2017-02-28")).get();
-        YinExportUtils.writeModuleAsYinText(fooModule, bufferedOutputStream);
+        YinExportUtils.writeModuleAsYinText(fooModule.asEffectiveStatement(), bufferedOutputStream);
 
         final String output = byteArrayOutputStream.toString();
         assertNotNull(output);
@@ -53,7 +54,7 @@ public class Bug6856Test {
         final BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(byteArrayOutputStream);
 
         final Module barModule = schemaContext.findModule("bar", Revision.of("2017-02-28")).get();
-        YinExportUtils.writeModuleAsYinText(barModule, bufferedOutputStream);
+        YinExportUtils.writeModuleAsYinText(barModule.asEffectiveStatement(), bufferedOutputStream);
 
         final String output = byteArrayOutputStream.toString();
         assertNotNull(output);