diff options
Diffstat (limited to 'src/test/java/org')
-rw-r--r-- | src/test/java/org/onap/clamp/clds/AbstractItCase.java | 4 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/CldsReferencePropertiesItCase.java (renamed from src/test/java/org/onap/clamp/clds/it/RefPropItCase.java) | 4 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/HolmesPolicyDelegateItCase.java | 4 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/OperationPolicyReqItCase.java | 6 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java | 8 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java | 54 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java | 8 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/TcaRequestFormatterItCase.java | 2 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java | 4 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/model/prop/CustomModelElementTest.java | 1 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java | 4 |
11 files changed, 54 insertions, 45 deletions
diff --git a/src/test/java/org/onap/clamp/clds/AbstractItCase.java b/src/test/java/org/onap/clamp/clds/AbstractItCase.java index 2903248b6..7e2908841 100644 --- a/src/test/java/org/onap/clamp/clds/AbstractItCase.java +++ b/src/test/java/org/onap/clamp/clds/AbstractItCase.java @@ -25,7 +25,7 @@ package org.onap.clamp.clds; import org.junit.BeforeClass; import org.onap.clamp.clds.client.req.policy.PolicyClient; -import org.onap.clamp.clds.model.refprop.RefProp; +import org.onap.clamp.clds.config.CldsReferenceProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ActiveProfiles; @@ -33,7 +33,7 @@ import org.springframework.test.context.ActiveProfiles; public abstract class AbstractItCase { @Autowired - protected RefProp refProp; + protected CldsReferenceProperties refProp; @Autowired protected PolicyClient policyClient; diff --git a/src/test/java/org/onap/clamp/clds/it/RefPropItCase.java b/src/test/java/org/onap/clamp/clds/it/CldsReferencePropertiesItCase.java index 8f76b1822..6c94fc16f 100644 --- a/src/test/java/org/onap/clamp/clds/it/RefPropItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/CldsReferencePropertiesItCase.java @@ -41,9 +41,9 @@ import org.springframework.test.context.junit4.SpringRunner; */ @RunWith(SpringRunner.class) @SpringBootTest -public class RefPropItCase extends AbstractItCase { +public class CldsReferencePropertiesItCase extends AbstractItCase { - protected static final EELFLogger logger = EELFManager.getInstance().getLogger(RefPropItCase.class); + protected static final EELFLogger logger = EELFManager.getInstance().getLogger(CldsReferencePropertiesItCase.class); /** * Test getting prop value as a JSON Node / template. diff --git a/src/test/java/org/onap/clamp/clds/it/HolmesPolicyDelegateItCase.java b/src/test/java/org/onap/clamp/clds/it/HolmesPolicyDelegateItCase.java index 6f5c24d5e..c530a059f 100644 --- a/src/test/java/org/onap/clamp/clds/it/HolmesPolicyDelegateItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/HolmesPolicyDelegateItCase.java @@ -31,8 +31,8 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.onap.clamp.clds.AbstractItCase; import org.onap.clamp.clds.client.HolmesPolicyDelegate; -import org.onap.clamp.clds.model.prop.Holmes; -import org.onap.clamp.clds.model.prop.ModelProperties; +import org.onap.clamp.clds.model.properties.Holmes; +import org.onap.clamp.clds.model.properties.ModelProperties; import org.onap.clamp.clds.util.ResourceFileUtil; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; diff --git a/src/test/java/org/onap/clamp/clds/it/OperationPolicyReqItCase.java b/src/test/java/org/onap/clamp/clds/it/OperationPolicyReqItCase.java index 9013e0c41..873b01922 100644 --- a/src/test/java/org/onap/clamp/clds/it/OperationPolicyReqItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/OperationPolicyReqItCase.java @@ -38,9 +38,9 @@ import org.junit.runner.RunWith; import org.onap.clamp.clds.AbstractItCase; import org.onap.clamp.clds.client.req.policy.OperationalPolicyReq; import org.onap.clamp.clds.model.CldsEvent; -import org.onap.clamp.clds.model.prop.ModelProperties; -import org.onap.clamp.clds.model.prop.Policy; -import org.onap.clamp.clds.model.prop.PolicyChain; +import org.onap.clamp.clds.model.properties.ModelProperties; +import org.onap.clamp.clds.model.properties.Policy; +import org.onap.clamp.clds.model.properties.PolicyChain; import org.onap.clamp.clds.util.ResourceFileUtil; import org.onap.policy.api.AttributeType; import org.onap.policy.controlloop.policy.builder.BuilderException; diff --git a/src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java b/src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java index 71bd2d521..0e8a21772 100644 --- a/src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/PolicyClientItCase.java @@ -37,10 +37,10 @@ import org.onap.clamp.clds.AbstractItCase; import org.onap.clamp.clds.client.req.policy.OperationalPolicyReq; import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter; import org.onap.clamp.clds.model.CldsEvent; -import org.onap.clamp.clds.model.prop.ModelProperties; -import org.onap.clamp.clds.model.prop.Policy; -import org.onap.clamp.clds.model.prop.PolicyChain; -import org.onap.clamp.clds.model.prop.Tca; +import org.onap.clamp.clds.model.properties.ModelProperties; +import org.onap.clamp.clds.model.properties.Policy; +import org.onap.clamp.clds.model.properties.PolicyChain; +import org.onap.clamp.clds.model.properties.Tca; import org.onap.clamp.clds.util.ResourceFileUtil; import org.onap.policy.api.AttributeType; import org.springframework.boot.test.context.SpringBootTest; diff --git a/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java b/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java index 548212ef8..7f962215b 100644 --- a/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java @@ -35,10 +35,10 @@ import org.mockito.Mockito; import org.onap.clamp.clds.AbstractItCase; import org.onap.clamp.clds.client.req.sdc.SdcCatalogServices; import org.onap.clamp.clds.model.CldsAlarmCondition; -import org.onap.clamp.clds.model.CldsSdcResource; -import org.onap.clamp.clds.model.CldsSdcResourceBasicInfo; -import org.onap.clamp.clds.model.CldsSdcServiceInfo; import org.onap.clamp.clds.model.CldsServiceData; +import org.onap.clamp.clds.model.sdc.SdcResource; +import org.onap.clamp.clds.model.sdc.SdcResourceBasicInfo; +import org.onap.clamp.clds.model.sdc.SdcServiceInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @@ -55,33 +55,33 @@ public class SdcCatalogServicesItCase extends AbstractItCase { @Test public void removeDuplicateServicesTest() { - CldsSdcServiceInfo service1a = new CldsSdcServiceInfo(); + SdcServiceInfo service1a = new SdcServiceInfo(); service1a.setName("service1"); service1a.setVersion("1.0"); service1a.setInvariantUUID("invariantUUID1.0"); - List<CldsSdcServiceInfo> rawCldsSdcServiceList = new LinkedList<>(); + List<SdcServiceInfo> rawCldsSdcServiceList = new LinkedList<>(); rawCldsSdcServiceList.add(service1a); rawCldsSdcServiceList.add(service1a); - CldsSdcServiceInfo service1b = new CldsSdcServiceInfo(); + SdcServiceInfo service1b = new SdcServiceInfo(); service1b.setName("service1"); service1b.setVersion("1.1"); service1b.setInvariantUUID("invariantUUID1.1"); rawCldsSdcServiceList.add(service1b); - CldsSdcServiceInfo service1c = new CldsSdcServiceInfo(); + SdcServiceInfo service1c = new SdcServiceInfo(); service1c.setName("service1"); service1c.setVersion("1.2"); service1c.setInvariantUUID("invariantUUID1.2"); rawCldsSdcServiceList.add(service1c); - CldsSdcServiceInfo service2 = new CldsSdcServiceInfo(); + SdcServiceInfo service2 = new SdcServiceInfo(); service2.setName("service2"); service2.setVersion("1.0"); service2.setInvariantUUID("invariantUUID2.0"); rawCldsSdcServiceList.add(service2); SdcCatalogServices catalogServices = new SdcCatalogServices(); - List<CldsSdcServiceInfo> resultList = catalogServices.removeDuplicateServices(rawCldsSdcServiceList); + List<SdcServiceInfo> resultList = catalogServices.removeDuplicateServices(rawCldsSdcServiceList); assertTrue(resultList.size() == 2); - CldsSdcServiceInfo res1; - CldsSdcServiceInfo res2; + SdcServiceInfo res1; + SdcServiceInfo res2; if ("service1".equals(resultList.get(0).getName())) { res1 = resultList.get(0); res2 = resultList.get(1); @@ -97,27 +97,27 @@ public class SdcCatalogServicesItCase extends AbstractItCase { @Test public void removeDuplicateSdcResourceInstancesTest() { - List<CldsSdcResource> rawCldsSdcResourceList = new LinkedList<>(); - CldsSdcResource sdcResource1a = new CldsSdcResource(); + List<SdcResource> rawCldsSdcResourceList = new LinkedList<>(); + SdcResource sdcResource1a = new SdcResource(); sdcResource1a.setResourceInstanceName("resource1"); sdcResource1a.setResourceVersion("1.0"); rawCldsSdcResourceList.add(sdcResource1a); - CldsSdcResource sdcResource1b = new CldsSdcResource(); + SdcResource sdcResource1b = new SdcResource(); sdcResource1b.setResourceInstanceName("resource1"); sdcResource1b.setResourceVersion("1.1"); rawCldsSdcResourceList.add(sdcResource1b); - CldsSdcResource sdcResource1c = new CldsSdcResource(); + SdcResource sdcResource1c = new SdcResource(); sdcResource1c.setResourceInstanceName("resource1"); sdcResource1c.setResourceVersion("1.2"); rawCldsSdcResourceList.add(sdcResource1c); - CldsSdcResource sdcResource2 = new CldsSdcResource(); + SdcResource sdcResource2 = new SdcResource(); sdcResource2.setResourceInstanceName("resource2"); sdcResource2.setResourceVersion("1.0"); rawCldsSdcResourceList.add(sdcResource2); SdcCatalogServices catalogServices = new SdcCatalogServices(); - List<CldsSdcResource> resultList = catalogServices.removeDuplicateSdcResourceInstances(rawCldsSdcResourceList); - CldsSdcResource res1; - CldsSdcResource res2; + List<SdcResource> resultList = catalogServices.removeDuplicateSdcResourceInstances(rawCldsSdcResourceList); + SdcResource res1; + SdcResource res2; if ("resource1".equals(resultList.get(0).getResourceInstanceName())) { res1 = resultList.get(0); res2 = resultList.get(1); @@ -133,28 +133,28 @@ public class SdcCatalogServicesItCase extends AbstractItCase { @Test public void removeDuplicateSdcResourceBasicInfoTest() { - List<CldsSdcResourceBasicInfo> rawCldsSdcResourceList = new LinkedList<>(); - CldsSdcResourceBasicInfo sdcResource1a = new CldsSdcResourceBasicInfo(); + List<SdcResourceBasicInfo> rawCldsSdcResourceList = new LinkedList<>(); + SdcResourceBasicInfo sdcResource1a = new SdcResourceBasicInfo(); sdcResource1a.setName("resource1"); sdcResource1a.setVersion("1.0"); rawCldsSdcResourceList.add(sdcResource1a); - CldsSdcResourceBasicInfo sdcResource1b = new CldsSdcResourceBasicInfo(); + SdcResourceBasicInfo sdcResource1b = new SdcResourceBasicInfo(); sdcResource1b.setName("resource1"); sdcResource1b.setVersion("1.1"); rawCldsSdcResourceList.add(sdcResource1b); - CldsSdcResourceBasicInfo sdcResource1c = new CldsSdcResourceBasicInfo(); + SdcResourceBasicInfo sdcResource1c = new SdcResourceBasicInfo(); sdcResource1c.setName("resource1"); sdcResource1c.setVersion("1.2"); rawCldsSdcResourceList.add(sdcResource1c); - CldsSdcResourceBasicInfo sdcResource2 = new CldsSdcResourceBasicInfo(); + SdcResourceBasicInfo sdcResource2 = new SdcResourceBasicInfo(); sdcResource2.setName("resource2"); sdcResource2.setVersion("1.0"); rawCldsSdcResourceList.add(sdcResource2); SdcCatalogServices catalogServices = new SdcCatalogServices(); - List<CldsSdcResourceBasicInfo> resultList = catalogServices + List<SdcResourceBasicInfo> resultList = catalogServices .removeDuplicateSdcResourceBasicInfo(rawCldsSdcResourceList); - CldsSdcResourceBasicInfo res1; - CldsSdcResourceBasicInfo res2; + SdcResourceBasicInfo res1; + SdcResourceBasicInfo res2; if ("resource1".equals(resultList.get(0).getName())) { res1 = resultList.get(0); res2 = resultList.get(1); diff --git a/src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java b/src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java index afff9dd7d..2efc52866 100644 --- a/src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/SdcReqItCase.java @@ -36,9 +36,9 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.clamp.clds.AbstractItCase; -import org.onap.clamp.clds.client.req.sdc.SdcReq; +import org.onap.clamp.clds.client.req.sdc.SdcRequests; import org.onap.clamp.clds.model.CldsEvent; -import org.onap.clamp.clds.model.prop.ModelProperties; +import org.onap.clamp.clds.model.properties.ModelProperties; import org.onap.clamp.clds.util.ResourceFileUtil; import org.skyscreamer.jsonassert.JSONAssert; import org.springframework.beans.factory.annotation.Autowired; @@ -50,7 +50,7 @@ import org.springframework.test.context.junit4.SpringRunner; public class SdcReqItCase extends AbstractItCase { @Autowired - private SdcReq sdcReq; + private SdcRequests sdcReq; private String modelBpmnProp; private String modelBpmn; private String modelName; @@ -98,7 +98,7 @@ public class SdcReqItCase extends AbstractItCase { @Test public void getSdcReqUrlsListTest() throws GeneralSecurityException, DecoderException { - List<String> listUrls = sdcReq.getSdcReqUrlsList(modelProperties, refProp.getStringValue("sdc.serviceUrl")); + List<String> listUrls = sdcReq.getSdcReqUrlsList(modelProperties); assertNotNull(listUrls); assertTrue(listUrls.size() == 1); assertTrue(listUrls.get(0).contains( diff --git a/src/test/java/org/onap/clamp/clds/it/TcaRequestFormatterItCase.java b/src/test/java/org/onap/clamp/clds/it/TcaRequestFormatterItCase.java index 419bfde22..c290a386b 100644 --- a/src/test/java/org/onap/clamp/clds/it/TcaRequestFormatterItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/TcaRequestFormatterItCase.java @@ -35,7 +35,7 @@ import org.junit.runner.RunWith; import org.onap.clamp.clds.AbstractItCase; import org.onap.clamp.clds.client.req.tca.TcaRequestFormatter; import org.onap.clamp.clds.model.CldsEvent; -import org.onap.clamp.clds.model.prop.ModelProperties; +import org.onap.clamp.clds.model.properties.ModelProperties; import org.onap.clamp.clds.util.ResourceFileUtil; import org.skyscreamer.jsonassert.JSONAssert; import org.springframework.boot.test.context.SpringBootTest; diff --git a/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java b/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java index 138d727c0..d3694aea4 100644 --- a/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java +++ b/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElement.java @@ -25,6 +25,10 @@ package org.onap.clamp.clds.model.prop; import com.fasterxml.jackson.databind.JsonNode;
+import org.onap.clamp.clds.model.properties.AbstractModelElement;
+import org.onap.clamp.clds.model.properties.ModelBpmn;
+import org.onap.clamp.clds.model.properties.ModelProperties;
+
/**
* A CustomModelElement to test the capability to add new elements on the fly.
*/
diff --git a/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElementTest.java b/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElementTest.java index 46c70e55e..851556a6c 100644 --- a/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElementTest.java +++ b/src/test/java/org/onap/clamp/clds/model/prop/CustomModelElementTest.java @@ -27,6 +27,7 @@ import java.io.IOException; import org.junit.Assert;
import org.junit.Test;
+import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.util.ResourceFileUtil;
public class CustomModelElementTest {
diff --git a/src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java b/src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java index 7bb11a9ef..a7ab94c57 100644 --- a/src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java +++ b/src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java @@ -32,6 +32,10 @@ import java.io.IOException; import org.junit.Before; import org.junit.Test; import org.onap.clamp.clds.model.CldsModel; +import org.onap.clamp.clds.model.properties.Holmes; +import org.onap.clamp.clds.model.properties.ModelProperties; +import org.onap.clamp.clds.model.properties.Policy; +import org.onap.clamp.clds.model.properties.Tca; import org.onap.clamp.clds.util.ResourceFileUtil; /** |