MySql.Data.Entity.Tests.AggregateOperators.MinSimple C# (CSharp) Method

MinSimple() private method

private MinSimple ( ) : void
return void
        public void MinSimple()
        {
            MySqlCommand trueCmd = new MySqlCommand("SELECT MIN(minage) FROM Toys", conn);
            int trueMin = (int)trueCmd.ExecuteScalar();

            using (testEntities context = new testEntities())
            {
                string sql = "SELECT VALUE MIN(t.MinAge) FROM Toys AS t";
                ObjectQuery<Int32> q = context.CreateQuery<Int32>(sql);

                foreach (int age in q)
                    Assert.AreEqual(trueMin, age);
            }
        }