예제 #1
0
        public void ExcludePunctuationForNameAndAddress()
        {
            //Arrange
            const string agencyPropertyName      = "*Super*-High! APARTMENTS (Sydney)";
            const string databasePropertyName    = "Super High Apartments, Sydney";
            const string agencyPropertyAddress   = "32 Sir John-Young Crescent,Sydney, NSW.";
            const string databasePropertyAddress = "32 Sir John Young Crescent, Sydney NSW";
            //Act
            var agencyProperty = new Property
            {
                Address    = agencyPropertyAddress,
                AgencyCode = string.Empty,
                Name       = agencyPropertyName,
                Latitude   = 0,
                Longitude  = 0
            };
            var databaseProperty = new Property
            {
                Address    = databasePropertyAddress,
                AgencyCode = string.Empty,
                Name       = databasePropertyName,
                Latitude   = 0,
                Longitude  = 0
            };
            var punctuationMatcher = new PunctuationMatcher();
            var result             = punctuationMatcher.IsMatch(agencyProperty, databaseProperty);

            //Assert
            Assert.True(result);
        }
        protected override IPropertyMatcher MakePropertyMatcher()
        {
            IPropertyMatcher propertyMatch = new PunctuationMatcher();

            return(propertyMatch);
        }