aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/java/org/onap/policy/pap/main/rest/e2e/StatisticsTest.java
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-12-03 11:27:32 +0000
committera.sreekumar <ajith.sreekumar@bell.ca>2021-12-14 17:58:20 +0000
commit4694c152f69380f4d3d64bde0a13d15fb59a71f3 (patch)
tree38c9e0b1117323c58536706a66830109225d6200 /main/src/test/java/org/onap/policy/pap/main/rest/e2e/StatisticsTest.java
parentc51fa0d4e953518571a115af4afdea80a17ed605 (diff)
Migrate pap startup & controllers to spring boot
This commit migrates pap config, startup and controllers to spring boot. Change-Id: Icf91d728160a23db614dfba6b40ddccd2f6163a5 Issue-ID: POLICY-3754 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'main/src/test/java/org/onap/policy/pap/main/rest/e2e/StatisticsTest.java')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/e2e/StatisticsTest.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/e2e/StatisticsTest.java b/main/src/test/java/org/onap/policy/pap/main/rest/e2e/StatisticsTest.java
index 0f1b560f..1331e458 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/e2e/StatisticsTest.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/e2e/StatisticsTest.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2020-2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,8 +39,10 @@ import org.onap.policy.models.base.PfModelException;
import org.onap.policy.models.base.PfModelRuntimeException;
import org.onap.policy.models.pdp.concepts.PdpStatistics;
import org.onap.policy.models.provider.PolicyModelsProvider;
+import org.onap.policy.models.provider.PolicyModelsProviderFactory;
import org.onap.policy.pap.main.PapConstants;
-import org.onap.policy.pap.main.PolicyModelsProviderFactoryWrapper;
+import org.onap.policy.pap.main.parameters.CommonTestData;
+import org.onap.policy.pap.main.parameters.PapParameterGroup;
import org.onap.policy.pap.main.rest.PapStatisticsManager;
import org.onap.policy.pap.main.rest.StatisticsReport;
@@ -57,10 +60,10 @@ public class StatisticsTest extends End2EndBase {
public static void setUpBeforeClass() throws Exception {
End2EndBase.setUpBeforeClass();
- PolicyModelsProviderFactoryWrapper modelProviderWrapper =
- Registry.get(PapConstants.REG_PAP_DAO_FACTORY, PolicyModelsProviderFactoryWrapper.class);
-
- try (PolicyModelsProvider databaseProvider = modelProviderWrapper.create()) {
+ PolicyModelsProviderFactory modelProviderWrapper = new PolicyModelsProviderFactory();
+ PapParameterGroup parameterGroup = new CommonTestData().getPapParameterGroup(6969);
+ try (PolicyModelsProvider databaseProvider =
+ modelProviderWrapper.createPolicyModelsProvider(parameterGroup.getDatabaseProviderParameters())) {
PdpStatistics pdpStatisticsRecord = new PdpStatistics();
pdpStatisticsRecord.setPdpGroupName("defaultGroup");
pdpStatisticsRecord.setPdpSubGroupName("apex");