Tests.CustomMessagesCompare.Compare C# (CSharp) Method

Compare() private method

private Compare ( ) : void
return void
        public void Compare()
        {
            TaskQueue.TQItemSelector sel = new TaskQueue.TQItemSelector("field1", TaskQueue.TQItemSelectorSet.Ascending)
                .Rule("field2", TaskQueue.TQItemSelectorSet.Descending);
            SomeExtMessage inst = new SomeExtMessage()
            {
                field1 = 5,
                field2 = 15
            };
            InternalComparable cmp = (InternalComparable)inst.MakeComparator(sel, typeof(InternalComparable)/*, typeof(SomeExtMessage)*/);
            SomeExtMessage inst_CE = new SomeExtMessage()
            {
                field1 = 5,
                field2 = 18
            };
            SomeExtMessage inst_CL = new SomeExtMessage()
            {
                field1 = 4,
                field2 = 18
            };

            Assert.AreEqual(cmp(inst, inst_CE), 1);
            Assert.AreEqual(cmp(inst, inst_CL), 1);
            Assert.AreEqual(cmp(inst_CL, inst_CE), -1);
        }