public void Otbre_IsMatch_ReturnsTrue_WhenNameMatches() { var validProperty = AgencyApiService.GetValidPropertyForOtbreAgency(); var validPropertyWithMessyDetails = new Property { AgencyCode = "OTBRE", Address = "32 Sir John Young Crescent, Sydney NSW", Name = "*Super*-High! APARTMENT (Sydney)", Latitude = 23, Longitude = 34, }; _propertyMatcher.IsMatch(validProperty, validPropertyWithMessyDetails).Should().BeTrue(); }
public void IsMatch_Should_Return_False_For_Different_Reverse_Name_2() { var source = new Property() { Name = "Flat Summit This", Address = "32 Sir John-Young Crescent, Sydney, NSW.", AgencyCode = "CRE", Latitude = 106.006M, Longitude = 104.006M }; var compareWIth = new Property() { Name = "This Summits Flat", Address = "32 Sir John-Young Crescent, Sydney, NSW.s", AgencyCode = "CRE", Latitude = 106.0042072072072M, Longitude = 104.0042072072172M }; var matcher = new PropertyMatcher(); var result = matcher.IsMatch(source, compareWIth); Assert.IsFalse(result); }
public void IsMatch_Should_Return_True_For_Reverse_Name() { var source = new Property() { Name = "Apartments Summit The", Address = "32 Sir John-Young Crescent, Sydney, NSW.", AgencyCode = "CRE", Latitude = 106.006M, Longitude = 104.006M }; var compareWIth = new Property() { Name = "The Summit Apartments", Address = "32 Sir John-Young Crescent, Sydney, NSW.s", AgencyCode = "CRE", Latitude = 106.0042072072072M, Longitude = 104.0042072072172M }; var matcher = new PropertyMatcher(); var result = matcher.IsMatch(source, compareWIth); Assert.IsTrue(result); }
public void IsMatch_Should_Return_False_For_Same_Agency_Over_200M() { var source = new Property() { Name = "Super High Apartments, Sydney", Address = "32 Sir John-Young Crescent, Sydney, NSW.", AgencyCode = "LRE", Latitude = 106.006M, Longitude = 106.006M }; var compareWIth = new Property() { Name = "Super High Apartments, Sydneys", Address = "32 Sir John-Young Crescent, Sydney, NSW.s", AgencyCode = "LRE", Latitude = 106.0078108108108M, Longitude = 106.0078108108108M }; var matcher = new PropertyMatcher(); var result = matcher.IsMatch(source, compareWIth); Assert.IsFalse(result); }
public void IsMatch_Should_Return_False_For_Different_Agency_Within_200M() { var source = new Property() { Name = "*Super*-High! APARTMENTS (Sydney)", Address = "32 Sir John-Young Crescent, Sydney, NSW.", AgencyCode = "LRE", Latitude = 106.006M, Longitude = 104.006M }; var compareWIth = new Property() { Name = "*Super High Apartments, Sydney", Address = "32 Sir John Young Crescent, Sydney NSWs", AgencyCode = "LREA", Latitude = 106.006M, Longitude = 104.006M }; var matcher = new PropertyMatcher(); var result = matcher.IsMatch(source, compareWIth); Assert.IsFalse(result); }
public void IsMatch_Should_Return_For_For_Different_Name() { var source = new Property() { Name = "*Super*-High! APARTMENTS (Sydney)", Address = "32 Sir John-Young Crescent, Sydney, NSW.", AgencyCode = "OTBRE", Latitude = 100, Longitude = 105 }; var compareWIth = new Property() { Name = "*Super High Apartments, Sydneys", Address = "32 Sir John Young Crescent, Sydney NSW", AgencyCode = "OTBRE", Latitude = 1003, Longitude = 1045 }; var matcher = new PropertyMatcher(); var result = matcher.IsMatch(source, compareWIth); Assert.IsFalse(result); }