public void TestFindAddressCandidatesWithEmptyInput() { BindRunTime(); IPropertySet addressObj = new PropertySetClass(); BNG_Locator bng = new BNG_Locator(); IArray matches = bng.FindAddressCandidates(addressObj); Assert.IsTrue(matches.Count == 0); }
public void TestGetGridReferenceCorrectValues(double x, double y, string sRef, string expectedRes) { BindRunTime(); IPoint testPoint = new PointClass(); testPoint.PutCoords(x, y); if (sRef == "BNG") testPoint.SpatialReference = bngSRef; else testPoint.SpatialReference = wgs84SRef; BNG_Locator bng = new BNG_Locator(); IPropertySet results = bng.ReverseGeocode(testPoint, false); object obj = results.GetProperty("BNG"); Assert.IsTrue(obj.ToString() == expectedRes); }
public void TestFindAddressCandidatesCannotMatchAddress(string address) { BindRunTime(); // Get the input from the IPropertySet object names = null; object values = null; IPropertySet addressObj = new PropertySetClass(); names = new string[] { "Single Line Address" }; // Get centre point of Envelope for geocode location // Workaround for currnet non Point geometry issue values = new object[] { address }; addressObj.SetProperties(names, values); BNG_Locator bng = new BNG_Locator(); IArray matches = bng.FindAddressCandidates(addressObj); Assert.IsTrue(matches.Count == 0); }