@Test public void testLocationName() { Assert.assertFalse(FindAddress.isValidLocationName("str-eet")); Assert.assertFalse(FindAddress.isValidLocationName("somewhere")); Assert.assertTrue(FindAddress.isValidLocationName("alley")); Assert.assertTrue(FindAddress.isValidLocationName("annex")); Assert.assertTrue(FindAddress.isValidLocationName("arcade")); Assert.assertTrue(FindAddress.isValidLocationName("ave.")); Assert.assertTrue(FindAddress.isValidLocationName("avenue")); Assert.assertTrue(FindAddress.isValidLocationName("alameda")); Assert.assertTrue(FindAddress.isValidLocationName("bayou")); Assert.assertTrue(FindAddress.isValidLocationName("beach")); Assert.assertTrue(FindAddress.isValidLocationName("bend")); Assert.assertTrue(FindAddress.isValidLocationName("bluff")); Assert.assertTrue(FindAddress.isValidLocationName("bluffs")); Assert.assertTrue(FindAddress.isValidLocationName("bottom")); Assert.assertTrue(FindAddress.isValidLocationName("boulevard")); Assert.assertTrue(FindAddress.isValidLocationName("branch")); Assert.assertTrue(FindAddress.isValidLocationName("bridge")); Assert.assertTrue(FindAddress.isValidLocationName("brook")); Assert.assertTrue(FindAddress.isValidLocationName("brooks")); Assert.assertTrue(FindAddress.isValidLocationName("burg")); Assert.assertTrue(FindAddress.isValidLocationName("burgs")); Assert.assertTrue(FindAddress.isValidLocationName("bypass")); Assert.assertTrue(FindAddress.isValidLocationName("broadway")); Assert.assertTrue(FindAddress.isValidLocationName("camino")); Assert.assertTrue(FindAddress.isValidLocationName("camp")); Assert.assertTrue(FindAddress.isValidLocationName("canyon")); Assert.assertTrue(FindAddress.isValidLocationName("cape")); Assert.assertTrue(FindAddress.isValidLocationName("causeway")); Assert.assertTrue(FindAddress.isValidLocationName("center")); Assert.assertTrue(FindAddress.isValidLocationName("centers")); Assert.assertTrue(FindAddress.isValidLocationName("circle")); Assert.assertTrue(FindAddress.isValidLocationName("circles")); Assert.assertTrue(FindAddress.isValidLocationName("cliff")); Assert.assertTrue(FindAddress.isValidLocationName("cliffs")); Assert.assertTrue(FindAddress.isValidLocationName("club")); Assert.assertTrue(FindAddress.isValidLocationName("common")); Assert.assertTrue(FindAddress.isValidLocationName("corner")); Assert.assertTrue(FindAddress.isValidLocationName("corners")); Assert.assertTrue(FindAddress.isValidLocationName("course")); Assert.assertTrue(FindAddress.isValidLocationName("court")); Assert.assertTrue(FindAddress.isValidLocationName("courts")); Assert.assertTrue(FindAddress.isValidLocationName("cove")); Assert.assertTrue(FindAddress.isValidLocationName("coves")); Assert.assertTrue(FindAddress.isValidLocationName("creek")); Assert.assertTrue(FindAddress.isValidLocationName("crescent")); Assert.assertTrue(FindAddress.isValidLocationName("crest")); Assert.assertTrue(FindAddress.isValidLocationName("crossing")); Assert.assertTrue(FindAddress.isValidLocationName("crossroad")); Assert.assertTrue(FindAddress.isValidLocationName("curve")); Assert.assertTrue(FindAddress.isValidLocationName("circulo")); Assert.assertTrue(FindAddress.isValidLocationName("dale")); Assert.assertTrue(FindAddress.isValidLocationName("dam")); Assert.assertTrue(FindAddress.isValidLocationName("divide")); Assert.assertTrue(FindAddress.isValidLocationName("drive")); Assert.assertTrue(FindAddress.isValidLocationName("drives")); Assert.assertTrue(FindAddress.isValidLocationName("estate")); Assert.assertTrue(FindAddress.isValidLocationName("estates")); Assert.assertTrue(FindAddress.isValidLocationName("expressway")); Assert.assertTrue(FindAddress.isValidLocationName("extension")); Assert.assertTrue(FindAddress.isValidLocationName("extensions")); Assert.assertTrue(FindAddress.isValidLocationName("fall")); Assert.assertTrue(FindAddress.isValidLocationName("falls")); Assert.assertTrue(FindAddress.isValidLocationName("ferry")); Assert.assertTrue(FindAddress.isValidLocationName("field")); Assert.assertTrue(FindAddress.isValidLocationName("fields")); Assert.assertTrue(FindAddress.isValidLocationName("flat")); Assert.assertTrue(FindAddress.isValidLocationName("flats")); Assert.assertTrue(FindAddress.isValidLocationName("ford")); Assert.assertTrue(FindAddress.isValidLocationName("fords")); Assert.assertTrue(FindAddress.isValidLocationName("forest")); Assert.assertTrue(FindAddress.isValidLocationName("forge")); Assert.assertTrue(FindAddress.isValidLocationName("forges")); Assert.assertTrue(FindAddress.isValidLocationName("fork")); Assert.assertTrue(FindAddress.isValidLocationName("forks")); Assert.assertTrue(FindAddress.isValidLocationName("fort")); Assert.assertTrue(FindAddress.isValidLocationName("freeway")); Assert.assertTrue(FindAddress.isValidLocationName("garden")); Assert.assertTrue(FindAddress.isValidLocationName("gardens")); Assert.assertTrue(FindAddress.isValidLocationName("gateway")); Assert.assertTrue(FindAddress.isValidLocationName("glen")); Assert.assertTrue(FindAddress.isValidLocationName("glens")); Assert.assertTrue(FindAddress.isValidLocationName("green")); Assert.assertTrue(FindAddress.isValidLocationName("greens")); Assert.assertTrue(FindAddress.isValidLocationName("grove")); Assert.assertTrue(FindAddress.isValidLocationName("groves")); Assert.assertTrue(FindAddress.isValidLocationName("harbor")); Assert.assertTrue(FindAddress.isValidLocationName("harbors")); Assert.assertTrue(FindAddress.isValidLocationName("haven")); Assert.assertTrue(FindAddress.isValidLocationName("heights")); Assert.assertTrue(FindAddress.isValidLocationName("highway")); Assert.assertTrue(FindAddress.isValidLocationName("hill")); Assert.assertTrue(FindAddress.isValidLocationName("hills")); Assert.assertTrue(FindAddress.isValidLocationName("hollow")); Assert.assertTrue(FindAddress.isValidLocationName("inlet")); Assert.assertTrue(FindAddress.isValidLocationName("island")); Assert.assertTrue(FindAddress.isValidLocationName("islands")); Assert.assertTrue(FindAddress.isValidLocationName("isle")); Assert.assertTrue(FindAddress.isValidLocationName("junction")); Assert.assertTrue(FindAddress.isValidLocationName("junctions")); Assert.assertTrue(FindAddress.isValidLocationName("key")); Assert.assertTrue(FindAddress.isValidLocationName("keys")); Assert.assertTrue(FindAddress.isValidLocationName("knoll")); Assert.assertTrue(FindAddress.isValidLocationName("knolls")); Assert.assertTrue(FindAddress.isValidLocationName("lake")); Assert.assertTrue(FindAddress.isValidLocationName("lakes")); Assert.assertTrue(FindAddress.isValidLocationName("land")); Assert.assertTrue(FindAddress.isValidLocationName("landing")); Assert.assertTrue(FindAddress.isValidLocationName("lane")); Assert.assertTrue(FindAddress.isValidLocationName("light")); Assert.assertTrue(FindAddress.isValidLocationName("lights")); Assert.assertTrue(FindAddress.isValidLocationName("loaf")); Assert.assertTrue(FindAddress.isValidLocationName("lock")); Assert.assertTrue(FindAddress.isValidLocationName("locks")); Assert.assertTrue(FindAddress.isValidLocationName("lodge")); Assert.assertTrue(FindAddress.isValidLocationName("loop")); Assert.assertTrue(FindAddress.isValidLocationName("mall")); Assert.assertTrue(FindAddress.isValidLocationName("manor")); Assert.assertTrue(FindAddress.isValidLocationName("manors")); Assert.assertTrue(FindAddress.isValidLocationName("meadow")); Assert.assertTrue(FindAddress.isValidLocationName("meadows")); Assert.assertTrue(FindAddress.isValidLocationName("mews")); Assert.assertTrue(FindAddress.isValidLocationName("mill")); Assert.assertTrue(FindAddress.isValidLocationName("mills")); Assert.assertTrue(FindAddress.isValidLocationName("mission")); Assert.assertTrue(FindAddress.isValidLocationName("motorway")); Assert.assertTrue(FindAddress.isValidLocationName("mount")); Assert.assertTrue(FindAddress.isValidLocationName("mountain")); Assert.assertTrue(FindAddress.isValidLocationName("mountains")); Assert.assertTrue(FindAddress.isValidLocationName("neck")); Assert.assertTrue(FindAddress.isValidLocationName("orchard")); Assert.assertTrue(FindAddress.isValidLocationName("oval")); Assert.assertTrue(FindAddress.isValidLocationName("overpass")); Assert.assertTrue(FindAddress.isValidLocationName("park")); Assert.assertTrue(FindAddress.isValidLocationName("parks")); Assert.assertTrue(FindAddress.isValidLocationName("parkway")); Assert.assertTrue(FindAddress.isValidLocationName("parkways")); Assert.assertTrue(FindAddress.isValidLocationName("pass")); Assert.assertTrue(FindAddress.isValidLocationName("passage")); Assert.assertTrue(FindAddress.isValidLocationName("path")); Assert.assertTrue(FindAddress.isValidLocationName("pike")); Assert.assertTrue(FindAddress.isValidLocationName("pine")); Assert.assertTrue(FindAddress.isValidLocationName("pines")); Assert.assertTrue(FindAddress.isValidLocationName("plain")); Assert.assertTrue(FindAddress.isValidLocationName("plains")); Assert.assertTrue(FindAddress.isValidLocationName("plaza")); Assert.assertTrue(FindAddress.isValidLocationName("point")); Assert.assertTrue(FindAddress.isValidLocationName("points")); Assert.assertTrue(FindAddress.isValidLocationName("port")); Assert.assertTrue(FindAddress.isValidLocationName("ports")); Assert.assertTrue(FindAddress.isValidLocationName("prairie")); Assert.assertTrue(FindAddress.isValidLocationName("privada")); Assert.assertTrue(FindAddress.isValidLocationName("radial")); Assert.assertTrue(FindAddress.isValidLocationName("ramp")); Assert.assertTrue(FindAddress.isValidLocationName("ranch")); Assert.assertTrue(FindAddress.isValidLocationName("rapid")); Assert.assertTrue(FindAddress.isValidLocationName("rapids")); Assert.assertTrue(FindAddress.isValidLocationName("rd")); Assert.assertTrue(FindAddress.isValidLocationName("rd.")); Assert.assertTrue(FindAddress.isValidLocationName("rest")); Assert.assertTrue(FindAddress.isValidLocationName("ridge")); Assert.assertTrue(FindAddress.isValidLocationName("ridges")); Assert.assertTrue(FindAddress.isValidLocationName("river")); Assert.assertTrue(FindAddress.isValidLocationName("road")); Assert.assertTrue(FindAddress.isValidLocationName("roads")); Assert.assertTrue(FindAddress.isValidLocationName("route")); Assert.assertTrue(FindAddress.isValidLocationName("row")); Assert.assertTrue(FindAddress.isValidLocationName("rue")); Assert.assertTrue(FindAddress.isValidLocationName("run")); Assert.assertTrue(FindAddress.isValidLocationName("shoal")); Assert.assertTrue(FindAddress.isValidLocationName("shoals")); Assert.assertTrue(FindAddress.isValidLocationName("shore")); Assert.assertTrue(FindAddress.isValidLocationName("shores")); Assert.assertTrue(FindAddress.isValidLocationName("skyway")); Assert.assertTrue(FindAddress.isValidLocationName("spring")); Assert.assertTrue(FindAddress.isValidLocationName("springs")); Assert.assertTrue(FindAddress.isValidLocationName("spur")); Assert.assertTrue(FindAddress.isValidLocationName("spurs")); Assert.assertTrue(FindAddress.isValidLocationName("square")); Assert.assertTrue(FindAddress.isValidLocationName("squares")); Assert.assertTrue(FindAddress.isValidLocationName("station")); Assert.assertTrue(FindAddress.isValidLocationName("stravenue")); Assert.assertTrue(FindAddress.isValidLocationName("stream")); Assert.assertTrue(FindAddress.isValidLocationName("st.")); Assert.assertTrue(FindAddress.isValidLocationName("street")); Assert.assertTrue(FindAddress.isValidLocationName("streets")); Assert.assertTrue(FindAddress.isValidLocationName("summit")); Assert.assertTrue(FindAddress.isValidLocationName("speedway")); Assert.assertTrue(FindAddress.isValidLocationName("terrace")); Assert.assertTrue(FindAddress.isValidLocationName("throughway")); Assert.assertTrue(FindAddress.isValidLocationName("trace")); Assert.assertTrue(FindAddress.isValidLocationName("track")); Assert.assertTrue(FindAddress.isValidLocationName("trafficway")); Assert.assertTrue(FindAddress.isValidLocationName("trail")); Assert.assertTrue(FindAddress.isValidLocationName("tunnel")); Assert.assertTrue(FindAddress.isValidLocationName("turnpike")); Assert.assertTrue(FindAddress.isValidLocationName("underpass")); Assert.assertTrue(FindAddress.isValidLocationName("union")); Assert.assertTrue(FindAddress.isValidLocationName("unions")); Assert.assertTrue(FindAddress.isValidLocationName("valley")); Assert.assertTrue(FindAddress.isValidLocationName("valleys")); Assert.assertTrue(FindAddress.isValidLocationName("viaduct")); Assert.assertTrue(FindAddress.isValidLocationName("view")); Assert.assertTrue(FindAddress.isValidLocationName("views")); Assert.assertTrue(FindAddress.isValidLocationName("village")); Assert.assertTrue(FindAddress.isValidLocationName("villages")); Assert.assertTrue(FindAddress.isValidLocationName("ville")); Assert.assertTrue(FindAddress.isValidLocationName("vista")); Assert.assertTrue(FindAddress.isValidLocationName("walk")); Assert.assertTrue(FindAddress.isValidLocationName("walks")); Assert.assertTrue(FindAddress.isValidLocationName("wall")); Assert.assertTrue(FindAddress.isValidLocationName("way")); Assert.assertTrue(FindAddress.isValidLocationName("ways")); Assert.assertTrue(FindAddress.isValidLocationName("well")); Assert.assertTrue(FindAddress.isValidLocationName("wells")); Assert.assertTrue(FindAddress.isValidLocationName("xing")); Assert.assertTrue(FindAddress.isValidLocationName("xrd")); }
@VisibleForTesting public static boolean isValidLocationName(String location) { return sLocationNameRe.matcher(location).matches(); }
FindAddress { @VisibleForTesting public static boolean isValidLocationName(String location) { return sLocationNameRe.matcher(location).matches(); } }
FindAddress { @VisibleForTesting public static boolean isValidLocationName(String location) { return sLocationNameRe.matcher(location).matches(); } private  FindAddress(); }
FindAddress { @VisibleForTesting public static boolean isValidLocationName(String location) { return sLocationNameRe.matcher(location).matches(); } private  FindAddress(); @VisibleForTesting static MatchResult matchHouseNumber(String content, int offset); @VisibleForTesting static MatchResult matchState(String content, int offset); @VisibleForTesting static boolean isValidZipCode(String zipCode, String state); @VisibleForTesting static boolean isValidZipCode(String zipCode); @VisibleForTesting static boolean isValidLocationName(String location); }
FindAddress { @VisibleForTesting public static boolean isValidLocationName(String location) { return sLocationNameRe.matcher(location).matches(); } private  FindAddress(); @VisibleForTesting static MatchResult matchHouseNumber(String content, int offset); @VisibleForTesting static MatchResult matchState(String content, int offset); @VisibleForTesting static boolean isValidZipCode(String zipCode, String state); @VisibleForTesting static boolean isValidZipCode(String zipCode); @VisibleForTesting static boolean isValidLocationName(String location);  }