public void should_work()
        {
            var orish = new OrOperation().GetPredicateBuilder<Contract>(c => c.Status, "open", c=>c.Status, "closed");

            var contract = new Contract();
            contract.Status = "open";

            orish.Compile()(contract).ShouldBeTrue();

            var contract2 = new Contract();
            contract2.Status = "closed";

            orish.Compile()(contract2).ShouldBeTrue();
        }
Beispiel #2
0
        public void should_work()
        {
            var orish = new OrOperation().GetPredicateBuilder <Contract>(c => c.Status, "open", c => c.Status, "closed");

            var contract = new Contract();

            contract.Status = "open";

            orish.Compile()(contract).ShouldBeTrue();

            var contract2 = new Contract();

            contract2.Status = "closed";


            orish.Compile()(contract2).ShouldBeTrue();
        }
        public void should_work_for_collections_and_other()
        {
            var orish = new OrOperation().GetPredicateBuilder<Contract>( c => c.Status, new List<string>{"open","closed"}, c=>c.Status, "x");

            var contract = new Contract();
            contract.Status = "x";

            orish.Compile()(contract).ShouldBeTrue();
        }
Beispiel #4
0
        public void should_work_for_collections_and_other()
        {
            var orish = new OrOperation().GetPredicateBuilder <Contract>(c => c.Status, new List <string> {
                "open", "closed"
            }, c => c.Status, "x");

            var contract = new Contract();

            contract.Status = "x";

            orish.Compile()(contract).ShouldBeTrue();
        }