コード例 #1
0
        public void SplitZip3()
        {
            const string address = "340 N 12th St, Philadelphia, PA 19107";

            GeocodeRequest req = new GeocodeRequest();

            req.TextString = address;

            Config config = new Config("../../Tests/TestConfig.config", "TestConfig");

            Processors.AddressSplitter splitter = new Processors.AddressSplitter(config, "AddressSplitterTest");

            req = splitter.ProcessRequest(req);

            Assert.AreEqual("340 N 12th St", req.Address, "Test address doesn't match.");
            Assert.AreEqual("19107", req.PostalCode, "Test postal code doesn't match.");
        }
コード例 #2
0
        public void Split1()
        {
            const string address = "340 N 12th St #402, Philadelphia, PA, USA";

            GeocodeRequest req = new GeocodeRequest();
            req.TextString = address;

            Config config = new Config("../../Tests/TestConfig.config", "TestConfig");
            Processors.AddressSplitter splitter = new Processors.AddressSplitter(config, "AddressSplitterTest");

            req = splitter.ProcessRequest(req);

            Assert.AreEqual("340 N 12th St #402", req.Address, "Test address doesn't match.");
            Assert.AreEqual("Philadelphia", req.City, "Test city doesn't match.");
            Assert.AreEqual("PA", req.State, "Test state doesn't match.");
            Assert.AreEqual("USA", req.Country, "Test country doesn't match.");
        }
コード例 #3
0
        public void SplitCrossStreets1()
        {
            const string address = "12th St and Callowhill St, Philadelphia, PA, USA";

            GeocodeRequest req = new GeocodeRequest();

            req.TextString = address;

            Config config = new Config("../../Tests/TestConfig.config", "TestConfig");

            Processors.AddressSplitter splitter = new Processors.AddressSplitter(config, "AddressSplitterTest");

            req = splitter.ProcessRequest(req);

            Assert.AreEqual("12th St & Callowhill St", req.Address, "Test address doesn't match.");
            Assert.AreEqual("Philadelphia", req.City, "Test city doesn't match.");
            Assert.AreEqual("PA", req.State, "Test state doesn't match.");
            Assert.AreEqual("USA", req.Country, "Test country doesn't match.");
        }
コード例 #4
0
        public void SplitZip4()
        {
            const string address = "340 N 12th St, Philadelphia, PA 19107, USA";

            GeocodeRequest req = new GeocodeRequest();
            req.TextString = address;

            Config config = new Config("../../Tests/TestConfig.config", "TestConfig");
            Processors.AddressSplitter splitter = new Processors.AddressSplitter(config, "AddressSplitterTest");

            req = splitter.ProcessRequest(req);

            Assert.AreEqual("340 N 12th St", req.Address, "Test address doesn't match.");
            Assert.AreEqual("19107", req.PostalCode, "Test postal code doesn't match.");
            Assert.AreEqual( "USA", req.Country, "Test country doesn't match." );
        }
コード例 #5
0
        public void SplitZip2()
        {
            const string address = "12th St & Callowhill St, 19107";

            GeocodeRequest req = new GeocodeRequest();
            req.TextString = address;

            Config config = new Config("../../Tests/TestConfig.config", "TestConfig");
            Processors.AddressSplitter splitter = new Processors.AddressSplitter(config, "AddressSplitterTest");

            req = splitter.ProcessRequest(req);

            Assert.AreEqual("12th St & Callowhill St", req.Address, "Test address doesn't match.");
            Assert.AreEqual("19107", req.PostalCode, "Test postal code doesn't match.");
        }