diff options
author | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2020-07-10 17:47:11 +0200 |
---|---|---|
committer | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2020-07-10 17:47:25 +0200 |
commit | 49ae7927cb3137ed8ae645278082d03c83ffd940 (patch) | |
tree | 8040df647d83eec16001304ecd4e4401ceb72421 /sdnr/wt/netconfnode-state-service/provider/src/test/java | |
parent | 23c27ddcd79913d11eac16eb42c5a43899de97a1 (diff) |
Reformat sdnr netconfnode-state-service to ONAP code style
Reformat to ONAP code style
Issue-ID: SDNC-1276
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: Ib7faecb419770d8ffb4b25d5d34446a2cd71fc7f
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/netconfnode-state-service/provider/src/test/java')
11 files changed, 51 insertions, 51 deletions
diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestAkkaConfig.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestAkkaConfig.java index dd317c781..a420b5e91 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestAkkaConfig.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestAkkaConfig.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test; import static org.junit.Assert.fail; @@ -108,7 +108,7 @@ public class TestAkkaConfig { String failMessage = "failed: " + e.getMessage(); System.out.println(failMessage); fail(failMessage); - } + } } @Test @@ -123,7 +123,7 @@ public class TestAkkaConfig { System.out.println("testing clusternode config1"); System.out.println("==========================="); cfg = AkkaConfig.load(file.getAbsolutePath()); - System.out.println("succeeded: "+cfg.hashCode()); + System.out.println("succeeded: " + cfg.hashCode()); System.out.println(cfg.toString()); System.out.println(String.format("found %d cluster nodes", cfg.getClusterConfig().getSeedNodes().size())); for (ClusterNodeInfo n : cfg.getClusterConfig().getSeedNodes()) { diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestGeoConfig.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestGeoConfig.java index 915c88d50..327a87d2b 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestGeoConfig.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestGeoConfig.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test; import static org.junit.Assert.*; diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java index 5427c0339..eb07a48f1 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/TestNetconfNodeStateService.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= ONAP : ccsdk * feature sdnr wt ================================================================================ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. @@ -12,7 +12,7 @@ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test; import static org.mockito.Mockito.mock; @@ -149,8 +149,7 @@ public class TestNetconfNodeStateService { System.out.println("Test2: Register state listener"); NetconfNodeStateListener nSL = mock(NetconfNodeStateListener.class); - ListenerRegistration<NetconfNodeStateListener> res = - netconfStateService.registerNetconfNodeStateListener(nSL); + ListenerRegistration<NetconfNodeStateListener> res = netconfStateService.registerNetconfNodeStateListener(nSL); assertNotNull("Result should be null", res); res.getInstance(); res.close(); @@ -163,7 +162,7 @@ public class TestNetconfNodeStateService { NetconfNodeConnectListener nCL = mock(NetconfNodeConnectListener.class); ListenerRegistration<NetconfNodeConnectListener> res = - netconfStateService.registerNetconfNodeConnectListener(nCL); + netconfStateService.registerNetconfNodeConnectListener(nCL); assertNotNull("Result should be null", res); res.getInstance(); res.close(); @@ -212,7 +211,7 @@ public class TestNetconfNodeStateService { //verify that it was called one time and nodeId is the expected ArgumentCaptor<NetconfAccessor> varArgs = ArgumentCaptor.forClass(NetconfAccessor.class); verify(nCL).onEnterConnected(varArgs.capture()); - System.out.println("Accessor "+varArgs.getValue().getNodeId()); + System.out.println("Accessor " + varArgs.getValue().getNodeId()); assertEquals(nodeIdString, varArgs.getValue().getNodeId().getValue()); } @@ -252,7 +251,7 @@ public class TestNetconfNodeStateService { ListenableFuture<RpcResult<GetStatusOutput>> statusOutput = api.getStatus(statusInput.build()); RpcResult<GetStatusOutput> res = statusOutput.get(); GetStatusOutput output = res.getResult(); - System.out.println("Output "+output); + System.out.println("Output " + output); } @@ -269,15 +268,16 @@ public class TestNetconfNodeStateService { FaultNotification fault = faultBuilder.build(); PushFaultNotificationInputBuilder statusInput = new PushFaultNotificationInputBuilder(); statusInput.fieldsFrom(fault); - ListenableFuture<RpcResult<PushFaultNotificationOutput>> rpcOutput = api.pushFaultNotification(statusInput.build()); + ListenableFuture<RpcResult<PushFaultNotificationOutput>> rpcOutput = + api.pushFaultNotification(statusInput.build()); RpcResult<PushFaultNotificationOutput> res = rpcOutput.get(); PushFaultNotificationOutput output = res.getResult(); //verify that it was called one time - verify(vNL,times(1)).onNotification(fault); + verify(vNL, times(1)).onNotification(fault); registration.close(); - System.out.println("Output "+output); + System.out.println("Output " + output); } @Test @@ -293,15 +293,16 @@ public class TestNetconfNodeStateService { AttributeChangeNotification change = changeBuilder.build(); PushAttributeChangeNotificationInputBuilder statusInput = new PushAttributeChangeNotificationInputBuilder(); statusInput.fieldsFrom(change); - ListenableFuture<RpcResult<PushAttributeChangeNotificationOutput>> rpcOutput = api.pushAttributeChangeNotification(statusInput.build()); + ListenableFuture<RpcResult<PushAttributeChangeNotificationOutput>> rpcOutput = + api.pushAttributeChangeNotification(statusInput.build()); RpcResult<PushAttributeChangeNotificationOutput> res = rpcOutput.get(); PushAttributeChangeNotificationOutput output = res.getResult(); //verify that it was called one time - verify(vNL,times(1)).onNotification(change); + verify(vNL, times(1)).onNotification(change); registration.close(); - System.out.println("Output "+output); + System.out.println("Output " + output); } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/ClusterSingletonServiceProviderMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/ClusterSingletonServiceProviderMock.java index 86340c052..cc502b4aa 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/ClusterSingletonServiceProviderMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/ClusterSingletonServiceProviderMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================================== * ONAP : ccsdk feature sdnr wt * ================================================================================================= @@ -14,7 +14,7 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. * ============LICENSE_END========================================================================== - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; @@ -24,14 +24,14 @@ import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceRegist public class ClusterSingletonServiceProviderMock implements ClusterSingletonServiceProvider { - @Override - public void close() throws Exception { + @Override + public void close() throws Exception { - } + } - @Override - public ClusterSingletonServiceRegistration registerClusterSingletonService(ClusterSingletonService service) { - return null; - } + @Override + public ClusterSingletonServiceRegistration registerClusterSingletonService(ClusterSingletonService service) { + return null; + } } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerMountpointMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerMountpointMock.java index 48401c881..ebcf5fb40 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerMountpointMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerMountpointMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import org.eclipse.jdt.annotation.NonNull; diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerNetconfMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerNetconfMock.java index 90ab8608c..7db577cc8 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerNetconfMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/DataBrokerNetconfMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import java.util.Collection; @@ -64,7 +64,7 @@ public class DataBrokerNetconfMock implements DataBroker { @Override public <T extends DataObject, L extends DataTreeChangeListener<T>> @NonNull ListenerRegistration<L> registerDataTreeChangeListener( @NonNull DataTreeIdentifier<T> treeId, @NonNull L pListener) { - System.out.println("Register "+pListener.getClass().getName()); + System.out.println("Register " + pListener.getClass().getName()); if (pListener instanceof ClusteredDataTreeChangeListener) { System.out.println("Clustered listener"); this.listenerClustered = (ClusteredDataTreeChangeListener<Node>) pListener; @@ -80,8 +80,7 @@ public class DataBrokerNetconfMock implements DataBroker { } @Override - public void close() { - } + public void close() {} }; } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointMock.java index e5bff451d..77d5e5e38 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt sdnr-wt-devicemanager-provider * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; @@ -57,12 +57,13 @@ public class MountPointMock implements MountPoint { @Override public <T extends BindingService> Optional<T> getService(Class<T> service) { - System.out.println("Requested mountpoint service: "+service.getSimpleName()+" databrokerAbsent state: "+databrokerAbsent); + System.out.println("Requested mountpoint service: " + service.getSimpleName() + " databrokerAbsent state: " + + databrokerAbsent); Optional<? extends BindingService> res; if (service.isInstance(dataBroker)) { System.out.println("Delivering databroker"); - res = databrokerAbsent ? Optional.empty() : Optional.of(dataBroker); + res = databrokerAbsent ? Optional.empty() : Optional.of(dataBroker); } else if (service.isInstance(rpcConsumerRegistry)) { System.out.println("Delivering RpcConsumerRegistryMock"); res = Optional.of(rpcConsumerRegistry); @@ -76,7 +77,7 @@ public class MountPointMock implements MountPoint { return (Optional<T>) res; } - public void setDatabrokerAbsent( boolean state) { + public void setDatabrokerAbsent(boolean state) { this.databrokerAbsent = state; } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointServiceMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointServiceMock.java index 127019633..996549e3d 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointServiceMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/MountPointServiceMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import java.util.Optional; diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/NotificationPublishServiceMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/NotificationPublishServiceMock.java index 0564c56a3..2b3e00f5c 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/NotificationPublishServiceMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/NotificationPublishServiceMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import com.google.common.util.concurrent.ListenableFuture; @@ -32,14 +32,13 @@ public class NotificationPublishServiceMock implements NotificationPublishServic return null; } - @Override + @Override public ListenableFuture<?> offerNotification(Notification notification, int timeout, TimeUnit unit) throws InterruptedException { return null; } @Override - public void putNotification(Notification notification) throws InterruptedException { - } + public void putNotification(Notification notification) throws InterruptedException {} } diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcConsumerRegistryMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcConsumerRegistryMock.java index 7e48ff2e5..8eea79abc 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcConsumerRegistryMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcConsumerRegistryMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt sdnr-wt-devicemanager-provider * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; diff --git a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcProviderRegistryMock.java b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcProviderRegistryMock.java index fbcb21db9..f2f6c0e68 100644 --- a/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcProviderRegistryMock.java +++ b/sdnr/wt/netconfnode-state-service/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/netconfnodestateservice/test/mock/RpcProviderRegistryMock.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * ============LICENSE_START======================================================= * ONAP : ccsdk feature sdnr wt * ================================================================================ @@ -17,7 +17,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - ******************************************************************************/ + */ package org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.test.mock; import java.util.Set; |