aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-onf/provider/src/test
diff options
context:
space:
mode:
authorMichael Dürre <michael.duerre@highstreet-technologies.com>2020-07-29 08:35:29 +0200
committerKAPIL SINGAL <ks220y@att.com>2020-07-29 13:23:01 +0000
commit461cc15c741776837b59b8779e0f5bb683657a10 (patch)
tree2bee62133b014b975b659fdd3daba641ce27a2cd /sdnr/wt/devicemanager-onf/provider/src/test
parent4aaaeb525cb04023147527da0164bbf7152fc9fd (diff)
update devicemanager onf
sodium fixes and some small other changes Issue-ID: CCSDK-2576 Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com> Change-Id: I58670cbfbd10c90bd6ade65a0e59d2e7d543cebe
Diffstat (limited to 'sdnr/wt/devicemanager-onf/provider/src/test')
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java6
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java189
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java199
3 files changed, 13 insertions, 381 deletions
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java
index 403451799..095446f0b 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java
@@ -81,8 +81,7 @@ public class TestONFCoreNetworkElement12Equipment {
@Test
public void test() {
when(capabilities.isSupportingNamespaceAndRevision(WrapperEquipmentPacRev170402.QNAME)).thenReturn(true);
- ONFCoreNetworkElement12Equipment onfCoreEqpt =
- new ONFCoreNetworkElement12Equipment(netconfAccessor, coreData, capabilities);
+ ONFCoreNetworkElement12Equipment onfCoreEqpt = new ONFCoreNetworkElement12Equipment(netconfAccessor, coreData);
onfCoreEqpt.addProblemsofNode(faultData);
onfCoreEqpt.addProblemsofNodeObject("ABCD");
onfCoreEqpt.getInventoryInformation(Arrays.asList("TESTINV"));
@@ -96,8 +95,7 @@ public class TestONFCoreNetworkElement12Equipment {
@Test
public void test1() {
when(capabilities.isSupportingNamespaceAndRevision(WrapperEquipmentPacRev170402.QNAME)).thenReturn(false);
- ONFCoreNetworkElement12Equipment onfCoreEqpt =
- new ONFCoreNetworkElement12Equipment(netconfAccessor, coreData, capabilities);
+ ONFCoreNetworkElement12Equipment onfCoreEqpt = new ONFCoreNetworkElement12Equipment(netconfAccessor, coreData);
}
}
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java
index 242014fc0..cfdc5988e 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java
@@ -94,134 +94,6 @@ public class TestONFCoreNetworkElement12Basic {
}
@Test
- public void test() {
- optionalNe = new NetworkElement() {
-
- @Override
- public @Nullable List<Label> getLabel() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<Extension> getExtension() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable OperationalState getOperationalState() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable LifecycleState getLifecycleState() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable AdministrativeState getAdministrativeState() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable AdministrativeControl getAdministrativeControl() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<Name> getName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable UniversalId getUuid() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<LocalId> getLocalId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public <E$$ extends Augmentation<NetworkElement>> @Nullable E$$ augmentation(Class<E$$> augmentationType) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Class<? extends DataContainer> getImplementedInterface() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<Ltp> getLtp() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<Fd> getFd() {
- // TODO Auto-generated method stub
- return null;
- }
- };
-
- when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL,
- NETWORKELEMENT_IID)).thenReturn(optionalNe);
-
- ONFCoreNetworkElement12Basic onfCoreNetworkElement12Basic =
- new ONFCoreNetworkElement12Basic(accessor, serviceProvider, configuration);
- onfCoreNetworkElement12Basic.prepareCheck();
-
- /*
- * EventlogEntity eventlogEntity = new EventlogEntity() {
- *
- * @Override public @Nullable String getId() { // TODO Auto-generated method
- * stub return null; }
- *
- * @Override public @Nullable DateAndTime getTimestamp() { // TODO
- * Auto-generated method stub return null; }
- *
- * @Override public @Nullable String getObjectId() { // TODO Auto-generated
- * method stub return "ABCD"; }
- *
- * @Override public @Nullable String getNodeId() { // TODO Auto-generated method
- * stub return null; }
- *
- * @Override public @Nullable Integer getCounter() { // TODO Auto-generated
- * method stub return null; }
- *
- * @Override public @Nullable SourceType getSourceType() { // TODO
- * Auto-generated method stub return null; }
- *
- * @Override public @Nullable String getNewValue() { // TODO Auto-generated
- * method stub return null; }
- *
- * @Override public @Nullable String getAttributeName() { // TODO Auto-generated
- * method stub return
- * "/network-element/extension[value-name=\"top-level-equipment\"]/value"; //
- * "/equipment-pac/equipment-current-problems"; }
- *
- * @Override public Class<? extends DataContainer> getImplementedInterface() {
- * // TODO Auto-generated method stub return null; } };
- *
- * onfCoreNetworkElement12Basic.notificationActor(eventlogEntity);
- */
-
- }
-
-
- @Test
public void test1() {
when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL,
NETWORKELEMENT_IID)).thenReturn(null);
@@ -230,63 +102,10 @@ public class TestONFCoreNetworkElement12Basic {
new ONFCoreNetworkElement12Microwave(accessor, serviceProvider, configuration, onfMicrowaveModel);
onfCoreNetworkElement12MW.prepareCheck();
- EventlogEntity eventlogEntity = new EventlogEntity() {
-
- @Override
- public @Nullable String getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable DateAndTime getTimestamp() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getObjectId() {
- // TODO Auto-generated method stub
- return "ABCD";
- }
-
- @Override
- public @Nullable String getNodeId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable Integer getCounter() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable SourceType getSourceType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getNewValue() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getAttributeName() {
- // TODO Auto-generated method stub
- return "/equipment-pac/equipment-current-problems";
- }
-
- @Override
- public Class<? extends DataContainer> getImplementedInterface() {
- // TODO Auto-generated method stub
- return null;
- }
- };
-
+ EventlogEntity eventlogEntity = mock(EventlogEntity.class);
+ when(eventlogEntity.getObjectId()).thenReturn("ABCD");
+ when(eventlogEntity.getAttributeName()).thenReturn("/equipment-pac/equipment-current-problems");
+
onfCoreNetworkElement12MW.notificationActor(eventlogEntity);
}
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java
index dcef80916..221ca40ed 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java
@@ -94,86 +94,7 @@ public class TestONFCoreNetworkElement12Microwave {
@Test
public void test() {
- optionalNe = new NetworkElement() {
-
- @Override
- public @Nullable List<Label> getLabel() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<Extension> getExtension() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable OperationalState getOperationalState() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable LifecycleState getLifecycleState() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable AdministrativeState getAdministrativeState() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable AdministrativeControl getAdministrativeControl() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<Name> getName() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable UniversalId getUuid() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<LocalId> getLocalId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public <E$$ extends Augmentation<NetworkElement>> @Nullable E$$ augmentation(Class<E$$> augmentationType) {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public Class<? extends DataContainer> getImplementedInterface() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<Ltp> getLtp() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable List<Fd> getFd() {
- // TODO Auto-generated method stub
- return null;
- }
- };
+ optionalNe = mock(NetworkElement.class);
when(accessor.getTransactionUtils().readData(accessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL,
NETWORKELEMENT_IID)).thenReturn(optionalNe);
@@ -182,62 +103,9 @@ public class TestONFCoreNetworkElement12Microwave {
new ONFCoreNetworkElement12Microwave(accessor, serviceProvider, configuration, onfMicrowaveModel);
onfCoreNetworkElement12MW.prepareCheck();
- EventlogEntity eventlogEntity = new EventlogEntity() {
-
- @Override
- public @Nullable String getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable DateAndTime getTimestamp() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getObjectId() {
- // TODO Auto-generated method stub
- return "ABCD";
- }
-
- @Override
- public @Nullable String getNodeId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable Integer getCounter() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable SourceType getSourceType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getNewValue() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getAttributeName() {
- // TODO Auto-generated method stub
- return "/network-element/extension[value-name=\"top-level-equipment\"]/value"; // "/equipment-pac/equipment-current-problems";
- }
-
- @Override
- public Class<? extends DataContainer> getImplementedInterface() {
- // TODO Auto-generated method stub
- return null;
- }
- };
+ EventlogEntity eventlogEntity = mock(EventlogEntity.class);
+ when(eventlogEntity.getObjectId()).thenReturn("ABCD");
+ when(eventlogEntity.getAttributeName()).thenReturn("/network-element/extension[value-name=\"top-level-equipment\"]/value");
onfCoreNetworkElement12MW.notificationActor(eventlogEntity);
@@ -253,62 +121,9 @@ public class TestONFCoreNetworkElement12Microwave {
new ONFCoreNetworkElement12Microwave(accessor, serviceProvider, configuration, onfMicrowaveModel);
onfCoreNetworkElement12MW.prepareCheck();
- EventlogEntity eventlogEntity = new EventlogEntity() {
-
- @Override
- public @Nullable String getId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable DateAndTime getTimestamp() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getObjectId() {
- // TODO Auto-generated method stub
- return "ABCD";
- }
-
- @Override
- public @Nullable String getNodeId() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable Integer getCounter() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable SourceType getSourceType() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getNewValue() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public @Nullable String getAttributeName() {
- // TODO Auto-generated method stub
- return "/equipment-pac/equipment-current-problems";
- }
-
- @Override
- public Class<? extends DataContainer> getImplementedInterface() {
- // TODO Auto-generated method stub
- return null;
- }
- };
+ EventlogEntity eventlogEntity = mock(EventlogEntity.class);
+ when(eventlogEntity.getObjectId()).thenReturn("ABCD");
+ when(eventlogEntity.getAttributeName()).thenReturn("/equipment-pac/equipment-current-problems");
onfCoreNetworkElement12MW.notificationActor(eventlogEntity);
}