diff options
author | waynedunican <wayne.dunican@est.tech> | 2024-07-23 09:23:51 +0100 |
---|---|---|
committer | waynedunican <wayne.dunican@est.tech> | 2024-08-13 08:49:10 +0100 |
commit | b7804abcf865dc58a01bed3f2be4756e731d9288 (patch) | |
tree | 7f6fc3b50622578bb8612de9fe5e5c6adddfaf28 /models-interactions/model-actors/actor.aai | |
parent | a029ccab07f2dd71286804da620c513da9fdfc0e (diff) |
Improve code coverage and sonar fixes
Increased code coverage to 90%
SONAR - Removed TODO comments
SONAR - Added NOSONAR where appropriate
SONAR - Replaced stream.Collect() with stream.toList() where applicable
SONAR - Made variables serializable or transient to comply with sonar rules
Issue-ID: POLICY-5069
Change-Id: Ife256eaf4e6f427fe40b138bacc6f112dc5bcea4
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'models-interactions/model-actors/actor.aai')
4 files changed, 11 insertions, 11 deletions
diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java index 8768aec7b..7a101cb8d 100644 --- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java +++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperationTest.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2023, 2024 Nordix Foundation. + * Modifications Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,7 +82,7 @@ class AaiCustomQueryOperationTest extends BasicAaiOperation { * Sets up. */ @BeforeEach - void setUp() throws Exception { + void setUp() { super.setUpBasic(); oper = new AaiCustomQueryOperation(params, config); @@ -166,7 +166,7 @@ class AaiCustomQueryOperationTest extends BasicAaiOperation { } @Test - void testGetVserverLink() throws Exception { + void testGetVserverLink() { oper.setProperty(OperationProperties.AAI_VSERVER_LINK, MY_LINK); assertEquals(MY_LINK, oper.getVserverLink()); } @@ -194,7 +194,7 @@ class AaiCustomQueryOperationTest extends BasicAaiOperation { private OperationResult getResult(CompletableFuture<OperationOutcome> future2) - throws InterruptedException, ExecutionException, TimeoutException { + throws InterruptedException, ExecutionException { executor.runAll(100); assertTrue(future2.isDone()); diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java index e9890b748..831edcc70 100644 --- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java +++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetOperationTest.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2023, 2024 Nordix Foundation. + * Modifications Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -66,7 +66,7 @@ class AaiGetOperationTest extends BasicAaiOperation { * Sets up. */ @BeforeEach - void setUp() throws Exception { + void setUp() { super.setUpBasic(); oper = new AaiGetOperation(params, config); } diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java index cf2bb1b62..bed847a10 100644 --- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java +++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetPnfOperationTest.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2023, 2024 Nordix Foundation. + * Modifications Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -75,7 +75,7 @@ class AaiGetPnfOperationTest extends BasicAaiOperation { * Sets up. */ @BeforeEach - void setUp() throws Exception { + void setUp() { super.setUpBasic(); oper = new AaiGetPnfOperation(params, config); oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY); @@ -174,7 +174,7 @@ class AaiGetPnfOperationTest extends BasicAaiOperation { * Tests startOperationAsync() when a property is missing. */ @Test - void testStartOperationAsyncMissingProperty() throws Exception { + void testStartOperationAsyncMissingProperty() { oper = new AaiGetPnfOperation(params, config); oper.generateSubRequestId(1); diff --git a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java index 65d3fe831..e3beb52ac 100644 --- a/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java +++ b/models-interactions/model-actors/actor.aai/src/test/java/org/onap/policy/controlloop/actor/aai/AaiGetTenantOperationTest.java @@ -75,7 +75,7 @@ class AaiGetTenantOperationTest extends BasicAaiOperation { * Sets up. */ @BeforeEach - void setUp() throws Exception { + void setUp() { super.setUpBasic(); oper = new AaiGetTenantOperation(params, config); oper.setProperty(OperationProperties.AAI_TARGET_ENTITY, TARGET_ENTITY); @@ -174,7 +174,7 @@ class AaiGetTenantOperationTest extends BasicAaiOperation { * Tests startOperationAsync() when a property is missing. */ @Test - void testStartOperationAsyncMissingProperty() throws Exception { + void testStartOperationAsyncMissingProperty() { oper = new AaiGetTenantOperation(params, config); oper.generateSubRequestId(1); |