public void PropertyOrderComparer_Order2()
        {
            var c = new MemberInfoComparer();
            var r = c.Compare(typeof(Test2).GetProperty("Property1"), typeof(Test2).GetProperty("Property2"));

            Assert.IsTrue(r < 0);

            r = c.Compare(typeof(Test2).GetProperty("Property2"), typeof(Test2).GetProperty("Property1"));

            Assert.IsTrue(r > 0);
        }
        public void PropertyOrderComparer_Order5()
        {
            var c = new MemberInfoComparer();
            int r;

            r = c.Compare(typeof(Test4).GetProperty("Property1"), typeof(Test5).GetProperty("Property3"));

            Assert.IsTrue(r > 0);

            r = c.Compare(typeof(Test5).GetProperty("Property3"), typeof(Test4).GetProperty("Property1"));

            Assert.IsTrue(r < 0);



            r = c.Compare(typeof(Test5).GetProperty("Property3"), typeof(Test4).GetProperty("Property2"));

            Assert.IsTrue(r < 0);

            r = c.Compare(typeof(Test4).GetProperty("Property2"), typeof(Test5).GetProperty("Property3"));

            Assert.IsTrue(r > 0);



            r = c.Compare(typeof(Test5).GetProperty("Property4"), typeof(Test4).GetProperty("Property1"));

            Assert.IsTrue(r > 0);

            r = c.Compare(typeof(Test4).GetProperty("Property1"), typeof(Test5).GetProperty("Property4"));

            Assert.IsTrue(r < 0);



            r = c.Compare(typeof(Test5).GetProperty("Property4"), typeof(Test4).GetProperty("Property2"));

            Assert.IsTrue(r > 0);

            r = c.Compare(typeof(Test4).GetProperty("Property2"), typeof(Test5).GetProperty("Property4"));

            Assert.IsTrue(r < 0);
        }
        public void PropertyOrderComparer_Unrelated()
        {
            var c = new MemberInfoComparer();

            c.Compare(typeof(Test1).GetProperty("Property1"), typeof(Test2).GetProperty("Property1"));
        }
        public void PropertyOrderComparer_Null2()
        {
            var c = new MemberInfoComparer();

            c.Compare(typeof(Test1).GetProperty("Property2"), null);
        }
        public void PropertyOrderComparer_Null1()
        {
            var c = new MemberInfoComparer();

            c.Compare(null, typeof(Test1).GetProperty("Property1"));
        }
        public void PropertyOrderComparer_Nulls()
        {
            var c = new MemberInfoComparer().SetMetadata(null);

            c.Compare(null, null);
        }