Replace possible constants

revert-70aa11f8
Pasindu 7 years ago
parent 931b4ee05b
commit 1450af6af9

@ -132,7 +132,8 @@ public class GeoLocationProviderServiceTest {
String result; String result;
result = geoLocationProviderServiceImpl.getSpeedAlerts(getDeviceIdentifier()); result = geoLocationProviderServiceImpl.getSpeedAlerts(getDeviceIdentifier());
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result, "{'speedLimit':"+SAMPLE_SPEED_ALERT_VALUE+"}"); Assert.assertEquals(result, "{'speedLimit':" +
SAMPLE_SPEED_ALERT_VALUE + "}");
} }
@Test(dependsOnMethods = "createGeoTrafficAlert") @Test(dependsOnMethods = "createGeoTrafficAlert")
@ -142,7 +143,7 @@ public class GeoLocationProviderServiceTest {
Assert.assertNotNull(geoFences); Assert.assertNotNull(geoFences);
GeoFence geoFenceNode = geoFences.get(0); GeoFence geoFenceNode = geoFences.get(0);
Assert.assertEquals(geoFenceNode.getGeoJson(), "{\n" + Assert.assertEquals(geoFenceNode.getGeoJson(), "{\n" +
" \"geoFenceGeoJSON\": \"" + SAMPLE_GEO_JSON + "\"\n" + " \"" + DeviceManagementConstants.GeoServices.GEO_FENCE_GEO_JSON + "\": \"" + SAMPLE_GEO_JSON + "\"\n" +
"}"); "}");
} }
@ -199,7 +200,7 @@ public class GeoLocationProviderServiceTest {
alert.setDeviceId(DEVICE_ID); alert.setDeviceId(DEVICE_ID);
alert.setCepAction("CEP_ACTION"); alert.setCepAction("CEP_ACTION");
alert.setParseData("{\n" + alert.setParseData("{\n" +
" \"geoFenceGeoJSON\": \""+SAMPLE_GEO_JSON+"\"\n" + " \" " + DeviceManagementConstants.GeoServices.GEO_FENCE_GEO_JSON + "\": \"" + SAMPLE_GEO_JSON + "\"\n" +
"}"); "}");
alert.setCustomName(SAMPLE_AREA_NAME); alert.setCustomName(SAMPLE_AREA_NAME);
alert.setExecutionPlan("EXECUTION_PLAN"); alert.setExecutionPlan("EXECUTION_PLAN");
@ -213,7 +214,7 @@ public class GeoLocationProviderServiceTest {
alert.setProximityTime(SAMPLE_PROXIMITY_TIME); alert.setProximityTime(SAMPLE_PROXIMITY_TIME);
alert.setProximityDistance(SAMPLE_PROXIMITY_DISATANCE); alert.setProximityDistance(SAMPLE_PROXIMITY_DISATANCE);
alert.setParseData("{\n" + alert.setParseData("{\n" +
" \"geoFenceGeoJSON\": \""+SAMPLE_GEO_JSON+"\"\n" + " \" " + DeviceManagementConstants.GeoServices.GEO_FENCE_GEO_JSON + "\": \"" + SAMPLE_GEO_JSON + "\"\n" +
"}"); "}");
return alert; return alert;
} }
@ -221,8 +222,8 @@ public class GeoLocationProviderServiceTest {
private Alert getSpeedAlert() { private Alert getSpeedAlert() {
Alert alert = getTestAlert(); Alert alert = getTestAlert();
alert.setParseData("{\n" + alert.setParseData("{\n" +
" \"geoFenceGeoJSON\": \"" + SAMPLE_GEO_JSON + "\",\n" + " \"" + DeviceManagementConstants.GeoServices.GEO_FENCE_GEO_JSON + "\": \"" + SAMPLE_GEO_JSON + "\",\n" +
" \"speedAlertValue\": \"" + SAMPLE_SPEED_ALERT_VALUE + "\"\n" + " \"" + DeviceManagementConstants.GeoServices.SPEED_ALERT_VALUE + "\": \"" + SAMPLE_SPEED_ALERT_VALUE + "\"\n" +
"}"); "}");
return alert; return alert;
} }
@ -235,7 +236,7 @@ public class GeoLocationProviderServiceTest {
alert.setStationeryTime(SAMPLE_STATIONARY_TIME); alert.setStationeryTime(SAMPLE_STATIONARY_TIME);
alert.setFluctuationRadius(SAMPLE_FLUCTUATION_RADIUS); alert.setFluctuationRadius(SAMPLE_FLUCTUATION_RADIUS);
alert.setParseData("{\n" + alert.setParseData("{\n" +
" \"geoFenceGeoJSON\": \"" + SAMPLE_GEO_JSON + "\"\n" + " \"" + DeviceManagementConstants.GeoServices.GEO_FENCE_GEO_JSON + "\": \"" + SAMPLE_GEO_JSON + "\"\n" +
"}"); "}");
return alert; return alert;
} }
@ -244,7 +245,7 @@ public class GeoLocationProviderServiceTest {
Alert alert = new Alert(); Alert alert = new Alert();
alert.setDeviceId(DEVICE_ID); alert.setDeviceId(DEVICE_ID);
alert.setParseData("{\n" + alert.setParseData("{\n" +
" \"geoFenceGeoJSON\": \"" + SAMPLE_GEO_JSON + "\"\n" + " \"" + DeviceManagementConstants.GeoServices.GEO_FENCE_GEO_JSON +"\": \"" + SAMPLE_GEO_JSON + "\"\n" +
"}"); "}");
alert.setCustomName(SAMPLE_AREA_NAME); alert.setCustomName(SAMPLE_AREA_NAME);
alert.setExecutionPlan("EXECUTION_PLAN"); alert.setExecutionPlan("EXECUTION_PLAN");

Loading…
Cancel
Save