Adjust to SchemaContextProvider going away 22/92922/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 6 Oct 2020 11:23:55 +0000 (13:23 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 6 Oct 2020 11:29:19 +0000 (13:29 +0200)
We only have EffectiveModelContextProvider, use that.

Change-Id: I5b528de7ab36e5ff026966d171f84c4d34d94571
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
dom/mdsal-dom-broker/src/test/java/org/opendaylight/mdsal/dom/broker/schema/ScanningSchemaServiceProviderTest.java
dom/mdsal-dom-spi/src/main/java/org/opendaylight/mdsal/dom/spi/FixedDOMSchemaService.java

index a285b6affe414111daacab8a87883b82de5a1a58..9fefcdf70cc5f8069f5e59c4cf046bb0db3207da 100644 (file)
@@ -58,8 +58,8 @@ public class ScanningSchemaServiceProviderTest {
     @Test
     public void initJarScanningSchemaServiceTest() throws Exception {
         assertNotNull(schemaService.getGlobalContext());
-        assertNotNull(schemaService.getSchemaContext());
-        assertEquals(schemaService.getGlobalContext(), schemaService.getSchemaContext());
+        assertNotNull(schemaService.getEffectiveModelContext());
+        assertEquals(schemaService.getGlobalContext(), schemaService.getEffectiveModelContext());
     }
 
     @Test
@@ -71,7 +71,7 @@ public class ScanningSchemaServiceProviderTest {
         final ListenerRegistration<EffectiveModelContextListener> registerSchemaContextListener =
                 schemaService.registerSchemaContextListener(listener);
         assertEquals(registerSchemaContextListener.getInstance(), listener);
-        assertEquals(schemaService.getSchemaContext(), actualSchemaCtx.getSchemaContext());
+        assertEquals(schemaService.getEffectiveModelContext(), actualSchemaCtx.getSchemaContext());
     }
 
     @Test
@@ -123,7 +123,7 @@ public class ScanningSchemaServiceProviderTest {
 
     @Test
     public void tryToUpdateSchemaCtxTest() {
-        final SchemaContext baseSchemaContext = schemaService.getSchemaContext();
+        final SchemaContext baseSchemaContext = schemaService.getEffectiveModelContext();
         assertNotNull(baseSchemaContext);
         assertTrue(baseSchemaContext.getModules().size() == 1);
 
@@ -135,7 +135,7 @@ public class ScanningSchemaServiceProviderTest {
         addYang("/empty-test1.yang");
         addYangs(schemaService);
 
-        final SchemaContext nextSchemaContext = schemaService.getSchemaContext();
+        final SchemaContext nextSchemaContext = schemaService.getEffectiveModelContext();
         assertNotNull(baseSchemaContext);
         assertTrue(baseSchemaContext.getModules().size() == 1);
 
index f9db3190aace903f85e4894be313c36c7f65f634..6c2b3faedb3fa8fd4b38bafd1cfc9728a6fc00fa 100644 (file)
@@ -22,14 +22,13 @@ import org.opendaylight.yangtools.concepts.NoOpListenerRegistration;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextListener;
 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
-import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
 import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource;
 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceProvider;
 
 /**
  * {@link DOMSchemaService} (and {@link DOMYangTextSourceProvider}) implementations backed by a
- * {@link SchemaContextProvider} (and {@link SchemaSourceProvider}) which are known to be fixed and never change
+ * {@link EffectiveModelContextProvider} (and {@link SchemaSourceProvider}) which are known to be fixed and never change
  * schemas.
  *
  * @author Michael Vorburger.ch