Treating C addresses as valid
This commit is contained in:
parent
ae1c26afea
commit
4050c42bf4
|
@ -106,7 +106,7 @@ public class LoquateAddressValidator extends BaseRestfulValidator {
|
||||||
|
|
||||||
protected boolean isValid(JsonNode theMatch) {
|
protected boolean isValid(JsonNode theMatch) {
|
||||||
String addressQualityIndex = getField(theMatch, LOQUATE_AQI);
|
String addressQualityIndex = getField(theMatch, LOQUATE_AQI);
|
||||||
return "A".equals(addressQualityIndex) || "B".equals(addressQualityIndex);
|
return "A".equals(addressQualityIndex) || "B".equals(addressQualityIndex) || "C".equals(addressQualityIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getField(JsonNode theMatch, String theFieldName) {
|
private String getField(JsonNode theMatch, String theFieldName) {
|
||||||
|
|
|
@ -63,7 +63,7 @@ class LoquateAddressValidatorTest {
|
||||||
" },\n" +
|
" },\n" +
|
||||||
" \"Matches\": [\n" +
|
" \"Matches\": [\n" +
|
||||||
" {\n" +
|
" {\n" +
|
||||||
" \"AQI\": \"C\",\n" +
|
" \"AQI\": \"D\",\n" +
|
||||||
" \"Address\": \"\"\n" +
|
" \"Address\": \"\"\n" +
|
||||||
" }\n" +
|
" }\n" +
|
||||||
" ]\n" +
|
" ]\n" +
|
||||||
|
|
Loading…
Reference in New Issue