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

TestMathPow() private method

private TestMathPow ( ) : void
return void
        public virtual void TestMathPow()
        {
            // 2^n
            var zero = db.Customers.Where(c => c.CustomerID == "ALFKI").Sum(c => Math.Pow((c.CustomerID == "ALFKI") ? 2.0 : 2.0, 0.0));
            var one = db.Customers.Where(c => c.CustomerID == "ALFKI").Sum(c => Math.Pow((c.CustomerID == "ALFKI") ? 2.0 : 2.0, 1.0));
            var two = db.Customers.Where(c => c.CustomerID == "ALFKI").Sum(c => Math.Pow((c.CustomerID == "ALFKI") ? 2.0 : 2.0, 2.0));
            var three = db.Customers.Where(c => c.CustomerID == "ALFKI").Sum(c => Math.Pow((c.CustomerID == "ALFKI") ? 2.0 : 2.0, 3.0));
            AssertValue(1.0, zero);
            AssertValue(2.0, one);
            AssertValue(4.0, two);
            AssertValue(8.0, three);
        }
NorthwindExecutionTest