Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
postcodes-io-java
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
James Coyle
postcodes-io-java
Commits
5883f913
Commit
5883f913
authored
Sep 16, 2016
by
Deepak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated tests as per new data
parent
0a11a14f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
37 deletions
+37
-37
src/test/java/com/postcode/io/json/JsonFetcherTest.java
src/test/java/com/postcode/io/json/JsonFetcherTest.java
+2
-2
src/test/resources/postcodeLookupViaPOST.json
src/test/resources/postcodeLookupViaPOST.json
+35
-35
No files found.
src/test/java/com/postcode/io/json/JsonFetcherTest.java
View file @
5883f913
...
...
@@ -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
(
3878
8
4
,
(
result
.
getInt
(
"eastings"
)));
assertEquals
(
3460
21
,
(
result
.
getInt
(
"northings"
)));
assertEquals
(
3878
9
4
,
(
result
.
getInt
(
"eastings"
)));
assertEquals
(
3460
47
,
(
result
.
getInt
(
"northings"
)));
assertEquals
(
"England"
,
(
result
.
getString
(
"country"
)));
assertEquals
(
"West Midlands"
,
(
result
.
getString
(
"nhs_ha"
)));
assertEquals
(-
2.18203015918483
,
result
.
getDouble
(
"longitude"
),
1
);
...
...
src/test/resources/postcodeLookupViaPOST.json
View file @
5883f913
{
"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"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment