From 5d5a3d122f82ef9b65d61bcd48e0dc9b73e703c8 Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Wed, 18 Jul 2018 18:19:10 -0400 Subject: [PATCH] Add some simple test cases --- .../test_cases/search_address.json | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 projects/south-africa/test_cases/search_address.json diff --git a/projects/south-africa/test_cases/search_address.json b/projects/south-africa/test_cases/search_address.json new file mode 100644 index 0000000..33e1143 --- /dev/null +++ b/projects/south-africa/test_cases/search_address.json @@ -0,0 +1,88 @@ +{ + "name": "/v1/search address", + "description": "addresses in Portland, OR", + "priorityThresh": 1, + "normalizers": { + "name": [ + "toUpperCase", + "removeOrdinals", + "stripPunctuation", + "abbreviateDirectionals", + "abbreviateStreetSuffixes" + ] + }, + "tests": [ + { + "id": 1, + "status": "pass", + "in": { + "text": "900 park street, tshwane, south africa" + }, + "expected": { + "properties": [ + { + "name": "900 Park Street", + "locality": "Tshwane", + "country_a": "ZAF" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "in": { + "text": "200 Smit Street, Hillbrow" + }, + "expected": { + "properties": [ + { + "match_type": "interpolated", + "name": "200 Smit Street", + "locality": "Hillbrow", + "region": "Gauteng", + "country_a": "ZAF" + } + ] + } + }, + { + "id": 3, + "status": "fail", + "in": { + "text": "Marshall Street, Johannesburg" + }, + "expected": { + "properties": [ + { + "match_type": "exact", + "layer": "street", + "name": "Marshall Street", + "locality": "Johannesburg", + "region": "Gauteng", + "country_a": "ZAF" + } + ] + } + }, + { + "id": 3.1, + "status": "fail", + "in": { + "text": "Marshall Street, Hillbrow" + }, + "expected": { + "properties": [ + { + "match_type": "exact", + "layer": "street", + "name": "Marshall Street", + "locality": "Hillbrow", + "region": "Gauteng", + "country_a": "ZAF" + } + ] + } + } + ] +}