Sync Integ to Master
[sdc.git] / catalog-be / src / test / java / org / openecomp / sdc / be / components / HealthCheckBusinessLogicTest.java
index 2a34bae..04c2100 100644 (file)
 
 package org.openecomp.sdc.be.components;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.List;
-
 import org.junit.Test;
-import org.openecomp.sdc.be.components.impl.HealthCheckBusinessLogic;
+import org.openecomp.sdc.be.components.health.HealthCheckBusinessLogic;
 import org.openecomp.sdc.common.api.Constants;
 import org.openecomp.sdc.common.api.HealthCheckInfo;
 import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 public class HealthCheckBusinessLogicTest {
 
-       HealthCheckBusinessLogic healthCheckBusinessLogic = new HealthCheckBusinessLogic();
-       
-       @Test
-       public void checkStausUpdated() {
+    HealthCheckBusinessLogic healthCheckBusinessLogic = new HealthCheckBusinessLogic();
+
+    @Test
+    public void checkStausUpdated() {
 
-               boolean statusChanged = healthCheckBusinessLogic.anyStatusChanged(null, null);
-               assertFalse("check false", statusChanged);
+        boolean statusChanged = healthCheckBusinessLogic.anyStatusChanged(null, null);
+        assertFalse("check false", statusChanged);
 
-               List<HealthCheckInfo> checkInfosLeft = new ArrayList<HealthCheckInfo>();
-               List<HealthCheckInfo> checkInfosRight = new ArrayList<HealthCheckInfo>();
+        List<HealthCheckInfo> checkInfosLeft = new ArrayList<HealthCheckInfo>();
+        List<HealthCheckInfo> checkInfosRight = new ArrayList<HealthCheckInfo>();
 
-               statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
-               assertFalse("check false", statusChanged);
+        statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
+        assertFalse("check false", statusChanged);
 
-               HealthCheckInfo checkInfoTitanUp = new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.UP, null, null);
-               HealthCheckInfo checkInfoTitanDown = new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.DOWN, null, null);
+        HealthCheckInfo checkInfoTitanUp = new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.UP, null, null);
+        HealthCheckInfo checkInfoTitanDown = new HealthCheckInfo(Constants.HC_COMPONENT_TITAN, HealthCheckStatus.DOWN, null, null);
 
-               /*
-                * HealthCheckInfo checkInfoUebUp = new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.UP, null, null); HealthCheckInfo checkInfoUebDown = new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.DOWN, null, null);
-                */
+        /*
+         * HealthCheckInfo checkInfoUebUp = new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.UP, null, null); HealthCheckInfo checkInfoUebDown = new HealthCheckInfo(HealthCheckComponent.DE, HealthCheckStatus.DOWN, null, null);
+         */
 
-               checkInfosLeft.add(checkInfoTitanUp);
+        checkInfosLeft.add(checkInfoTitanUp);
 
-               checkInfosRight.add(checkInfoTitanUp);
+        checkInfosRight.add(checkInfoTitanUp);
 
-               statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
-               assertFalse("check false", statusChanged);
+        statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
+        assertFalse("check false", statusChanged);
 
-               checkInfosRight.remove(checkInfoTitanUp);
-               statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
-               assertTrue("check true", statusChanged);
+        checkInfosRight.remove(checkInfoTitanUp);
+        statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
+        assertTrue("check true", statusChanged);
 
-               checkInfosRight.add(checkInfoTitanDown);
-               statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
-               assertTrue("check true", statusChanged);
+        checkInfosRight.add(checkInfoTitanDown);
+        statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
+        assertTrue("check true", statusChanged);
 
-               checkInfosRight.remove(checkInfoTitanDown);
-               statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
-               assertTrue("check true", statusChanged);
+        checkInfosRight.remove(checkInfoTitanDown);
+        statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
+        assertTrue("check true", statusChanged);
 
-               checkInfosRight.add(checkInfoTitanUp);
-               statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
-               assertFalse("check false", statusChanged);
+        checkInfosRight.add(checkInfoTitanUp);
+        statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, checkInfosRight);
+        assertFalse("check false", statusChanged);
 
-               statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, null);
-               assertTrue("check true", statusChanged);
+        statusChanged = healthCheckBusinessLogic.anyStatusChanged(checkInfosLeft, null);
+        assertTrue("check true", statusChanged);
 
-       }
+    }
 
 }