List:Commits« Previous MessageNext Message »
From:Reggie Burnett Date:June 21 2011 7:40pm
Subject:bzr commit into connector-net-6.3 branch (reggie.burnett:1013)
View as plain text  
#At file:///C:/Users/Reggie/work/connector-net/6.3/ based on revid:reggie.burnett@stripped

 1013 Reggie Burnett	2011-06-21
      reverted our SQL syntax testing code that is not correct after the restructure

    modified:
      Tests/MySql.Data.Entity.Tests/AggregateOperators.cs
      Tests/MySql.Data.Entity.Tests/BaseEdmTest.cs
=== modified file 'Tests/MySql.Data.Entity.Tests/AggregateOperators.cs'
=== modified file 'Tests/MySql.Data.Entity.Tests/AggregateOperators.cs'
--- a/Tests/MySql.Data.Entity.Tests/AggregateOperators.cs	2011-06-21 18:51:27 +0000
+++ b/Tests/MySql.Data.Entity.Tests/AggregateOperators.cs	2011-06-21 19:40:18 +0000
@@ -48,7 +48,7 @@
                 ObjectQuery<Int32> q = context.CreateQuery<Int32>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "CountSimple");
+                CheckSql(sql, SQLSyntax.CountSimple);
 
                 foreach (int count in q)
                     Assert.AreEqual(trueCount, count);
@@ -67,7 +67,7 @@
                 ObjectQuery<Int32> q = context.CreateQuery<Int32>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "BigCountSimple");
+                CheckSql(sql, SQLSyntax.BigCountSimple);
 
                 foreach (int count in q)
                     Assert.AreEqual(trueCount, count);
@@ -86,7 +86,7 @@
                 ObjectQuery<Int32> q = context.CreateQuery<Int32>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "CountWithPredicate");
+                CheckSql(sql, SQLSyntax.CountWithPredicate);
 
                 foreach (int count in q)
                     Assert.AreEqual(trueCount, count);
@@ -105,7 +105,7 @@
                 ObjectQuery<Int32> q = context.CreateQuery<Int32>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "MinSimple");
+                CheckSql(sql, SQLSyntax.MinSimple);
 
                 foreach (int age in q)
                     Assert.AreEqual(trueMin, age);
@@ -124,7 +124,7 @@
                 ObjectQuery<DbDataRecord> q = context.CreateQuery<DbDataRecord>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "MinWithPredicate");
+                CheckSql(sql, SQLSyntax.MinWithPredicate);
 
                 foreach (DbDataRecord r in q)
                 {
@@ -147,7 +147,7 @@
                 ObjectQuery<Double> q = context.CreateQuery<Double>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "MinWithGrouping");
+                CheckSql(sql, SQLSyntax.MinWithGrouping);
 
                 int i = 0;
                 foreach (double freight in q)
@@ -167,7 +167,7 @@
                 ObjectQuery<Int32> q = context.CreateQuery<Int32>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "MaxSimple");
+                CheckSql(sql, SQLSyntax.MaxSimple);
 
                 foreach (int max in q)
                     Assert.AreEqual(trueMax, max);
@@ -186,7 +186,7 @@
                 ObjectQuery<DbDataRecord> q = context.CreateQuery<DbDataRecord>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "MaxWithPredicate");
+                CheckSql(sql, SQLSyntax.MaxWithPredicate);
 
                 foreach (DbDataRecord r in q)
                     Assert.AreEqual(freight, r.GetDouble(0));
@@ -207,7 +207,7 @@
                 ObjectQuery<Double> q = context.CreateQuery<Double>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "MaxWithGrouping");
+                CheckSql(sql, SQLSyntax.MaxWithGrouping);
 
                 int i = 0;
                 foreach (double freight in q)
@@ -227,7 +227,7 @@
                 ObjectQuery<Decimal> q = context.CreateQuery<Decimal>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "AverageSimple");
+                CheckSql(sql, SQLSyntax.AverageSimple);
 
                 foreach (Decimal r in q)
                     Assert.AreEqual(avgAge, r);
@@ -246,7 +246,7 @@
                 ObjectQuery<Double> q = context.CreateQuery<Double>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "AverageWithPredicate");
+                CheckSql(sql, SQLSyntax.AverageWithPredicate);
 
                 foreach (Double r in q)
                     Assert.AreEqual(Convert.ToInt32(freight), Convert.ToInt32(r));
@@ -267,7 +267,7 @@
                 ObjectQuery<DbDataRecord> q = context.CreateQuery<DbDataRecord>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "AverageWithGrouping");
+                CheckSql(sql, SQLSyntax.AverageWithGrouping);
 
                 foreach (object x in q)
                 {
@@ -293,7 +293,7 @@
                 ObjectQuery<Int32> q = context.CreateQuery<Int32>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "SumSimple");
+                CheckSql(sql, SQLSyntax.SumSimple);
 
                 foreach (int r in q)
                     Assert.AreEqual(sumAge, r);
@@ -312,7 +312,7 @@
                 ObjectQuery<Double> q = context.CreateQuery<Double>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "SumWithPredicate");
+                CheckSql(sql, SQLSyntax.SumWithPredicate);
 
                 foreach (Double r in q)
                     Assert.AreEqual(freight, r);
@@ -333,7 +333,7 @@
                 ObjectQuery<Double> q = context.CreateQuery<Double>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "SumWithGrouping");
+                CheckSql(sql, SQLSyntax.SumWithGrouping);
 
                 int i = 0;
                 foreach (double freight in q)
@@ -356,7 +356,7 @@
                 ObjectQuery<Store> q = context.CreateQuery<Store>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "MaxInSubQuery1");
+                CheckSql(sql, SQLSyntax.MaxInSubQuery1);
 
                 int i = 0;
                 foreach (Store s in q)
@@ -379,7 +379,7 @@
                 ObjectQuery<Store> q = context.CreateQuery<Store>(eSql);
 
                 string sql = q.ToTraceString();
-                CheckSql(sql, "MaxInSubQuery2");
+                CheckSql(sql, SQLSyntax.MaxInSubQuery2);
 
                 int i = 0;
                 foreach (Store s in q)

=== modified file 'Tests/MySql.Data.Entity.Tests/BaseEdmTest.cs'
--- a/Tests/MySql.Data.Entity.Tests/BaseEdmTest.cs	2011-06-21 18:51:27 +0000
+++ b/Tests/MySql.Data.Entity.Tests/BaseEdmTest.cs	2011-06-21 19:40:18 +0000
@@ -119,16 +119,12 @@
 
         protected void CheckSql(string sql, string refSql)
         {
-            string checkSql = SQLSyntax.ResourceManager.GetString(refSql);
-#if CLR4
-            checkSql = SQLSyntaxEF4.ResourceManager.GetString(refSql);
-#endif
             StringBuilder str1 = new StringBuilder();
             StringBuilder str2 = new StringBuilder();
             foreach (char c in sql)
                 if (!Char.IsWhiteSpace(c))
                     str1.Append(c);
-            foreach (char c in checkSql)
+            foreach (char c in refSql)
                 if (!Char.IsWhiteSpace(c))
                     str2.Append(c);
             Assert.AreEqual(0, String.Compare(str1.ToString(), str2.ToString(), true));


Attachment: [text/bzr-bundle] bzr/reggie.burnett@oracle.com-20110621194018-xbje8wm1i1u1wr38.bundle
Thread
bzr commit into connector-net-6.3 branch (reggie.burnett:1013) Reggie Burnett21 Jun