X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fconfig-manager%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fmanager%2Fimpl%2Futil%2FInterfacesHelperTest.java;h=22ea528030931b5350cd79c0facc30d1c4ed73a5;hb=61e5eb60562051fa0429ba126301c0e325dcb723;hp=6736ba1111d6fb065eea46ad32e1b9deab58fe65;hpb=9fb64948564e252018f9b1e13e7cea2c92f991aa;p=controller.git diff --git a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/util/InterfacesHelperTest.java b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/util/InterfacesHelperTest.java index 6736ba1111..22ea528030 100644 --- a/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/util/InterfacesHelperTest.java +++ b/opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/util/InterfacesHelperTest.java @@ -9,12 +9,17 @@ package org.opendaylight.controller.config.manager.impl.util; import static org.junit.Assert.assertEquals; +import java.util.HashSet; import java.util.Set; import javax.management.MXBean; import org.junit.Test; +import org.opendaylight.controller.config.api.annotations.AbstractServiceInterface; +import org.opendaylight.controller.config.manager.testingservices.seviceinterface.TestingScheduledThreadPoolServiceInterface; +import org.opendaylight.controller.config.manager.testingservices.seviceinterface.TestingThreadPoolServiceInterface; import org.opendaylight.controller.config.spi.Module; +import org.opendaylight.yangtools.concepts.Identifiable; import com.google.common.collect.Sets; @@ -48,7 +53,7 @@ public class InterfacesHelperTest { @Test public void testGetAllInterfaces() { Set> expected = Sets.> newHashSet(SuperA.class, SuperBMXBean.class, SuperC.class, - SubA.class, Module.class, org.opendaylight.protocol.concepts.NamedObject.class); + SubA.class, Identifiable.class, Module.class); assertEquals(expected, InterfacesHelper.getAllInterfaces(SubClass.class)); } @@ -59,4 +64,17 @@ public class InterfacesHelperTest { assertEquals(expected, InterfacesHelper.getMXInterfaces(SubClass.class)); } + @Test + public void testGetAllAbstractServiceInterfaceClasses(){ + Class clazz = TestingScheduledThreadPoolServiceInterface.class; + Set> input = new HashSet<>(); + input.add(clazz); + Set> result = InterfacesHelper.getAllAbstractServiceInterfaceClasses(input); + + Set> expected = Sets.newHashSet((Class) TestingScheduledThreadPoolServiceInterface.class, + TestingThreadPoolServiceInterface.class + ); + assertEquals(expected, result); + } + }