NLite.Data.Test.NorthwindExecutionTest.TestDecimalCompare C# (CSharp) Method

TestDecimalCompare() private method

private TestDecimalCompare ( ) : void
return void
        public virtual void TestDecimalCompare()
        {
            // prove that type.Compare(x,y) works with decimal
            var eq = db.Customers.Where(c => c.CustomerID == "ALFKI").Sum(c => decimal.Compare((c.CustomerID == "ALFKI" ? 10m : 10m), 10m));
            var gt = db.Customers.Where(c => c.CustomerID == "ALFKI").Sum(c => decimal.Compare((c.CustomerID == "ALFKI" ? 10m : 10m), 9m));
            var lt = db.Customers.Where(c => c.CustomerID == "ALFKI").Sum(c => decimal.Compare((c.CustomerID == "ALFKI" ? 10m : 10m), 11m));
            AssertValue(0, eq);
            AssertValue(1, gt);
            AssertValue(-1, lt);
        }
NorthwindExecutionTest