Commit 5883f913 authored by Deepak's avatar Deepak

Updated tests as per new data

parent 0a11a14f
......@@ -95,8 +95,8 @@ public class JsonFetcherTest {
JSONObject result = jsonArray.getJSONObject(i).getJSONObject("result");
assertEquals("ST4 2EU", (result.getString("postcode")));
assertEquals(1, (result.getInt("quality")));
assertEquals(387884, (result.getInt("eastings")));
assertEquals(346021, (result.getInt("northings")));
assertEquals(387894, (result.getInt("eastings")));
assertEquals(346047, (result.getInt("northings")));
assertEquals("England", (result.getString("country")));
assertEquals("West Midlands", (result.getString("nhs_ha")));
assertEquals(-2.18203015918483, result.getDouble("longitude"), 1);
......
{
"status": 200,
"result": [
{
"query": "OX49 5NU",
"result": {
"postcode": "OX49 5NU",
"quality": 1,
"eastings": 464447,
"northings": 195647,
"country": "England",
"nhs_ha": "South Central",
"longitude": -1.06977254466896,
"latitude": 51.6559271444373,
"parliamentary_constituency": "Henley",
"european_electoral_region": "South East",
"primary_care_trust": "Oxfordshire",
"region": "South East",
"lsoa": "South Oxfordshire 011B",
"msoa": "South Oxfordshire 011",
"incode": "5NU",
"outcode": "OX49",
"admin_district": "South Oxfordshire",
"parish": "Brightwell Baldwin",
"admin_county": "Oxfordshire",
"admin_ward": "Chalgrove",
"ccg": "NHS Oxfordshire",
"nuts": "Oxfordshire",
"codes": {
"admin_district": "E07000179",
"admin_county": "E10000025",
"admin_ward": "E05009735",
"parish": "E04008109",
"ccg": "E38000136",
"nuts": "UKJ14"
}
}
},
{
"query": "M32 0JG",
"result": {
......@@ -36,41 +71,6 @@
}
}
},
{
"query": "OX49 5NU",
"result": {
"postcode": "OX49 5NU",
"quality": 1,
"eastings": 464440,
"northings": 195671,
"country": "England",
"nhs_ha": "South Central",
"longitude": -1.06986930435083,
"latitude": 51.656143706615,
"parliamentary_constituency": "Henley",
"european_electoral_region": "South East",
"primary_care_trust": "Oxfordshire",
"region": "South East",
"lsoa": "South Oxfordshire 011B",
"msoa": "South Oxfordshire 011",
"incode": "5NU",
"outcode": "OX49",
"admin_district": "South Oxfordshire",
"parish": "Brightwell Baldwin",
"admin_county": "Oxfordshire",
"admin_ward": "Chalgrove",
"ccg": "NHS Oxfordshire",
"nuts": "Oxfordshire",
"codes": {
"admin_district": "E07000179",
"admin_county": "E10000025",
"admin_ward": "E05009735",
"parish": "E04008109",
"ccg": "E38000136",
"nuts": "UKJ14"
}
}
},
{
"query": "NE30 1DP",
"result": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment