diff options
author | lapentafd <francesco.lapenta@est.tech> | 2021-05-27 10:18:49 +0100 |
---|---|---|
committer | lapentafd <francesco.lapenta@est.tech> | 2021-05-31 16:39:15 +0100 |
commit | b6c674891e00f3bac43bd7b4fca06e7a87b8dd34 (patch) | |
tree | 35e0dfe7f60b01e651e1ad8741825419537855de /auth/cli-editor/src/test | |
parent | c70c2179f1555e356794145956cbe32a3407e622 (diff) |
Fix Sonar Issues on Apex-pdp
Changes made into cli-codegen, cli-editor, and core-engine
Renamed one test class to match other test classes
Issue-ID: POLICY-3093
Change-Id: Ib2d947782021590ffc08d426e7a1607a8c33f98a
Signed-off-by: lapentafd <francesco.lapenta@est.tech>
Diffstat (limited to 'auth/cli-editor/src/test')
-rw-r--r-- | auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java index f05757fc8..15b2b98f3 100644 --- a/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java +++ b/auth/cli-editor/src/test/java/org/onap/policy/apex/auth/clieditor/CommandLineCommandTest.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (c) 2020 Nordix Foundation. + * Copyright (c) 2020-2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ package org.onap.policy.apex.auth.clieditor; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import java.util.List; @@ -66,11 +67,11 @@ public class CommandLineCommandTest { commandLineCommand.getApiMethodName(); } - @Test(expected = CommandLineException.class) + @Test() public void testInvalidApiMethod() { commandLineCommand.setApiMethod("fail."); assertEquals("fail.", commandLineCommand.getApiMethod()); - commandLineCommand.getApiMethodName(); + assertThrows(CommandLineException.class, () -> commandLineCommand.getApiMethodName()); } @Test |