public void ComposeAbleRule_Or_ConditionSatisfied_Three()
        {
            //------------Setup for test--------------------------
            var cr = new ComposableRule <string>(new Rule1(() => "")).Or(new Rule1(() => "d")).Or(new Rule2(() => "2"));

            Assert.IsNotNull(cr.Check());
        }
Beispiel #2
0
        public void ComposeAbleRule_AndConditionSatisfied()
        {
            //------------Setup for test--------------------------
            var cr = new ComposableRule <string>(new Rule1(() => "1")).And(new Rule1(() => "1"));

            Assert.IsNull(cr.Check());
        }
        public void ComposeAbleRule_SingleCondition()
        {
            //------------Setup for test--------------------------
            var cr = new ComposableRule <string>(new Rule1(() => ""));

            Assert.IsNotNull(cr.Check());
        }
Beispiel #4
0
        public void ComposeAbleRule_AndConditionFailed_Three()
        {
            //------------Setup for test--------------------------
            var cr = new ComposableRule <string>(new Rule1(() => "1")).And(new Rule1(() => "1")).And(new Rule2(() => "v"));

            Assert.IsNotNull(cr.Check());
        }