diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-07-10 17:22:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-10 17:22:33 +0000 |
commit | 02cca1af69d0fe7c6b453d26dd8d57ee13a33b8e (patch) | |
tree | 55e457a3ca6178b24fe011e1845ff5c82ee29752 | |
parent | 1e98209f55b36e6601095172f7f92f291c3ac0ee (diff) | |
parent | bc23c135fbddf419560c6c5c70bf888fd8fdc964 (diff) |
Merge "Reformat sdnr devicemanager-gran to ONAP code style"
5 files changed, 75 insertions, 75 deletions
diff --git a/sdnr/wt/devicemanager-gran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/GRanNetworkElement.java b/sdnr/wt/devicemanager-gran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/GRanNetworkElement.java index 239711f0a..7698a4a8e 100644 --- a/sdnr/wt/devicemanager-gran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/GRanNetworkElement.java +++ b/sdnr/wt/devicemanager-gran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/GRanNetworkElement.java @@ -40,7 +40,7 @@ public class GRanNetworkElement implements NetworkElement { private final DataProvider databaseService; public GRanNetworkElement(NetconfAccessor netconfAccess, DataProvider databaseService) { - log.info("Create {}",GRanNetworkElement.class.getSimpleName()); + log.info("Create {}", GRanNetworkElement.class.getSimpleName()); this.netconfAccessor = netconfAccess; this.databaseService = databaseService; } @@ -52,12 +52,12 @@ public class GRanNetworkElement implements NetworkElement { @Override public void deregister() { - log.info("deRegister actions should be here"); + log.info("deRegister actions should be here"); } @Override public void warmstart() { - log.info("Warmstart actions should be here"); + log.info("Warmstart actions should be here"); } @Override diff --git a/sdnr/wt/devicemanager-gran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/GRanNetworkElementFactory.java b/sdnr/wt/devicemanager-gran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/GRanNetworkElementFactory.java index 6c54e4213..81cdf7536 100644 --- a/sdnr/wt/devicemanager-gran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/GRanNetworkElementFactory.java +++ b/sdnr/wt/devicemanager-gran/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/GRanNetworkElementFactory.java @@ -31,13 +31,13 @@ public class GRanNetworkElementFactory implements NetworkElementFactory { private static final Logger log = LoggerFactory.getLogger(GRanNetworkElementFactory.class); - @Override - public Optional<NetworkElement> create(NetconfAccessor acessor, DeviceManagerServiceProvider serviceProvider) { + @Override + public Optional<NetworkElement> create(NetconfAccessor acessor, DeviceManagerServiceProvider serviceProvider) { if (acessor.getCapabilites().isSupportingNamespace(TopGrp.QNAME)) { - log.info("Create device {} ",GRanNetworkElement.class.getName()); + log.info("Create device {} ", GRanNetworkElement.class.getName()); return Optional.of(new GRanNetworkElement(acessor, serviceProvider.getDataProvider())); } else { return Optional.empty(); } - } + } } diff --git a/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestDeviceManagerGRanImpl.java b/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestDeviceManagerGRanImpl.java index aeb50e83f..86865277f 100644 --- a/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestDeviceManagerGRanImpl.java +++ b/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestDeviceManagerGRanImpl.java @@ -27,22 +27,22 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServic import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NetconfNetworkElementService; public class TestDeviceManagerGRanImpl { - GRanNetworkElementFactory factory = new GRanNetworkElementFactory(); - DeviceManagerServiceProvider serviceProvider; - - @Test - public void test() throws Exception { - serviceProvider = mock(DeviceManagerServiceProvider.class); - NetconfNetworkElementService netconfNetworkElementService = mock(NetconfNetworkElementService.class); - when(netconfNetworkElementService.registerNetworkElementFactory(factory)).thenReturn(null); - when(netconfNetworkElementService.getServiceProvider()).thenReturn(serviceProvider); - - DeviceManagerGRanImpl devMgrGRan = new DeviceManagerGRanImpl(); - - devMgrGRan.setNetconfNetworkElementService(netconfNetworkElementService); - devMgrGRan.init(); - devMgrGRan.close(); - - } + GRanNetworkElementFactory factory = new GRanNetworkElementFactory(); + DeviceManagerServiceProvider serviceProvider; + + @Test + public void test() throws Exception { + serviceProvider = mock(DeviceManagerServiceProvider.class); + NetconfNetworkElementService netconfNetworkElementService = mock(NetconfNetworkElementService.class); + when(netconfNetworkElementService.registerNetworkElementFactory(factory)).thenReturn(null); + when(netconfNetworkElementService.getServiceProvider()).thenReturn(serviceProvider); + + DeviceManagerGRanImpl devMgrGRan = new DeviceManagerGRanImpl(); + + devMgrGRan.setNetconfNetworkElementService(netconfNetworkElementService); + devMgrGRan.init(); + devMgrGRan.close(); + + } } diff --git a/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestGRanNetworkElement.java b/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestGRanNetworkElement.java index b13965933..a9393cd0e 100644 --- a/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestGRanNetworkElement.java +++ b/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestGRanNetworkElement.java @@ -29,27 +29,27 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology. public class TestGRanNetworkElement { - private static final String NODEID = "node1"; - - @Test - public void test() { - NetconfAccessor netconfAccessor = mock(NetconfAccessor.class); - DataProvider databaseService = mock(DataProvider.class); - - when(netconfAccessor.getNodeId()).thenReturn(new NodeId(NODEID)); - - GRanNetworkElement gRanNe = new GRanNetworkElement(netconfAccessor, databaseService); - assertEquals(3, gRanNe.getDeviceType().getIntValue()); - assertEquals("RAN3GPP", gRanNe.getDeviceType().getName()); - assertEquals(NODEID, gRanNe.getNodeId().getValue()); - - gRanNe.register(); - gRanNe.deregister(); - gRanNe.warmstart(); - gRanNe.getAcessor(); - gRanNe.getService(null); - - } + private static final String NODEID = "node1"; + + @Test + public void test() { + NetconfAccessor netconfAccessor = mock(NetconfAccessor.class); + DataProvider databaseService = mock(DataProvider.class); + + when(netconfAccessor.getNodeId()).thenReturn(new NodeId(NODEID)); + + GRanNetworkElement gRanNe = new GRanNetworkElement(netconfAccessor, databaseService); + assertEquals(3, gRanNe.getDeviceType().getIntValue()); + assertEquals("RAN3GPP", gRanNe.getDeviceType().getName()); + assertEquals(NODEID, gRanNe.getNodeId().getValue()); + + gRanNe.register(); + gRanNe.deregister(); + gRanNe.warmstart(); + gRanNe.getAcessor(); + gRanNe.getService(null); + + } } diff --git a/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestGRanNetworkElementFactory.java b/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestGRanNetworkElementFactory.java index 4d0417bf7..b307d8877 100644 --- a/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestGRanNetworkElementFactory.java +++ b/sdnr/wt/devicemanager-gran/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/gran/test/TestGRanNetworkElementFactory.java @@ -33,36 +33,36 @@ import org.opendaylight.yang.gen.v1.urn._3gpp.tsg.sa5.nrm.top.rev180731.TopGrp; public class TestGRanNetworkElementFactory { - Capabilities capabilities; - NetconfAccessor netconfAccessor; - DeviceManagerServiceProvider devMgrService; - - @SuppressWarnings("unused") - @Before - public void init() { - capabilities = mock(Capabilities.class); - netconfAccessor = mock(NetconfAccessor.class); - devMgrService = mock(DeviceManagerServiceProvider.class); - - when(netconfAccessor.getCapabilites()).thenReturn(capabilities); - when(devMgrService.getDataProvider()).thenReturn(null); - - } - - @Test - public void testCreate() throws Exception { - when(netconfAccessor.getCapabilites().isSupportingNamespace(TopGrp.QNAME)).thenReturn(true); - - GRanNetworkElementFactory gRanNeFactory = new GRanNetworkElementFactory(); - assertTrue((gRanNeFactory.create(netconfAccessor, devMgrService)).isPresent()); - } + Capabilities capabilities; + NetconfAccessor netconfAccessor; + DeviceManagerServiceProvider devMgrService; - @Test - public void testCreateNone() throws Exception { - when(netconfAccessor.getCapabilites().isSupportingNamespace(TopGrp.QNAME)).thenReturn(false); - - GRanNetworkElementFactory gRanNeFactory = new GRanNetworkElementFactory(); - assertTrue(!(gRanNeFactory.create(netconfAccessor, devMgrService).isPresent())); - } + @SuppressWarnings("unused") + @Before + public void init() { + capabilities = mock(Capabilities.class); + netconfAccessor = mock(NetconfAccessor.class); + devMgrService = mock(DeviceManagerServiceProvider.class); + + when(netconfAccessor.getCapabilites()).thenReturn(capabilities); + when(devMgrService.getDataProvider()).thenReturn(null); + + } + + @Test + public void testCreate() throws Exception { + when(netconfAccessor.getCapabilites().isSupportingNamespace(TopGrp.QNAME)).thenReturn(true); + + GRanNetworkElementFactory gRanNeFactory = new GRanNetworkElementFactory(); + assertTrue((gRanNeFactory.create(netconfAccessor, devMgrService)).isPresent()); + } + + @Test + public void testCreateNone() throws Exception { + when(netconfAccessor.getCapabilites().isSupportingNamespace(TopGrp.QNAME)).thenReturn(false); + + GRanNetworkElementFactory gRanNeFactory = new GRanNetworkElementFactory(); + assertTrue(!(gRanNeFactory.create(netconfAccessor, devMgrService).isPresent())); + } } |