Technical debt and fix JUnit test 17/30317/1
authorPamela Dragosh <pdragosh@research.att.com>
Mon, 5 Feb 2018 17:50:06 +0000 (12:50 -0500)
committerPamela Dragosh <pdragosh@research.att.com>
Mon, 5 Feb 2018 17:50:13 +0000 (12:50 -0500)
* One statement per line
* private constructor for class with statics
* Fix silly JUnit test

Issue-ID: POLICY-474
Change-Id: Ie760826879febbbc4db4f03079ae1f847f2194dd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
PolicyEngineAPI/src/test/java/org/onap/policy/std/test/NotificationStoreTest.java
PolicyEngineUtils/src/main/java/org/onap/policy/std/NotificationStore.java
PolicyEngineUtils/src/main/java/org/onap/policy/utils/PolicyUtils.java

index ed7383e..a453736 100644 (file)
@@ -33,19 +33,6 @@ import static org.junit.Assert.*;
  * @version $Revision: 1.0 $
  */
 public class NotificationStoreTest {
-       /**
-        * Run the NotificationStore() constructor test.
-        *
-        * @generatedBy CodePro at 6/1/16 1:40 PM
-        */
-       @Test
-       public void testNotificationStore_1()
-               throws Exception {
-               NotificationStore result = new NotificationStore();
-               assertNotNull(result);
-               // add additional test code here
-       }
-
        /**
         * Run the void recordNotification(StdPDPNotification) method test.
         *
index 47b2360..24e1263 100644 (file)
@@ -40,7 +40,7 @@ public class NotificationStore {
 
     private static StdPDPNotification notificationRecord = new StdPDPNotification();
 
-    public NotificationStore () {
+    private NotificationStore () {
        // Sonar prefers that we have an empty public constructor
        // as opposed to an implicit public constructor.
     }
index c058a79..0f38232 100644 (file)
@@ -194,7 +194,9 @@ public class PolicyUtils {
             return false;
         }
         for (char c : number.toCharArray()){
-            if (!Character.isDigit(c)) return false;
+            if (!Character.isDigit(c)) {
+               return false;
+            }
         }
         return true;
     }