コード例 #1
0
            public void CloseLocationMatch_Should_Return_False_Over_200_mtr()
            {
                decimal source      = 106.006M;
                decimal compareWith = 106.0078108108108M;
                var     result      = PrimitiveRules.CloseLocationMatch(source, compareWith);

                Assert.IsFalse(result);
            }
コード例 #2
0
            public void ReverseWordsMatch_Should_Return_False_For_Non_Match()
            {
                string source      = "Apartments Summit This";
                string compareWith = "The Summit Apartments";
                var    result      = PrimitiveRules.ReverseWordsMatch(source, compareWith);

                Assert.IsFalse(result);
            }
コード例 #3
0
            public void CloseLocationMatch_Should_Return_True_Within_200_mtr()
            {
                decimal source      = 106.006M;
                decimal compareWith = 106.0042072072072M;
                var     result      = PrimitiveRules.CloseLocationMatch(source, compareWith);

                Assert.IsTrue(result);
            }
コード例 #4
0
            public void NoPunctuationStringComparer_Should_Return_False()
            {
                string source      = "*SuperHigh! APARTMENTS (Sydney)";
                string compareWith = "Super High Apartments, Sydney";
                var    result      = PrimitiveRules.NoPunctuationStringComparer(source, compareWith);

                Assert.IsFalse(result);
            }
コード例 #5
0
            public void NoPunctuationStringComparer_Should_Return_True_For_Dash()
            {
                string source      = "32 Sir John-Young Crescent, Sydney, NSW.";
                string compareWith = "32 Sir John Young Crescent, Sydney NSW";
                var    result      = PrimitiveRules.NoPunctuationStringComparer(source, compareWith);

                Assert.IsTrue(result);
            }
コード例 #6
0
 public bool Test(Property match, Property matchWith)
 {
     return(PrimitiveRules.NoPunctuationStringComparer(match.Address, matchWith.Address));
 }
コード例 #7
0
 /// <summary>
 /// Tests the rule
 /// </summary>
 /// <param name="match"></param>
 /// <param name="matchWith"></param>
 /// <returns></returns>
 public bool Test(Property match, Property matchWith)
 {
     return(PrimitiveRules.ReverseWordsMatch(match.Name, matchWith.Name));
 }
コード例 #8
0
 /// <summary>
 /// Test the rule
 /// </summary>
 /// <param name="match"></param>
 /// <param name="matchWith"></param>
 /// <returns></returns>
 public bool Test(Property match, Property matchWith)
 {
     return(PrimitiveRules.CloseLocationMatch(match.Latitude, matchWith.Latitude) && PrimitiveRules.CloseLocationMatch(match.Longitude, matchWith.Longitude));
 }