public void PitchCityState() { GeocoderSourceDummy dummy = new GeocoderSourceDummy(_config, "DummyProcessorWithConfig"); _typeSelector = new Processors.MatchTypeSelectorProcessor(_config, "MatchTypeSelectorProcessorTest"); _zero = new GeocodeCandidate { MatchType = "US_Zip4" }; _one = new GeocodeCandidate { MatchType = "US_CityState" }; _two = new GeocodeCandidate { MatchType = "US_RoofTops" }; _three = new GeocodeCandidate { MatchType = "US_RoofTops" }; List<GeocodeCandidate> candidates = new List<GeocodeCandidate> { _zero, _one, _two, _three }; _response = new GeocodeResponse(candidates, dummy); _typeSelector.ProcessResponse(_response); Assert.AreEqual(3, _response.Count); Assert.Contains(_zero, _response.Candidates); Assert.Contains(_two, _response.Candidates); Assert.Contains(_three, _response.Candidates); }
public void PitchCityState() { GeocoderSourceDummy dummy = new GeocoderSourceDummy(_config, "DummyProcessorWithConfig"); _typeSelector = new Processors.MatchTypeSelectorProcessor(_config, "MatchTypeSelectorProcessorTest"); _zero = new GeocodeCandidate { MatchType = "US_Zip4" }; _one = new GeocodeCandidate { MatchType = "US_CityState" }; _two = new GeocodeCandidate { MatchType = "US_RoofTops" }; _three = new GeocodeCandidate { MatchType = "US_RoofTops" }; List <GeocodeCandidate> candidates = new List <GeocodeCandidate> { _zero, _one, _two, _three }; _response = new GeocodeResponse(candidates, dummy); _typeSelector.ProcessResponse(_response); Assert.AreEqual(3, _response.Count); Assert.Contains(_zero, _response.Candidates); Assert.Contains(_two, _response.Candidates); Assert.Contains(_three, _response.Candidates); }