Ejemplo n.º 1
0
        public AndPropertyMatcher(IPropertyMatcher first, IPropertyMatcher second)
        {
            Ensure.NotNull(first, "first");
            Ensure.NotNull(second, "second");

            this.first = first;
            this.second = second;
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            matcherOne = new Mock <IPropertyMatcher>();
            matcherTwo = new Mock <IPropertyMatcher>();

            var matchers = new List <IPropertyMatcher>()
            {
                matcherOne.Object,
                matcherTwo.Object
            };

            matcher = new PropertyMatcher(matchers);
        }
Ejemplo n.º 3
0
        public bool IsMatch(Property agencyProperty, Property databaseProperty)
        {
            if (agencyProperty == null || databaseProperty == null || agencyProperty.AgencyCode == null)
            {
                return(false);
            }

            IPropertyMatcher matcher = matcherFactory.GetPropertyMatcher(agencyProperty.AgencyCode);

            if (matcher == null)
            {
                throw new AgencyMatcherNotFoundException(string.Format("No matcher found for Agency: '{0}'", agencyProperty.AgencyCode));
            }

            return(matcher.IsMatch(agencyProperty, databaseProperty));
        }
Ejemplo n.º 4
0
 public void SetUp()
 {
     _propertyMatcher = Substitute.For<IPropertyMatcher>();
     _ruleEngine = Substitute.For<IRuleEngine>();
 }
Ejemplo n.º 5
0
 public HomeController()
 {
     _propertyMatcher = new PropertyMatcher();
 }
Ejemplo n.º 6
0
 public void Setup()
 {
     matcher = new MatchLre();
 }
Ejemplo n.º 7
0
 public void SetUp()
 {
     _propertyMatcher = Substitute.For<IPropertyMatcher>();
     _ruleEngine = Substitute.For<IRuleEngine>();
 }
 public static void ClassInit(TestContext context)
 {
     propertyMatcher = new PropertyMatcher();
 }