diff options
author | Marcos Henrich <marcos.henrich@xamarin.com> | 2016-08-01 12:27:37 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-10-29 15:09:33 +0300 |
commit | 863dc73d1984175cb52734e1cb755c9d57de53bd (patch) | |
tree | 064bd05b59629fd58d317b6853334de013607b4e /mcs/class/System.Data.Linq | |
parent | 01c9543e084d1196a051c4a980b255b0f8b399d5 (diff) |
[bcl] Add NUnitHelper.cs with API not in nunit-lite
NUnitHelper.cs adds CollectionAssert, FileAssert, StringAssert.
Also adds AssertHelper class with methods that are not part of nunitlite
Assert class.
Diffstat (limited to 'mcs/class/System.Data.Linq')
14 files changed, 64 insertions, 64 deletions
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/DataContext.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/DataContext.cs index c9bea8ea40c..f2b6d3ede66 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/DataContext.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/DataContext.cs @@ -71,7 +71,7 @@ using MsNorthwind; Assert.IsNotNull(dbCommand.CommandText);
- Assert.Greater(dbCommand.Parameters.Count, 0);
+ AssertHelper.Greater(dbCommand.Parameters.Count, 0);
}
}
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/DynamicLinqTest.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/DynamicLinqTest.cs index 5ea0dbc7d76..9bd6aac50f9 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/DynamicLinqTest.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/DynamicLinqTest.cs @@ -186,7 +186,7 @@ using nwind; Northwind db = CreateDB();
Expression<Func<Customer, bool>> predicate = c => c.City == "Paris";
int count = db.Customers.Count(predicate);
- Assert.Greater(count, 0); // Some databases have more than 1 customer in Paris
+ AssertHelper.Greater(count, 0); // Some databases have more than 1 customer in Paris
}
/// <summary>
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ExecuteCommand_Test.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ExecuteCommand_Test.cs index 87bf3d8cdee..b8a1c728d8e 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ExecuteCommand_Test.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ExecuteCommand_Test.cs @@ -68,7 +68,7 @@ using nwind; {
Northwind db = CreateDB();
int result = db.ExecuteCommand("SELECT count(*) FROM \"Products\"");
- Assert.Greater(result, 0, "Expecting some rows in Products table, got:" + result);
+ AssertHelper.Greater(result, 0, "Expecting some rows in Products table, got:" + result);
}
/// <summary>
@@ -85,7 +85,7 @@ using nwind; Northwind db = CreateDB();
int result = db.ExecuteCommand("SELECT count(*) FROM [Products] WHERE [ProductID]>{0}", 3);
//long iResult = base.ExecuteScalar(sql);
- Assert.Greater(result, 0, "Expecting some rows in Products table, got:" + result);
+ AssertHelper.Greater(result, 0, "Expecting some rows in Products table, got:" + result);
}
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ExecuteQuery_Test.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ExecuteQuery_Test.cs index ea375055d7e..fac3d615da5 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ExecuteQuery_Test.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ExecuteQuery_Test.cs @@ -67,7 +67,7 @@ using nwind; string beforecountry = character.Country;
character.Country = "Burmuda";
- Assert.Greater(db.GetChangeSet().Updates.Count, 0);
+ AssertHelper.Greater(db.GetChangeSet().Updates.Count, 0);
db.SubmitChanges();
var character2 = db.Customers.First(c=>c.CustomerID==character.CustomerID);
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Advanced.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Advanced.cs index e420e84f6bb..dd976666e05 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Advanced.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Linq_101_Samples/Advanced.cs @@ -159,7 +159,7 @@ using nwind; var q3 = q1.Union(q2);
- Assert.Greater(q1.Count(), 0);
+ AssertHelper.Greater(q1.Count(), 0);
Assert.IsTrue(q1.Count() + q2.Count() >= q3.Count());
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest.cs index 1f443c32ac6..71762345002 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest.cs @@ -234,7 +234,7 @@ namespace nwind var q = from p in db.Products select p;
List<Product> products = q.ToList();
int productCount = products.Count;
- Assert.Greater(productCount, 0, "Expected some products, got none");
+ AssertHelper.Greater(productCount, 0, "Expected some products, got none");
}
#if !DEBUG && SQLITE
@@ -572,7 +572,7 @@ namespace nwind .Join(db.GetTable<EmployeeTerritory>(), t => t.TerritoryID, l => l.TerritoryID, (t, l) => l)
.Join(db.GetTable<Employee>().Where(e => e.EmployeeID > 0), l => l.EmployeeID, e => e.EmployeeID, (l, e) => e);
var employeeCount = q.Count();
- Assert.Greater(employeeCount, 0, "Expected any employees, got count=" + employeeCount);
+ AssertHelper.Greater(employeeCount, 0, "Expected any employees, got count=" + employeeCount);
}
/// <summary>
@@ -839,7 +839,7 @@ namespace nwind var q = from p in db.Products where p.ProductName == "Chai" select p.ProductID;
var productID = q.First();
- Assert.Greater(productID, 0, "Expected penID>0, got " + productID);
+ AssertHelper.Greater(productID, 0, "Expected penID>0, got " + productID);
}
@@ -880,7 +880,7 @@ namespace nwind var q = from p in db.Products where p.ProductName == "Chai" select p.ProductID;
var productID = q.Last();
- Assert.Greater(productID, 0, "Expected penID>0, got " + productID);
+ AssertHelper.Greater(productID, 0, "Expected penID>0, got " + productID);
}
#if !DEBUG && (POSTGRES || (MSSQL && !L2SQL))
@@ -906,7 +906,7 @@ namespace nwind }
prevProductName = p.ProductName;
}
- //Assert.Greater(productID,0,"Expected penID>0, got "+productID);
+ //AssertHelper.Greater(productID,0,"Expected penID>0, got "+productID);
}
[Test]
@@ -915,7 +915,7 @@ namespace nwind Northwind db = CreateDB();
//var q = from p in db.Products where "Chai"==p.ProductName select p.Order;
//List<Order> penOrders = q.ToList();
- //Assert.Greater(penOrders.Count,0,"Expected some orders for product 'Chai'");
+ //AssertHelper.Greater(penOrders.Count,0,"Expected some orders for product 'Chai'");
var q =
from o in db.Orders
@@ -929,7 +929,7 @@ namespace nwind Assert.IsNotNull(co.c.City, "Expected non-null customer city");
Assert.IsNotNull(co.o, "Expected non-null order");
}
- Assert.Greater(list1.Count, 0, "Expected some orders for London customers");
+ AssertHelper.Greater(list1.Count, 0, "Expected some orders for London customers");
}
[Test]
@@ -947,7 +947,7 @@ namespace nwind Assert.IsNotNull(co.c, "Expected non-null customer");
Assert.IsNotNull(co.o, "Expected non-null order");
}
- Assert.Greater(list1.Count, 0, "Expected some orders for London customers");
+ AssertHelper.Greater(list1.Count, 0, "Expected some orders for London customers");
}
[Test]
@@ -962,7 +962,7 @@ namespace nwind where c.City == "London"
select new { c, o };
- Assert.Greater(q.ToList().Count, 0, "Expected some orders for London customers");
+ AssertHelper.Greater(q.ToList().Count, 0, "Expected some orders for London customers");
}
[Test]
@@ -987,7 +987,7 @@ namespace nwind #else
int expectedCount = 2; //Oracle, Mysql: 'Toilet Paper' and 'iPod'
#endif
- Assert.Greater(prods.Count, expectedCount, "Expected couple of products with letter 'p'");
+ AssertHelper.Greater(prods.Count, expectedCount, "Expected couple of products with letter 'p'");
}
[Test]
@@ -1002,11 +1002,11 @@ namespace nwind ).Take(5);
//var q = db.Products.Where( p=>p.ProductName.Contains("p")).Take(5);
List<Product> prods = q.ToList();
- Assert.Greater(prods.Count, 2, "Expected couple of products with letter 'p'");
+ AssertHelper.Greater(prods.Count, 2, "Expected couple of products with letter 'p'");
var prodID0 = prods[0].ProductID;
var prodID1 = prods[1].ProductID;
- Assert.Greater(prodID0, prodID1, "Sorting is broken");
+ AssertHelper.Greater(prodID0, prodID1, "Sorting is broken");
}
[Test]
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest_Complex.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest_Complex.cs index 8d8c325cbec..fe7a6753181 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest_Complex.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest_Complex.cs @@ -136,7 +136,7 @@ using Id = System.Int32; {
var q = from p in db.Products select p;
int productCount = q.Count();
- Assert.Greater(productCount, 0, "Expected non-zero product count");
+ AssertHelper.Greater(productCount, 0, "Expected non-zero product count");
}
[Test]
@@ -144,7 +144,7 @@ using Id = System.Int32; {
var q = from p in db.Products select p.ProductID;
int productCount = q.Count();
- Assert.Greater(productCount, 0, "Expected non-zero product count");
+ AssertHelper.Greater(productCount, 0, "Expected non-zero product count");
Console.WriteLine();
}
[Test]
@@ -152,7 +152,7 @@ using Id = System.Int32; {
var q = from p in db.Products select p.ProductID;
int productCount = q.Count(i => i < 3);
- Assert.Greater(productCount, 0, "Expected non-zero product count");
+ AssertHelper.Greater(productCount, 0, "Expected non-zero product count");
Assert.IsTrue(productCount < 4, "Expected product count < 3");
}
@@ -161,7 +161,7 @@ using Id = System.Int32; {
var q = from p in db.Products select p.ProductID;
var maxID = q.Max();
- Assert.Greater(maxID, 0, "Expected non-zero product count");
+ AssertHelper.Greater(maxID, 0, "Expected non-zero product count");
}
[Test]
@@ -169,7 +169,7 @@ using Id = System.Int32; {
var q = from p in db.Products select p.ProductID;
var minID = q.Min();
- Assert.Greater(minID, 0, "Expected non-zero product count");
+ AssertHelper.Greater(minID, 0, "Expected non-zero product count");
}
#if !ORACLE // picrap: this test causes an internal buffer overflow when marshaling with oracle win32 driver
@@ -179,7 +179,7 @@ using Id = System.Int32; {
var q = from p in db.Products select p.ProductID;
double avg = q.Average();
- Assert.Greater(avg, 0, "Expected non-zero productID average");
+ AssertHelper.Greater(avg, 0, "Expected non-zero productID average");
}
#endif
@@ -268,7 +268,7 @@ using Id = System.Int32; var q4 = from p in db.Products select p.ProductName + p.ProductID;
//var q4 = from p in db.Products select p.ProductID;
var q5 = q4.ToList();
- Assert.Greater(q5.Count, 2, "Expected to see some concat strings");
+ AssertHelper.Greater(q5.Count, 2, "Expected to see some concat strings");
foreach (string s0 in q5)
{
bool startWithLetter = Char.IsLetter(s0[0]);
@@ -288,7 +288,7 @@ using Id = System.Int32; select p.ProductName+p.ProductID;
//var q4 = from p in db.Products select p.ProductID;
//var q5 = q4.ToList();
- Assert.Greater( q4.Count(), 2, "Expected to see some concat strings");
+ AssertHelper.Greater( q4.Count(), 2, "Expected to see some concat strings");
foreach(string s0 in q4)
{
bool startWithLetter = Char.IsLetter(s0[0]);
@@ -312,8 +312,8 @@ using Id = System.Int32; CustomerID = c.CustomerID
});
var list = q.ToList();
- Assert.Greater(list.Count(), 0, "Expected list");
- //Assert.Greater(list.Count(), 0, "Expected list");
+ AssertHelper.Greater(list.Count(), 0, "Expected list");
+ //AssertHelper.Greater(list.Count(), 0, "Expected list");
Assert.Ignore("test passed but: theoretically constructions of entity types are not allowed");
}
@@ -331,8 +331,8 @@ using Id = System.Int32; //this OrderBy clause messes up the SQL statement
var q2 = q.OrderBy(c => c.CustomerID);
var list = q2.ToList();
- Assert.Greater(list.Count(), 0, "Expected list");
- //Assert.Greater(list.Count(), 0, "Expected list");
+ AssertHelper.Greater(list.Count(), 0, "Expected list");
+ //AssertHelper.Greater(list.Count(), 0, "Expected list");
}
@@ -344,7 +344,7 @@ using Id = System.Int32; orderby c.ContactName ?? ""
select c;
var list = q.ToList();
- Assert.Greater(list.Count(), 0, "Expected list");
+ AssertHelper.Greater(list.Count(), 0, "Expected list");
}
[Test(Description = "Non-dynamic version of DL5_NestedObjectSelect")]
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest_GroupBy.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest_GroupBy.cs index 4d87952ed79..9ff4496ee8b 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest_GroupBy.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTest_GroupBy.cs @@ -231,10 +231,10 @@ using nwind; select new { g.Key, OrderCount = g.Count() };
var lst = q2.ToList();
- Assert.Greater(lst.Count, 0, "Expected some grouped order results");
+ AssertHelper.Greater(lst.Count, 0, "Expected some grouped order results");
var result0 = lst[0];
Assert.IsTrue(result0.Key != null, "Key must be non-null");
- Assert.Greater(result0.OrderCount, 0, "Count must be > 0");
+ AssertHelper.Greater(result0.OrderCount, 0, "Count must be > 0");
//select new { g.Key , SumPerCustomer = g.Sum(o2=>o2.OrderID) };
}
@@ -252,10 +252,10 @@ using nwind; select new { g.Key, OrderCount = g.Count() };
var lst = q2.ToList();
- Assert.Greater(lst.Count, 0, "Expected some grouped order results");
+ AssertHelper.Greater(lst.Count, 0, "Expected some grouped order results");
var result0 = lst[0];
Assert.IsTrue(result0.Key != null, "Key must be non-null");
- Assert.Greater(result0.OrderCount, 0, "Count must be > 0");
+ AssertHelper.Greater(result0.OrderCount, 0, "Count must be > 0");
//select new { g.Key , SumPerCustomer = g.Sum(o2=>o2.OrderID) };
}
@@ -272,12 +272,12 @@ using nwind; //where g.Count()>1
select new { g.Key, OrderSum = g.Sum(o => o.OrderID) };
var lst = q2.ToList();
- Assert.Greater(lst.Count, 0, "Expected some grouped order results");
+ AssertHelper.Greater(lst.Count, 0, "Expected some grouped order results");
foreach (var result in lst)
{
Console.WriteLine(" Result: custID=" + result.Key + " sum=" + result.OrderSum);
Assert.IsTrue(result.Key != null, "Key must be non-null");
- Assert.Greater(result.OrderSum, 0, "OrderSum must be > 0");
+ AssertHelper.Greater(result.OrderSum, 0, "OrderSum must be > 0");
}
//select new { g.Key , SumPerCustomer = g.Sum(o2=>o2.OrderID) };
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_AnyCountFirst.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_AnyCountFirst.cs index 0c58ea44d4c..48e0020e30f 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_AnyCountFirst.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_AnyCountFirst.cs @@ -331,7 +331,7 @@ using nwind; decimal[] d = new decimal[] { 1, 4, 5, 6, 10248, 10255 };
var q = db.OrderDetails.Where(o => d.Contains(o.OrderID));
- Assert.Greater(q.Count(), 0);
+ AssertHelper.Greater(q.Count(), 0);
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_DateTimeFunctions.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_DateTimeFunctions.cs index 3d1981a405d..dabe2f12a78 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_DateTimeFunctions.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_DateTimeFunctions.cs @@ -265,7 +265,7 @@ using DbLinq.Data.Linq; var list = query.ToList();
- Assert.Greater(list.Count, 0);
+ AssertHelper.Greater(list.Count, 0);
}
#if !DEBUG && SQLITE
@@ -299,7 +299,7 @@ using DbLinq.Data.Linq; var list = query.ToList();
- Assert.Greater(list.Count, 0);
+ AssertHelper.Greater(list.Count, 0);
}
@@ -334,7 +334,7 @@ using DbLinq.Data.Linq; var list = query.ToList();
- Assert.Greater(list.Count, 0);
+ AssertHelper.Greater(list.Count, 0);
}
#if !DEBUG && (SQLITE || MSSQL)
@@ -354,7 +354,7 @@ using DbLinq.Data.Linq; var list = query.ToList();
- Assert.Greater(list.Count, 0);
+ AssertHelper.Greater(list.Count, 0);
}
#if !DEBUG && SQLITE
@@ -388,7 +388,7 @@ using DbLinq.Data.Linq; var list = query.ToList();
- Assert.Greater(list.Count, 0);
+ AssertHelper.Greater(list.Count, 0);
}
#if !DEBUG && SQLITE
@@ -410,7 +410,7 @@ using DbLinq.Data.Linq; var list = query.ToList();
- Assert.Greater(list.Count, 0);
+ AssertHelper.Greater(list.Count, 0);
}
#if !DEBUG && POSTGRES
@@ -443,7 +443,7 @@ using DbLinq.Data.Linq; var list = query.ToList();
- Assert.Greater(list.Count, 0);
+ AssertHelper.Greater(list.Count, 0);
}
finally
{
@@ -481,7 +481,7 @@ using DbLinq.Data.Linq; var list = query.ToList();
- Assert.Greater(list.Count, 0);
+ AssertHelper.Greater(list.Count, 0);
}
finally
{
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_EntitySet.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_EntitySet.cs index 40503fed4f5..16a0b0a7ba0 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_EntitySet.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/ReadTests_EntitySet.cs @@ -53,7 +53,7 @@ using nwind; {
var db = CreateDB();
var customer = db.Customers.First();
- Assert.Greater(customer.Orders.Count, 0);
+ AssertHelper.Greater(customer.Orders.Count, 0);
}
#if !DEBUG && (SQLITE || (MSSQL && !L2SQL))
@@ -65,7 +65,7 @@ using nwind; var db = CreateDB();
var results = (from c in db.Customers select c.Orders).ToList();
- Assert.Greater(results.Count, 0);
+ AssertHelper.Greater(results.Count, 0);
}
[Test]
@@ -98,7 +98,7 @@ using nwind; var db = CreateDB();
var customer = db.Customers.First();
- Assert.Greater(customer.Orders.Count, 0, "#1");
+ AssertHelper.Greater(customer.Orders.Count, 0, "#1");
Assert.IsTrue(customer.Orders.HasLoadedOrAssignedValues, "#2");
customer.Orders.SetSource(System.Linq.Enumerable.Empty<Order>());
}
@@ -136,7 +136,7 @@ using nwind; int ordersCount = (from cust in db.Customers
select cust.Orders.Count).First();
- Assert.Greater(ordersCount, 0);
+ AssertHelper.Greater(ordersCount, 0);
var customer2 = db.Customers.First();
customer2.Orders.SetSource(System.Linq.Enumerable.Empty<Order>());
@@ -154,11 +154,11 @@ using nwind; var c = db.Customers.First();
int beforeCount = c.Orders.Count;
- Assert.Greater(beforeCount, 0);
+ AssertHelper.Greater(beforeCount, 0);
c.Orders.Clear();
Assert.AreEqual(c.Orders.Count, 0);
c.Orders.AddRange(db.Orders);
- Assert.Greater(c.Orders.Count, beforeCount);
+ AssertHelper.Greater(c.Orders.Count, beforeCount);
db.Refresh(RefreshMode.OverwriteCurrentValues, c.Orders);
Assert.AreEqual(c.Orders.Count, beforeCount);
@@ -174,13 +174,13 @@ using nwind; var c = db.Customers.First();
int beforeCount = c.Orders.Count;
- Assert.Greater(beforeCount, 0);
+ AssertHelper.Greater(beforeCount, 0);
c.Orders.Clear();
Assert.AreEqual(c.Orders.Count, 0);
c.Orders.AddRange(db.Orders);
int middleCount = c.Orders.Count;
- Assert.Greater(c.Orders.Count, beforeCount);
+ AssertHelper.Greater(c.Orders.Count, beforeCount);
db.Refresh(RefreshMode.KeepCurrentValues, c.Orders);
Assert.AreEqual(c.Orders.Count, middleCount);
@@ -233,7 +233,7 @@ using nwind; {
var db = CreateDB();
var customer = db.Customers.Where(c => c.Orders.Count > 0).First();
- Assert.Greater(customer.Orders.Count, 0);
+ AssertHelper.Greater(customer.Orders.Count, 0);
bool ok;
System.ComponentModel.ListChangedEventArgs args = null;
customer.Orders.ListChanged += delegate(object sender, System.ComponentModel.ListChangedEventArgs a)
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/StoredProcTest.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/StoredProcTest.cs index f792f8e585f..e32291198ab 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/StoredProcTest.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/StoredProcTest.cs @@ -86,10 +86,10 @@ using nwind; foreach (var c in q)
{
Assert.IsNotNull(c.CustomerID);
- Assert.Greater(c.OrderCount, -1);
+ AssertHelper.Greater(c.OrderCount, -1);
count++;
}
- Assert.Greater(count, 0);
+ AssertHelper.Greater(count, 0);
}
[Test]
@@ -103,10 +103,10 @@ using nwind; foreach (var v in q)
{
Assert.IsNotNull(v.c.CustomerID);
- Assert.Greater(v.OrderCount, -1);
+ AssertHelper.Greater(v.OrderCount, -1);
count++;
}
- Assert.Greater(count, 0);
+ AssertHelper.Greater(count, 0);
}
[Test]
@@ -121,7 +121,7 @@ using nwind; Assert.IsTrue(c.CustomerID!=null, "Non-null customerID required");
count++;
}
- Assert.Greater(count, 0);
+ AssertHelper.Greater(count, 0);
}
#endif
}
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Table.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Table.cs index 3aa1c9e1b6f..08ed664f1b3 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Table.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/Table.cs @@ -161,7 +161,7 @@ using nwind; var customer = new Customer();
db.Customers.Attach(customer, originalCustomer);
- Assert.Greater(db.Customers.GetModifiedMembers(customer).Count(), 0);
+ AssertHelper.Greater(db.Customers.GetModifiedMembers(customer).Count(), 0);
}
#if !DEBUG && (SQLITE || POSTGRES || (MSSQL && !L2SQL))
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/WriteTest.cs b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/WriteTest.cs index a30b2cff6a4..11fe0098a2a 100644 --- a/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/WriteTest.cs +++ b/mcs/class/System.Data.Linq/src/DbLinq/Test/Providers/WriteTest.cs @@ -165,7 +165,7 @@ using Id = System.Int32; newProd.QuantityPerUnit = "33 1/2";
db.Products.InsertOnSubmit(newProd);
db.SubmitChanges();
- Assert.Greater(newProd.ProductID, 0, "After insertion, ProductID should be non-zero");
+ AssertHelper.Greater(newProd.ProductID, 0, "After insertion, ProductID should be non-zero");
//Assert.IsFalse(newProd.IsModified, "After insertion, Product.IsModified should be false");
return (int)newProd.ProductID; //this test cab be used from delete tests
}
@@ -180,7 +180,7 @@ using Id = System.Int32; public void G2_DeleteTest()
{
int insertedID = insertProduct_priv();
- Assert.Greater(insertedID, 0, "DeleteTest cannot operate if row was not inserted");
+ AssertHelper.Greater(insertedID, 0, "DeleteTest cannot operate if row was not inserted");
Northwind db = CreateDB();
@@ -200,7 +200,7 @@ using Id = System.Int32; public void G3_DeleteTest()
{
int insertedID = insertProduct_priv();
- Assert.Greater(insertedID, 0, "DeleteTest cannot operate if row was not inserted");
+ AssertHelper.Greater(insertedID, 0, "DeleteTest cannot operate if row was not inserted");
Northwind db = CreateDB();
|