diff options
Diffstat (limited to 'policy-management/src/test/java/org')
4 files changed, 62 insertions, 62 deletions
diff --git a/policy-management/src/test/java/org/onap/policy/drools/protocol/configuration/PdpdConfigurationTest.java b/policy-management/src/test/java/org/onap/policy/drools/protocol/configuration/PdpdConfigurationTest.java index 4ab42f44..a21cd5b8 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/protocol/configuration/PdpdConfigurationTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/protocol/configuration/PdpdConfigurationTest.java @@ -222,7 +222,7 @@ public class PdpdConfigurationTest { // List<ControllerConfiguration> controllers2 = new ArrayList<>(); controllers2.add(controller2); - config2.withRequestID(REQUEST_ID2).withEntity(ENTITY2).withController(controllers2); + config2.withRequestId(REQUEST_ID2).withEntity(ENTITY2).withController(controllers2); assertFalse(config.equals(config2)); @@ -249,7 +249,7 @@ public class PdpdConfigurationTest { @Test public void testConstructor() { PdpdConfiguration config = new PdpdConfiguration(REQUEST_ID, ENTITY, null); - assertEquals(config.getRequestID(), REQUEST_ID); + assertEquals(config.getRequestId(), REQUEST_ID); assertEquals(config.getEntity(), ENTITY); } diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java index e56670bd..8e5cf791 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyControllerFactoryTest.java @@ -39,7 +39,7 @@ import org.junit.Before; import org.junit.Test; import org.onap.policy.common.utils.gson.GsonTestUtils; import org.onap.policy.drools.controller.DroolsController; -import org.onap.policy.drools.features.PolicyControllerFeatureAPI; +import org.onap.policy.drools.features.PolicyControllerFeatureApi; import org.onap.policy.drools.protocol.configuration.DroolsConfiguration; public class PolicyControllerFactoryTest { @@ -64,9 +64,9 @@ public class PolicyControllerFactoryTest { private DroolsController drools; private DroolsController drools2; private DroolsConfiguration config; - private PolicyControllerFeatureAPI feature1; - private PolicyControllerFeatureAPI feature2; - private List<PolicyControllerFeatureAPI> providers; + private PolicyControllerFeatureApi feature1; + private PolicyControllerFeatureApi feature2; + private List<PolicyControllerFeatureApi> providers; private IndexedPolicyControllerFactory ipc; /** @@ -80,8 +80,8 @@ public class PolicyControllerFactoryTest { drools = mock(DroolsController.class); drools2 = mock(DroolsController.class); config = mock(DroolsConfiguration.class); - feature1 = mock(PolicyControllerFeatureAPI.class); - feature2 = mock(PolicyControllerFeatureAPI.class); + feature1 = mock(PolicyControllerFeatureApi.class); + feature2 = mock(PolicyControllerFeatureApi.class); providers = Arrays.asList(feature1, feature2); when(feature1.getName()).thenReturn(FEATURE1); @@ -423,7 +423,7 @@ public class PolicyControllerFactoryTest { } @Override - protected List<PolicyControllerFeatureAPI> getProviders() { + protected List<PolicyControllerFeatureApi> getProviders() { return providers; } } diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java index 8050b26a..287f82f5 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyEngineManagerTest.java @@ -53,8 +53,8 @@ import org.onap.policy.common.endpoints.http.server.HttpServletServer; import org.onap.policy.common.endpoints.http.server.HttpServletServerFactory; import org.onap.policy.common.utils.gson.GsonTestUtils; import org.onap.policy.drools.controller.DroolsController; -import org.onap.policy.drools.features.PolicyControllerFeatureAPI; -import org.onap.policy.drools.features.PolicyEngineFeatureAPI; +import org.onap.policy.drools.features.PolicyControllerFeatureApi; +import org.onap.policy.drools.features.PolicyEngineFeatureApi; import org.onap.policy.drools.persistence.SystemPersistence; import org.onap.policy.drools.properties.DroolsProperties; import org.onap.policy.drools.protocol.coders.EventProtocolCoder; @@ -83,12 +83,12 @@ public class PolicyEngineManagerTest { .addHttpServletServerMock().build(); private Properties properties; - private PolicyEngineFeatureAPI prov1; - private PolicyEngineFeatureAPI prov2; - private List<PolicyEngineFeatureAPI> providers; - private PolicyControllerFeatureAPI contProv1; - private PolicyControllerFeatureAPI contProv2; - private List<PolicyControllerFeatureAPI> contProviders; + private PolicyEngineFeatureApi prov1; + private PolicyEngineFeatureApi prov2; + private List<PolicyEngineFeatureApi> providers; + private PolicyControllerFeatureApi contProv1; + private PolicyControllerFeatureApi contProv2; + private List<PolicyControllerFeatureApi> contProviders; private String[] globalInitArgs; private TopicSource source1; private TopicSource source2; @@ -135,11 +135,11 @@ public class PolicyEngineManagerTest { public void setUp() throws Exception { properties = new Properties(); - prov1 = mock(PolicyEngineFeatureAPI.class); - prov2 = mock(PolicyEngineFeatureAPI.class); + prov1 = mock(PolicyEngineFeatureApi.class); + prov2 = mock(PolicyEngineFeatureApi.class); providers = Arrays.asList(prov1, prov2); - contProv1 = mock(PolicyControllerFeatureAPI.class); - contProv2 = mock(PolicyControllerFeatureAPI.class); + contProv1 = mock(PolicyControllerFeatureApi.class); + contProv2 = mock(PolicyControllerFeatureApi.class); contProviders = Arrays.asList(contProv1, contProv2); globalInitArgs = null; source1 = mock(TopicSource.class); @@ -1532,10 +1532,10 @@ public class PolicyEngineManagerTest { * @param verifyAfter verifies that a provider's afterXxx method was invoked * @throws Exception if an error occurs while calling {@link #setUp()} */ - private void checkBeforeAfter(BiConsumer<PolicyEngineFeatureAPI, Boolean> setBefore, - BiConsumer<PolicyEngineFeatureAPI, Boolean> setAfter, Runnable action, - Consumer<PolicyEngineFeatureAPI> verifyBefore, Runnable verifyMiddle, - Consumer<PolicyEngineFeatureAPI> verifyAfter) throws Exception { + private void checkBeforeAfter(BiConsumer<PolicyEngineFeatureApi, Boolean> setBefore, + BiConsumer<PolicyEngineFeatureApi, Boolean> setAfter, Runnable action, + Consumer<PolicyEngineFeatureApi> verifyBefore, Runnable verifyMiddle, + Consumer<PolicyEngineFeatureApi> verifyAfter) throws Exception { checkBeforeAfter_FalseFalse(setBefore, setAfter, action, verifyBefore, verifyMiddle, verifyAfter); checkBeforeAfter_FalseTrue(setBefore, setAfter, action, verifyBefore, verifyMiddle, verifyAfter); @@ -1557,10 +1557,10 @@ public class PolicyEngineManagerTest { * @param verifyAfter verifies that a provider's afterXxx method was invoked * @throws Exception if an error occurs while calling {@link #setUp()} */ - private void checkBeforeAfter_FalseFalse(BiConsumer<PolicyEngineFeatureAPI, Boolean> setBefore, - BiConsumer<PolicyEngineFeatureAPI, Boolean> setAfter, Runnable action, - Consumer<PolicyEngineFeatureAPI> verifyBefore, Runnable verifyMiddle, - Consumer<PolicyEngineFeatureAPI> verifyAfter) throws Exception { + private void checkBeforeAfter_FalseFalse(BiConsumer<PolicyEngineFeatureApi, Boolean> setBefore, + BiConsumer<PolicyEngineFeatureApi, Boolean> setAfter, Runnable action, + Consumer<PolicyEngineFeatureApi> verifyBefore, Runnable verifyMiddle, + Consumer<PolicyEngineFeatureApi> verifyAfter) throws Exception { setUp(); @@ -1598,10 +1598,10 @@ public class PolicyEngineManagerTest { * @param verifyAfter verifies that a provider's afterXxx method was invoked * @throws Exception if an error occurs while calling {@link #setUp()} */ - private void checkBeforeAfter_FalseTrue(BiConsumer<PolicyEngineFeatureAPI, Boolean> setBefore, - BiConsumer<PolicyEngineFeatureAPI, Boolean> setAfter, Runnable action, - Consumer<PolicyEngineFeatureAPI> verifyBefore, Runnable verifyMiddle, - Consumer<PolicyEngineFeatureAPI> verifyAfter) throws Exception { + private void checkBeforeAfter_FalseTrue(BiConsumer<PolicyEngineFeatureApi, Boolean> setBefore, + BiConsumer<PolicyEngineFeatureApi, Boolean> setAfter, Runnable action, + Consumer<PolicyEngineFeatureApi> verifyBefore, Runnable verifyMiddle, + Consumer<PolicyEngineFeatureApi> verifyAfter) throws Exception { setUp(); @@ -1639,10 +1639,10 @@ public class PolicyEngineManagerTest { * @param verifyAfter verifies that a provider's afterXxx method was invoked * @throws Exception if an error occurs while calling {@link #setUp()} */ - private void checkBeforeAfter_TrueFalse(BiConsumer<PolicyEngineFeatureAPI, Boolean> setBefore, - BiConsumer<PolicyEngineFeatureAPI, Boolean> setAfter, Runnable action, - Consumer<PolicyEngineFeatureAPI> verifyBefore, Runnable verifyMiddle, - Consumer<PolicyEngineFeatureAPI> verifyAfter) throws Exception { + private void checkBeforeAfter_TrueFalse(BiConsumer<PolicyEngineFeatureApi, Boolean> setBefore, + BiConsumer<PolicyEngineFeatureApi, Boolean> setAfter, Runnable action, + Consumer<PolicyEngineFeatureApi> verifyBefore, Runnable verifyMiddle, + Consumer<PolicyEngineFeatureApi> verifyAfter) throws Exception { setUp(); @@ -1674,12 +1674,12 @@ public class PolicyEngineManagerTest { private class PolicyEngineManagerImpl extends PolicyEngineManager { @Override - protected List<PolicyEngineFeatureAPI> getEngineProviders() { + protected List<PolicyEngineFeatureApi> getEngineProviders() { return providers; } @Override - protected List<PolicyControllerFeatureAPI> getControllerProviders() { + protected List<PolicyControllerFeatureApi> getControllerProviders() { return contProviders; } diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java index eb226e00..67fdfe65 100644 --- a/policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java +++ b/policy-management/src/test/java/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.java @@ -46,7 +46,7 @@ import org.onap.policy.common.endpoints.event.comm.TopicSink; import org.onap.policy.common.endpoints.event.comm.TopicSource; import org.onap.policy.drools.controller.DroolsController; import org.onap.policy.drools.controller.DroolsControllerFactory; -import org.onap.policy.drools.features.PolicyControllerFeatureAPI; +import org.onap.policy.drools.features.PolicyControllerFeatureApi; import org.onap.policy.drools.persistence.SystemPersistence; import org.onap.policy.drools.protocol.configuration.DroolsConfiguration; import org.onap.policy.drools.system.GsonMgmtTestBuilder; @@ -83,9 +83,9 @@ public class AggregatedPolicyControllerTest { private DroolsControllerFactory droolsFactory; private DroolsController drools; private DroolsConfiguration config; - private List<PolicyControllerFeatureAPI> providers; - private PolicyControllerFeatureAPI prov1; - private PolicyControllerFeatureAPI prov2; + private List<PolicyControllerFeatureApi> providers; + private PolicyControllerFeatureApi prov1; + private PolicyControllerFeatureApi prov2; private AggregatedPolicyController apc; /** @@ -133,8 +133,8 @@ public class AggregatedPolicyControllerTest { droolsFactory = mock(DroolsControllerFactory.class); when(droolsFactory.build(any(), any(), any())).thenReturn(drools); - prov1 = mock(PolicyControllerFeatureAPI.class); - prov2 = mock(PolicyControllerFeatureAPI.class); + prov1 = mock(PolicyControllerFeatureApi.class); + prov2 = mock(PolicyControllerFeatureApi.class); providers = Arrays.asList(prov1, prov2); @@ -797,10 +797,10 @@ public class AggregatedPolicyControllerTest { * and the afterXxx loop was invoked * @param verifyAfter verifies that a provider's afterXxx method was invoked */ - private void checkBeforeAfter(BiConsumer<PolicyControllerFeatureAPI, Boolean> setBefore, - BiConsumer<PolicyControllerFeatureAPI, Boolean> setAfter, Runnable action, - Consumer<PolicyControllerFeatureAPI> verifyBefore, Runnable verifyMiddle, - Consumer<PolicyControllerFeatureAPI> verifyAfter) { + private void checkBeforeAfter(BiConsumer<PolicyControllerFeatureApi, Boolean> setBefore, + BiConsumer<PolicyControllerFeatureApi, Boolean> setAfter, Runnable action, + Consumer<PolicyControllerFeatureApi> verifyBefore, Runnable verifyMiddle, + Consumer<PolicyControllerFeatureApi> verifyAfter) { checkBeforeAfter_FalseFalse(setBefore, setAfter, action, verifyBefore, verifyMiddle, verifyAfter); checkBeforeAfter_FalseTrue(setBefore, setAfter, action, verifyBefore, verifyMiddle, verifyAfter); @@ -821,10 +821,10 @@ public class AggregatedPolicyControllerTest { * and the afterXxx loop was invoked * @param verifyAfter verifies that a provider's afterXxx method was invoked */ - private void checkBeforeAfter_FalseFalse(BiConsumer<PolicyControllerFeatureAPI, Boolean> setBefore, - BiConsumer<PolicyControllerFeatureAPI, Boolean> setAfter, Runnable action, - Consumer<PolicyControllerFeatureAPI> verifyBefore, Runnable verifyMiddle, - Consumer<PolicyControllerFeatureAPI> verifyAfter) { + private void checkBeforeAfter_FalseFalse(BiConsumer<PolicyControllerFeatureApi, Boolean> setBefore, + BiConsumer<PolicyControllerFeatureApi, Boolean> setAfter, Runnable action, + Consumer<PolicyControllerFeatureApi> verifyBefore, Runnable verifyMiddle, + Consumer<PolicyControllerFeatureApi> verifyAfter) { setUp(); @@ -861,10 +861,10 @@ public class AggregatedPolicyControllerTest { * and the afterXxx loop was invoked * @param verifyAfter verifies that a provider's afterXxx method was invoked */ - private void checkBeforeAfter_FalseTrue(BiConsumer<PolicyControllerFeatureAPI, Boolean> setBefore, - BiConsumer<PolicyControllerFeatureAPI, Boolean> setAfter, Runnable action, - Consumer<PolicyControllerFeatureAPI> verifyBefore, Runnable verifyMiddle, - Consumer<PolicyControllerFeatureAPI> verifyAfter) { + private void checkBeforeAfter_FalseTrue(BiConsumer<PolicyControllerFeatureApi, Boolean> setBefore, + BiConsumer<PolicyControllerFeatureApi, Boolean> setAfter, Runnable action, + Consumer<PolicyControllerFeatureApi> verifyBefore, Runnable verifyMiddle, + Consumer<PolicyControllerFeatureApi> verifyAfter) { setUp(); @@ -901,10 +901,10 @@ public class AggregatedPolicyControllerTest { * and the afterXxx loop was invoked * @param verifyAfter verifies that a provider's afterXxx method was invoked */ - private void checkBeforeAfter_TrueFalse(BiConsumer<PolicyControllerFeatureAPI, Boolean> setBefore, - BiConsumer<PolicyControllerFeatureAPI, Boolean> setAfter, Runnable action, - Consumer<PolicyControllerFeatureAPI> verifyBefore, Runnable verifyMiddle, - Consumer<PolicyControllerFeatureAPI> verifyAfter) { + private void checkBeforeAfter_TrueFalse(BiConsumer<PolicyControllerFeatureApi, Boolean> setBefore, + BiConsumer<PolicyControllerFeatureApi, Boolean> setAfter, Runnable action, + Consumer<PolicyControllerFeatureApi> verifyBefore, Runnable verifyMiddle, + Consumer<PolicyControllerFeatureApi> verifyAfter) { setUp(); @@ -955,7 +955,7 @@ public class AggregatedPolicyControllerTest { } @Override - protected List<PolicyControllerFeatureAPI> getProviders() { + protected List<PolicyControllerFeatureApi> getProviders() { return providers; } } |