diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2024-07-04 10:02:50 +0100 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2024-07-04 10:08:59 +0100 |
commit | d7189c747dfc209f5972bfb8c133c41e9a1e251d (patch) | |
tree | 1e3a57d2b4d86196240abf01b8037c171dfc8be9 | |
parent | cfa75756c40aaabcb236aafca6f5a56f3ce88d85 (diff) |
Fix code smells
Issue-ID: POLICY-5067
Change-Id: I4172b9907fadb7fdc6099ce0c56d069b641f187e
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2 files changed, 2 insertions, 11 deletions
diff --git a/main/src/test/java/org/onap/policy/api/main/service/TestCommonToscaServiceTemplateService.java b/main/src/test/java/org/onap/policy/api/main/service/TestCommonToscaServiceTemplateService.java index 5c92bad1..fcdb9287 100644 --- a/main/src/test/java/org/onap/policy/api/main/service/TestCommonToscaServiceTemplateService.java +++ b/main/src/test/java/org/onap/policy/api/main/service/TestCommonToscaServiceTemplateService.java @@ -1,7 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2022 Bell Canada. All rights reserved. - * Modifications Copyright (C) 2023 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. @@ -81,8 +81,7 @@ public class TestCommonToscaServiceTemplateService { case CREATE_POLICY -> dbSvcTemplate.setToscaTopologyTemplate(svcTemplateFragment.getToscaTopologyTemplate()); case DELETE_POLICY -> dbSvcTemplate.getToscaTopologyTemplate().setPolicies(null); - default -> { - } + default -> Mockito.doNothing(); } } Mockito.when(toscaServiceTemplateRepository.findById(new PfConceptKey(JpaToscaServiceTemplate.DEFAULT_NAME, diff --git a/main/src/test/java/org/onap/policy/api/main/service/TestToscaServiceTemplateServiceForPolicyTypeCrud.java b/main/src/test/java/org/onap/policy/api/main/service/TestToscaServiceTemplateServiceForPolicyTypeCrud.java index 703afce8..929aaf76 100644 --- a/main/src/test/java/org/onap/policy/api/main/service/TestToscaServiceTemplateServiceForPolicyTypeCrud.java +++ b/main/src/test/java/org/onap/policy/api/main/service/TestToscaServiceTemplateServiceForPolicyTypeCrud.java @@ -70,14 +70,6 @@ class TestToscaServiceTemplateServiceForPolicyTypeCrud extends TestCommonToscaSe @InjectMocks private ToscaServiceTemplateService toscaServiceTemplateService; - /** - * Test setup. - */ - @BeforeEach - public void setUp() { - super.setUp(); - } - @Test void testFetchPolicyTypes() { assertThatThrownBy(() -> toscaServiceTemplateService.fetchPolicyTypes("dummy", null)) |