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);
            }
            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);
            }
Exemplo n.º 3
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));
 }