From 6fb8dfad11c84c0833e842183ec43a4ee95e81de Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 14 Jul 2020 08:55:33 -0400 Subject: Update adaptors to sodium Update sli/adaptors to OpenDaylight Sodium release. 2 changes were needed: - mdsal-resource : needed to add unimplemented abstract methods in inner anonymous BundleContext class in test case. - resource-assignment: needed to correct unit test problems that were ignored in earlier versions of h2 Change-Id: Ice63bfce64768e46c4376db55e3e9e97d0b934ad Issue-ID: CCSDK-2551 Signed-off-by: Dan Timoney --- .../resource/mdsal/TestMdsalResourceActivator.java | 49 ++++++++++++++++++---- 1 file changed, 41 insertions(+), 8 deletions(-) (limited to 'mdsal-resource') diff --git a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourceActivator.java b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourceActivator.java index 397915d0..6174bc84 100644 --- a/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourceActivator.java +++ b/mdsal-resource/provider/src/test/java/org/onap/ccsdk/sli/adaptors/resource/mdsal/TestMdsalResourceActivator.java @@ -30,7 +30,9 @@ import org.osgi.framework.BundleListener; import org.osgi.framework.Filter; import org.osgi.framework.FrameworkListener; import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.ServiceFactory; import org.osgi.framework.ServiceListener; +import org.osgi.framework.ServiceObjects; import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceRegistration; @@ -49,8 +51,7 @@ public class TestMdsalResourceActivator { mdsal = new MdsalResourceActivator(); } - - @Test (expected = ConfigurationException.class) + @Test(expected = ConfigurationException.class) public void testStartResource() throws Exception { BundleContext ctx = new BundleContext() { @Override @@ -119,27 +120,32 @@ public class TestMdsalResourceActivator { } @Override - public ServiceRegistration registerService(String[] clazzes, Object service, Dictionary properties) { + public ServiceRegistration registerService(String[] clazzes, Object service, + Dictionary properties) { return null; } @Override - public ServiceRegistration registerService(String clazz, Object service, Dictionary properties) { + public ServiceRegistration registerService(String clazz, Object service, + Dictionary properties) { return null; } @Override - public ServiceRegistration registerService(Class clazz, S service, Dictionary properties) { + public ServiceRegistration registerService(Class clazz, S service, + Dictionary properties) { return null; } @Override - public ServiceReference[] getServiceReferences(String clazz, String filter) throws InvalidSyntaxException { + public ServiceReference[] getServiceReferences(String clazz, String filter) + throws InvalidSyntaxException { return new ServiceReference[0]; } @Override - public ServiceReference[] getAllServiceReferences(String clazz, String filter) throws InvalidSyntaxException { + public ServiceReference[] getAllServiceReferences(String clazz, String filter) + throws InvalidSyntaxException { return new ServiceReference[0]; } @@ -154,7 +160,8 @@ public class TestMdsalResourceActivator { } @Override - public Collection> getServiceReferences(Class clazz, String filter) throws InvalidSyntaxException { + public Collection> getServiceReferences(Class clazz, String filter) + throws InvalidSyntaxException { return null; } @@ -182,6 +189,19 @@ public class TestMdsalResourceActivator { public Bundle getBundle(String location) { return null; } + + @Override + public ServiceRegistration registerService(Class clazz, ServiceFactory factory, + Dictionary properties) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ServiceObjects getServiceObjects(ServiceReference reference) { + // TODO Auto-generated method stub + return null; + } }; mdsal.start(ctx); @@ -320,6 +340,19 @@ public class TestMdsalResourceActivator { public Bundle getBundle(String location) { return null; } + + @Override + public ServiceRegistration registerService(Class clazz, ServiceFactory factory, + Dictionary properties) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ServiceObjects getServiceObjects(ServiceReference reference) { + // TODO Auto-generated method stub + return null; + } }; mdsal.stop(ctx); -- cgit 1.2.3-korg