예제 #1
0
        public void SetUp()
        {
            _config = new Config("../../Tests/TestConfig.config", "TestConfig");
            GeocoderSourceDummy dummy = new GeocoderSourceDummy(_config, "DummyProcessorWithConfig");

            _normalizer = new Processors.ScoreNormalizer(_config, "ScoreNormalizerTest");

            _zero = new GeocodeCandidate
            {
                MatchType = "Locator0"
            };

            _one = new GeocodeCandidate
            {
                MatchType = "Locator1"
            };
            _two = new GeocodeCandidate
            {
                MatchType = "Locator2"
            };
            List <GeocodeCandidate> candidates = new List <GeocodeCandidate> {
                _zero, _one, _two
            };

            _response = new GeocodeResponse(candidates, dummy);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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 SetUp()
        {
            _config = new Config("../../Tests/TestConfig.config", "TestConfig");
            GeocoderSourceDummy dummy = new GeocoderSourceDummy(_config, "DummyProcessorWithConfig");
            _normalizer = new Processors.ScoreNormalizer(_config, "ScoreNormalizerTest");

            _zero = new GeocodeCandidate
            {
                MatchType = "Locator0"
            };

            _one = new GeocodeCandidate
            {
                MatchType = "Locator1"
            };
            _two = new GeocodeCandidate
            {
                MatchType = "Locator2"
            };
            List<GeocodeCandidate> candidates = new List<GeocodeCandidate>{_zero, _one, _two};

            _response = new GeocodeResponse(candidates, dummy);
        }