public void TestSelectIComparableBetweenSimple()
        {
            CutomPlaceHolder c = new CutomPlaceHolder();

            c.MyTypes = new CustomType(8);


            CutomPlaceHolder cc = new CutomPlaceHolder();

            cc.MyTypes = new CustomType(17);

            CutomPlaceHolder ccc = new CutomPlaceHolder();

            ccc.MyTypes = new CustomType(23);


            List <CutomPlaceHolder> list = new List <CutomPlaceHolder>();

            list.Add(c);
            list.Add(cc);
            list.Add(ccc);


            ObjectQuery <CutomPlaceHolder> oq = new ObjectQuery <CutomPlaceHolder>();
            object k = oq.Select(list, "MyTypes between 20 30");

            CutomPlaceHolder[] kl = (CutomPlaceHolder[])k;

            Assert.IsTrue(kl.Length == 1);
        }
        public void TestSelectIComparableBiggerOrEqual()
        {
            CutomPlaceHolder c = new CutomPlaceHolder();

            c.MyTypes = new CustomType(8);


            CutomPlaceHolder cc = new CutomPlaceHolder();

            cc.MyTypes = new CustomType(17);

            CutomPlaceHolder ccc = new CutomPlaceHolder();

            ccc.MyTypes = new CustomType(23);


            List <CutomPlaceHolder> list = new List <CutomPlaceHolder>();

            list.Add(c);
            list.Add(cc);
            list.Add(ccc);


            ObjectQuery <CutomPlaceHolder> oq = new ObjectQuery <CutomPlaceHolder>();
            object k = oq.Select(list, "MyTypes >= 17");

            CutomPlaceHolder[] kl = (CutomPlaceHolder[])k;

            Assert.IsTrue(kl.Length == 2);
        }
        public void TestSelectIComparableSmaller()
        {
            CutomPlaceHolder c = new CutomPlaceHolder();

            c.MyTypes = new CustomType(8);


            CutomPlaceHolder cc = new CutomPlaceHolder();

            cc.MyTypes = new CustomType(17);

            CutomPlaceHolder ccc = new CutomPlaceHolder();

            ccc.MyTypes = new CustomType(23);


            List <CutomPlaceHolder> list = new List <CutomPlaceHolder>();

            list.Add(c);
            list.Add(cc);
            list.Add(ccc);


            ObjectQuery <CutomPlaceHolder> oq = new ObjectQuery <CutomPlaceHolder>();
            object k = oq.Select(list, "MyTypes < 17");

            CutomPlaceHolder[] kl = (CutomPlaceHolder[])k;

            Assert.IsTrue(kl[0].MyTypes.X == 8);
        }
        public void TestMaxIcomparable()
        {
            CutomPlaceHolder c = new CutomPlaceHolder();

            c.MyTypes = new CustomType(8);


            CutomPlaceHolder cc = new CutomPlaceHolder();

            cc.MyTypes = new CustomType(17);

            CutomPlaceHolder ccc = new CutomPlaceHolder();

            ccc.MyTypes = new CustomType(23);


            List <CutomPlaceHolder> list = new List <CutomPlaceHolder>();

            list.Add(c);
            list.Add(cc);
            list.Add(ccc);


            ObjectQuery <CutomPlaceHolder> oq = new ObjectQuery <CutomPlaceHolder>();
            object k = oq.Max(list, "MyTypes");

            CutomPlaceHolder kl = (CutomPlaceHolder)k;

            Assert.IsTrue(kl.MyTypes.X == 23);
        }