From 54800b25c8bcb27725c559e5fe7329dc46daf1a0 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 19 Feb 2018 10:24:33 -0500 Subject: Rename utils-test testXxx() methods Fixed sonar complaints about the testXxx_Yyy() methods in the XxxTester classes. In most cases, they were renamed to testYyy(). The top-level method, test(), was not renamed so-as not to break existing tests that already depend on it. Renamed testStringConstuctor() to testString(). Change-Id: I00e8993c71fa9d9cb83bea82276d9706dd0e7c45 Issue-ID: POLICY-246 Signed-off-by: Jim Hahn --- .../policy/common/utils/test/ExceptionsTester.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java') diff --git a/utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java b/utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java index b4091080..3a43b943 100644 --- a/utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java +++ b/utils-test/src/main/java/org/onap/policy/common/utils/test/ExceptionsTester.java @@ -46,7 +46,7 @@ public class ExceptionsTester extends ThrowablesTester { * if the constructed objects fail to pass various tests */ public int test(Class claz) { - int ncons = testException(claz); + int ncons = testAllException(claz); assertTrue(ncons > 0); @@ -67,13 +67,13 @@ public class ExceptionsTester extends ThrowablesTester { * @throws AssertionError * if the constructed objects fail to pass various tests */ - public int testException(Class claz) { + public int testAllException(Class claz) { int ncons = 0; - ncons += testThrowable(claz); - ncons += testException_Exception(claz); - ncons += testException_StringException(claz); - ncons += testException_StringExceptionBooleanBoolean(claz); + ncons += testAllThrowable(claz); + ncons += testException(claz); + ncons += testStringException(claz); + ncons += testStringExceptionBooleanBoolean(claz); return ncons; } @@ -100,7 +100,7 @@ public class ExceptionsTester extends ThrowablesTester { * @throws AssertionError * if the constructed objects fail to pass various tests */ - public int testException_Exception(Class claz) { + public int testException(Class claz) { Constructor cons = getConstructor(claz, "exception", Exception.class); if (cons == null) { return 0; @@ -137,7 +137,7 @@ public class ExceptionsTester extends ThrowablesTester { * @throws ConstructionError * if the Exception subclass cannot be constructed */ - public int testException_StringException(Class claz) { + public int testStringException(Class claz) { Constructor cons = getConstructor(claz, "string-exception", String.class, Exception.class); if (cons == null) { return 0; @@ -176,7 +176,7 @@ public class ExceptionsTester extends ThrowablesTester { * @throws ConstructionError * if the Exception subclass cannot be constructed */ - public int testException_StringExceptionBooleanBoolean(Class claz) { + public int testStringExceptionBooleanBoolean(Class claz) { Constructor cons = getConstructor(claz, "string-exception-flags", String.class, Exception.class, Boolean.TYPE, Boolean.TYPE); if (cons == null) { @@ -184,10 +184,10 @@ public class ExceptionsTester extends ThrowablesTester { } // test each combination of "message" and "cause" - testThrowable_MessageCauseCombos(cons); + testMessageCauseCombos(cons); // test each combination of the boolean flags - testThrowable_FlagCombos(cons); + testFlagCombos(cons); return 1; } -- cgit 1.2.3-korg