public void OccurenceAndFalse()
        {
            var findBy = new IndexConstraint(1).And(Find.ByName("Y"));

            var mockAttributeBag = new MockAttributeBag("name", "Z");

            ConstraintContext context = new ConstraintContext();
            Assert.IsFalse(findBy.Matches(mockAttributeBag, context));
            Assert.IsFalse(findBy.Matches(mockAttributeBag, context));
        }
        public void OccurenceOr()
        {
            var findBy = new IndexConstraint(2).Or(Find.ByName("Z"));
            ConstraintContext context = new ConstraintContext();

            var mockAttributeBag = new MockAttributeBag("name", "Z");
            Assert.IsTrue(findBy.Matches(mockAttributeBag, context));

            mockAttributeBag = new MockAttributeBag("name", "y");

            Assert.IsFalse(findBy.Matches(mockAttributeBag, context));
            Assert.IsTrue(findBy.Matches(mockAttributeBag, context));
        }
        public void Occurence2()
        {
            Constraint findBy = new IndexConstraint(2);

            var mockAttributeBag = new MockAttributeBag("name", "Z");

            ConstraintContext context = new ConstraintContext();
            Assert.IsFalse(findBy.Matches(mockAttributeBag, context));
            Assert.IsFalse(findBy.Matches(mockAttributeBag, context));
            Assert.IsTrue(findBy.Matches(mockAttributeBag, context));
            Assert.IsFalse(findBy.Matches(mockAttributeBag, context));
        }