NUnitHelper.cs adds CollectionAssert, FileAssert, StringAssert.
Also adds AssertHelper class with methods that are not part of nunitlite
Assert class.
+../../test-helpers/NunitHelpers.cs
FunctionalTest.cs
Microsoft.Build.Construction/ProjectItemElementTest.cs
Microsoft.Build.Construction/ProjectRootElementTest.cs
+../../test-helpers/NunitHelpers.cs
RewriteAndLoad.cs
TestCCRewrite.cs
+../../test-helpers/NunitHelpers.cs
Mono.Collections.Concurrent/CollectionStressTestHelper.cs
Mono.Collections.Concurrent/ConcurrentSkipListTests.cs
Mono.Threading/ParallelTestHelper.cs
+../../test-helpers/NunitHelpers.cs
Mono.Unix/ReadlinkTest.cs
Mono.Unix/StdioFileStreamTest.cs
Mono.Unix/UnixEncodingTest.cs
//
using NUnit.Framework;
-#if !MONODROID
-using NUnit.Framework.SyntaxHelpers;
-#endif
+
using System;
using System.Text;
using System.Threading;
long r = Syscall.readlink (link, buf);
if (r < 0)
UnixMarshal.ThrowExceptionForLastError ();
- Assert.GreaterOrEqual (buf.Length, r);
+ AssertHelper.GreaterOrEqual (buf.Length, r);
if (r == buf.Length)
buf = new byte[checked (buf.Length * 2)];
else
long r = Syscall.readlinkat (TempFD, "link", buf);
if (r < 0)
UnixMarshal.ThrowExceptionForLastError ();
- Assert.GreaterOrEqual (buf.Length, r);
+ AssertHelper.GreaterOrEqual (buf.Length, r);
if (r == buf.Length)
buf = new byte[checked (buf.Length * 2)];
else
if (r < 0)
UnixMarshal.ThrowExceptionForLastError ();
Assert.AreEqual (r, sb.Length);
- Assert.GreaterOrEqual (sb.Capacity, r);
+ AssertHelper.GreaterOrEqual (sb.Capacity, r);
if (r == sb.Capacity)
checked { sb.Capacity *= 2; }
else
if (r < 0)
UnixMarshal.ThrowExceptionForLastError ();
Assert.AreEqual (r, sb.Length);
- Assert.GreaterOrEqual (sb.Capacity, r);
+ AssertHelper.GreaterOrEqual (sb.Capacity, r);
if (r == sb.Capacity)
checked { sb.Capacity *= 2; }
else
//
using NUnit.Framework;
-#if !MONODROID
-using NUnit.Framework.SyntaxHelpers;
-#endif
+
using System;
using System.Text;
using System.Threading;
using Mono.Unix;
using Mono.Unix.Android;
using Mono.Unix.Native;
-#if !MONODROID
-namespace NUnit.Framework.SyntaxHelpers { class Dummy {} }
-#endif
+
namespace MonoTests.Mono.Unix {
[TestFixture]
+../../test-helpers/NunitHelpers.cs
Mono.XBuild.Tasks/PcFileCacheTest.cs
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
namespace MonoTests.System.Configuration {
using Util;
using System.Threading;
using NUnit.Framework;
using System.Linq;
-using NUnit.Framework.SyntaxHelpers;
using NUnit.Framework.Constraints;
using System.Diagnostics;
-namespace NUnit.Framework.SyntaxHelpers { class Dummy {} }
-
namespace MonoTests.System.Linq
{
[TestFixture]
\r
\r
Assert.IsNotNull(dbCommand.CommandText);\r
- Assert.Greater(dbCommand.Parameters.Count, 0);\r
+ AssertHelper.Greater(dbCommand.Parameters.Count, 0);\r
}\r
}\r
}\r
Northwind db = CreateDB();\r
Expression<Func<Customer, bool>> predicate = c => c.City == "Paris";\r
int count = db.Customers.Count(predicate);\r
- Assert.Greater(count, 0); // Some databases have more than 1 customer in Paris\r
+ AssertHelper.Greater(count, 0); // Some databases have more than 1 customer in Paris\r
}\r
\r
/// <summary>\r
{\r
Northwind db = CreateDB();\r
int result = db.ExecuteCommand("SELECT count(*) FROM \"Products\"");\r
- Assert.Greater(result, 0, "Expecting some rows in Products table, got:" + result);\r
+ AssertHelper.Greater(result, 0, "Expecting some rows in Products table, got:" + result);\r
}\r
\r
/// <summary>\r
Northwind db = CreateDB();\r
int result = db.ExecuteCommand("SELECT count(*) FROM [Products] WHERE [ProductID]>{0}", 3);\r
//long iResult = base.ExecuteScalar(sql);\r
- Assert.Greater(result, 0, "Expecting some rows in Products table, got:" + result);\r
+ AssertHelper.Greater(result, 0, "Expecting some rows in Products table, got:" + result);\r
}\r
\r
}\r
string beforecountry = character.Country;\r
character.Country = "Burmuda";\r
\r
- Assert.Greater(db.GetChangeSet().Updates.Count, 0);\r
+ AssertHelper.Greater(db.GetChangeSet().Updates.Count, 0);\r
db.SubmitChanges();\r
\r
var character2 = db.Customers.First(c=>c.CustomerID==character.CustomerID);\r
\r
var q3 = q1.Union(q2);\r
\r
- Assert.Greater(q1.Count(), 0);\r
+ AssertHelper.Greater(q1.Count(), 0);\r
Assert.IsTrue(q1.Count() + q2.Count() >= q3.Count());\r
\r
}\r
var q = from p in db.Products select p;\r
List<Product> products = q.ToList();\r
int productCount = products.Count;\r
- Assert.Greater(productCount, 0, "Expected some products, got none");\r
+ AssertHelper.Greater(productCount, 0, "Expected some products, got none");\r
}\r
\r
#if !DEBUG && SQLITE\r
.Join(db.GetTable<EmployeeTerritory>(), t => t.TerritoryID, l => l.TerritoryID, (t, l) => l)\r
.Join(db.GetTable<Employee>().Where(e => e.EmployeeID > 0), l => l.EmployeeID, e => e.EmployeeID, (l, e) => e);\r
var employeeCount = q.Count();\r
- Assert.Greater(employeeCount, 0, "Expected any employees, got count=" + employeeCount);\r
+ AssertHelper.Greater(employeeCount, 0, "Expected any employees, got count=" + employeeCount);\r
}\r
\r
/// <summary>\r
\r
var q = from p in db.Products where p.ProductName == "Chai" select p.ProductID;\r
var productID = q.First();\r
- Assert.Greater(productID, 0, "Expected penID>0, got " + productID);\r
+ AssertHelper.Greater(productID, 0, "Expected penID>0, got " + productID);\r
}\r
\r
\r
\r
var q = from p in db.Products where p.ProductName == "Chai" select p.ProductID;\r
var productID = q.Last();\r
- Assert.Greater(productID, 0, "Expected penID>0, got " + productID);\r
+ AssertHelper.Greater(productID, 0, "Expected penID>0, got " + productID);\r
}\r
\r
#if !DEBUG && (POSTGRES || (MSSQL && !L2SQL))\r
}\r
prevProductName = p.ProductName;\r
}\r
- //Assert.Greater(productID,0,"Expected penID>0, got "+productID);\r
+ //AssertHelper.Greater(productID,0,"Expected penID>0, got "+productID);\r
}\r
\r
[Test]\r
Northwind db = CreateDB();\r
//var q = from p in db.Products where "Chai"==p.ProductName select p.Order;\r
//List<Order> penOrders = q.ToList();\r
- //Assert.Greater(penOrders.Count,0,"Expected some orders for product 'Chai'");\r
+ //AssertHelper.Greater(penOrders.Count,0,"Expected some orders for product 'Chai'");\r
\r
var q =\r
from o in db.Orders\r
Assert.IsNotNull(co.c.City, "Expected non-null customer city");\r
Assert.IsNotNull(co.o, "Expected non-null order");\r
}\r
- Assert.Greater(list1.Count, 0, "Expected some orders for London customers");\r
+ AssertHelper.Greater(list1.Count, 0, "Expected some orders for London customers");\r
}\r
\r
[Test]\r
Assert.IsNotNull(co.c, "Expected non-null customer");\r
Assert.IsNotNull(co.o, "Expected non-null order");\r
}\r
- Assert.Greater(list1.Count, 0, "Expected some orders for London customers");\r
+ AssertHelper.Greater(list1.Count, 0, "Expected some orders for London customers");\r
}\r
\r
[Test]\r
where c.City == "London"\r
select new { c, o };\r
\r
- Assert.Greater(q.ToList().Count, 0, "Expected some orders for London customers");\r
+ AssertHelper.Greater(q.ToList().Count, 0, "Expected some orders for London customers");\r
}\r
\r
[Test]\r
#else\r
int expectedCount = 2; //Oracle, Mysql: 'Toilet Paper' and 'iPod'\r
#endif\r
- Assert.Greater(prods.Count, expectedCount, "Expected couple of products with letter 'p'");\r
+ AssertHelper.Greater(prods.Count, expectedCount, "Expected couple of products with letter 'p'");\r
}\r
\r
[Test]\r
).Take(5);\r
//var q = db.Products.Where( p=>p.ProductName.Contains("p")).Take(5);\r
List<Product> prods = q.ToList();\r
- Assert.Greater(prods.Count, 2, "Expected couple of products with letter 'p'");\r
+ AssertHelper.Greater(prods.Count, 2, "Expected couple of products with letter 'p'");\r
\r
var prodID0 = prods[0].ProductID;\r
var prodID1 = prods[1].ProductID;\r
- Assert.Greater(prodID0, prodID1, "Sorting is broken");\r
+ AssertHelper.Greater(prodID0, prodID1, "Sorting is broken");\r
}\r
\r
[Test]\r
{\r
var q = from p in db.Products select p;\r
int productCount = q.Count();\r
- Assert.Greater(productCount, 0, "Expected non-zero product count");\r
+ AssertHelper.Greater(productCount, 0, "Expected non-zero product count");\r
}\r
\r
[Test]\r
{\r
var q = from p in db.Products select p.ProductID;\r
int productCount = q.Count();\r
- Assert.Greater(productCount, 0, "Expected non-zero product count");\r
+ AssertHelper.Greater(productCount, 0, "Expected non-zero product count");\r
Console.WriteLine();\r
}\r
[Test]\r
{\r
var q = from p in db.Products select p.ProductID;\r
int productCount = q.Count(i => i < 3);\r
- Assert.Greater(productCount, 0, "Expected non-zero product count");\r
+ AssertHelper.Greater(productCount, 0, "Expected non-zero product count");\r
Assert.IsTrue(productCount < 4, "Expected product count < 3");\r
}\r
\r
{\r
var q = from p in db.Products select p.ProductID;\r
var maxID = q.Max();\r
- Assert.Greater(maxID, 0, "Expected non-zero product count");\r
+ AssertHelper.Greater(maxID, 0, "Expected non-zero product count");\r
}\r
\r
[Test]\r
{\r
var q = from p in db.Products select p.ProductID;\r
var minID = q.Min();\r
- Assert.Greater(minID, 0, "Expected non-zero product count");\r
+ AssertHelper.Greater(minID, 0, "Expected non-zero product count");\r
}\r
\r
#if !ORACLE // picrap: this test causes an internal buffer overflow when marshaling with oracle win32 driver\r
{\r
var q = from p in db.Products select p.ProductID;\r
double avg = q.Average();\r
- Assert.Greater(avg, 0, "Expected non-zero productID average");\r
+ AssertHelper.Greater(avg, 0, "Expected non-zero productID average");\r
}\r
\r
#endif\r
var q4 = from p in db.Products select p.ProductName + p.ProductID;\r
//var q4 = from p in db.Products select p.ProductID;\r
var q5 = q4.ToList();\r
- Assert.Greater(q5.Count, 2, "Expected to see some concat strings");\r
+ AssertHelper.Greater(q5.Count, 2, "Expected to see some concat strings");\r
foreach (string s0 in q5)\r
{\r
bool startWithLetter = Char.IsLetter(s0[0]);\r
select p.ProductName+p.ProductID;\r
//var q4 = from p in db.Products select p.ProductID;\r
//var q5 = q4.ToList();\r
- Assert.Greater( q4.Count(), 2, "Expected to see some concat strings");\r
+ AssertHelper.Greater( q4.Count(), 2, "Expected to see some concat strings");\r
foreach(string s0 in q4)\r
{\r
bool startWithLetter = Char.IsLetter(s0[0]);\r
CustomerID = c.CustomerID\r
});\r
var list = q.ToList();\r
- Assert.Greater(list.Count(), 0, "Expected list");\r
- //Assert.Greater(list.Count(), 0, "Expected list");\r
+ AssertHelper.Greater(list.Count(), 0, "Expected list");\r
+ //AssertHelper.Greater(list.Count(), 0, "Expected list");\r
Assert.Ignore("test passed but: theoretically constructions of entity types are not allowed");\r
}\r
\r
//this OrderBy clause messes up the SQL statement\r
var q2 = q.OrderBy(c => c.CustomerID);\r
var list = q2.ToList();\r
- Assert.Greater(list.Count(), 0, "Expected list");\r
- //Assert.Greater(list.Count(), 0, "Expected list");\r
+ AssertHelper.Greater(list.Count(), 0, "Expected list");\r
+ //AssertHelper.Greater(list.Count(), 0, "Expected list");\r
}\r
\r
\r
orderby c.ContactName ?? ""\r
select c;\r
var list = q.ToList();\r
- Assert.Greater(list.Count(), 0, "Expected list");\r
+ AssertHelper.Greater(list.Count(), 0, "Expected list");\r
}\r
\r
[Test(Description = "Non-dynamic version of DL5_NestedObjectSelect")]\r
select new { g.Key, OrderCount = g.Count() };\r
\r
var lst = q2.ToList();\r
- Assert.Greater(lst.Count, 0, "Expected some grouped order results");\r
+ AssertHelper.Greater(lst.Count, 0, "Expected some grouped order results");\r
var result0 = lst[0];\r
Assert.IsTrue(result0.Key != null, "Key must be non-null");\r
- Assert.Greater(result0.OrderCount, 0, "Count must be > 0");\r
+ AssertHelper.Greater(result0.OrderCount, 0, "Count must be > 0");\r
//select new { g.Key , SumPerCustomer = g.Sum(o2=>o2.OrderID) };\r
}\r
\r
select new { g.Key, OrderCount = g.Count() };\r
\r
var lst = q2.ToList();\r
- Assert.Greater(lst.Count, 0, "Expected some grouped order results");\r
+ AssertHelper.Greater(lst.Count, 0, "Expected some grouped order results");\r
var result0 = lst[0];\r
Assert.IsTrue(result0.Key != null, "Key must be non-null");\r
- Assert.Greater(result0.OrderCount, 0, "Count must be > 0");\r
+ AssertHelper.Greater(result0.OrderCount, 0, "Count must be > 0");\r
//select new { g.Key , SumPerCustomer = g.Sum(o2=>o2.OrderID) };\r
}\r
\r
//where g.Count()>1\r
select new { g.Key, OrderSum = g.Sum(o => o.OrderID) };\r
var lst = q2.ToList();\r
- Assert.Greater(lst.Count, 0, "Expected some grouped order results");\r
+ AssertHelper.Greater(lst.Count, 0, "Expected some grouped order results");\r
foreach (var result in lst)\r
{\r
Console.WriteLine(" Result: custID=" + result.Key + " sum=" + result.OrderSum);\r
Assert.IsTrue(result.Key != null, "Key must be non-null");\r
- Assert.Greater(result.OrderSum, 0, "OrderSum must be > 0");\r
+ AssertHelper.Greater(result.OrderSum, 0, "OrderSum must be > 0");\r
}\r
//select new { g.Key , SumPerCustomer = g.Sum(o2=>o2.OrderID) };\r
}\r
decimal[] d = new decimal[] { 1, 4, 5, 6, 10248, 10255 };\r
var q = db.OrderDetails.Where(o => d.Contains(o.OrderID));\r
\r
- Assert.Greater(q.Count(), 0);\r
+ AssertHelper.Greater(q.Count(), 0);\r
}\r
\r
\r
\r
\r
var list = query.ToList();\r
- Assert.Greater(list.Count, 0);\r
+ AssertHelper.Greater(list.Count, 0);\r
}\r
\r
#if !DEBUG && SQLITE\r
\r
\r
var list = query.ToList();\r
- Assert.Greater(list.Count, 0);\r
+ AssertHelper.Greater(list.Count, 0);\r
}\r
\r
\r
\r
\r
var list = query.ToList();\r
- Assert.Greater(list.Count, 0);\r
+ AssertHelper.Greater(list.Count, 0);\r
}\r
\r
#if !DEBUG && (SQLITE || MSSQL)\r
\r
\r
var list = query.ToList();\r
- Assert.Greater(list.Count, 0);\r
+ AssertHelper.Greater(list.Count, 0);\r
}\r
\r
#if !DEBUG && SQLITE\r
\r
\r
var list = query.ToList();\r
- Assert.Greater(list.Count, 0);\r
+ AssertHelper.Greater(list.Count, 0);\r
}\r
\r
#if !DEBUG && SQLITE\r
\r
var list = query.ToList();\r
\r
- Assert.Greater(list.Count, 0);\r
+ AssertHelper.Greater(list.Count, 0);\r
}\r
\r
#if !DEBUG && POSTGRES\r
\r
var list = query.ToList();\r
\r
- Assert.Greater(list.Count, 0);\r
+ AssertHelper.Greater(list.Count, 0);\r
}\r
finally\r
{\r
\r
var list = query.ToList();\r
\r
- Assert.Greater(list.Count, 0);\r
+ AssertHelper.Greater(list.Count, 0);\r
}\r
finally\r
{\r
{\r
var db = CreateDB();\r
var customer = db.Customers.First();\r
- Assert.Greater(customer.Orders.Count, 0);\r
+ AssertHelper.Greater(customer.Orders.Count, 0);\r
}\r
\r
#if !DEBUG && (SQLITE || (MSSQL && !L2SQL))\r
var db = CreateDB();\r
var results = (from c in db.Customers select c.Orders).ToList();\r
\r
- Assert.Greater(results.Count, 0);\r
+ AssertHelper.Greater(results.Count, 0);\r
}\r
\r
[Test]\r
var db = CreateDB();\r
var customer = db.Customers.First();\r
\r
- Assert.Greater(customer.Orders.Count, 0, "#1");\r
+ AssertHelper.Greater(customer.Orders.Count, 0, "#1");\r
Assert.IsTrue(customer.Orders.HasLoadedOrAssignedValues, "#2");\r
customer.Orders.SetSource(System.Linq.Enumerable.Empty<Order>());\r
}\r
int ordersCount = (from cust in db.Customers\r
select cust.Orders.Count).First();\r
\r
- Assert.Greater(ordersCount, 0);\r
+ AssertHelper.Greater(ordersCount, 0);\r
\r
var customer2 = db.Customers.First();\r
customer2.Orders.SetSource(System.Linq.Enumerable.Empty<Order>());\r
var c = db.Customers.First();\r
\r
int beforeCount = c.Orders.Count;\r
- Assert.Greater(beforeCount, 0);\r
+ AssertHelper.Greater(beforeCount, 0);\r
c.Orders.Clear();\r
Assert.AreEqual(c.Orders.Count, 0);\r
c.Orders.AddRange(db.Orders);\r
- Assert.Greater(c.Orders.Count, beforeCount);\r
+ AssertHelper.Greater(c.Orders.Count, beforeCount);\r
db.Refresh(RefreshMode.OverwriteCurrentValues, c.Orders);\r
\r
Assert.AreEqual(c.Orders.Count, beforeCount);\r
var c = db.Customers.First();\r
\r
int beforeCount = c.Orders.Count;\r
- Assert.Greater(beforeCount, 0);\r
+ AssertHelper.Greater(beforeCount, 0);\r
c.Orders.Clear();\r
Assert.AreEqual(c.Orders.Count, 0);\r
c.Orders.AddRange(db.Orders);\r
\r
int middleCount = c.Orders.Count;\r
- Assert.Greater(c.Orders.Count, beforeCount);\r
+ AssertHelper.Greater(c.Orders.Count, beforeCount);\r
\r
db.Refresh(RefreshMode.KeepCurrentValues, c.Orders);\r
Assert.AreEqual(c.Orders.Count, middleCount);\r
{\r
var db = CreateDB();\r
var customer = db.Customers.Where(c => c.Orders.Count > 0).First();\r
- Assert.Greater(customer.Orders.Count, 0);\r
+ AssertHelper.Greater(customer.Orders.Count, 0);\r
bool ok;\r
System.ComponentModel.ListChangedEventArgs args = null;\r
customer.Orders.ListChanged += delegate(object sender, System.ComponentModel.ListChangedEventArgs a) \r
foreach (var c in q)\r
{\r
Assert.IsNotNull(c.CustomerID);\r
- Assert.Greater(c.OrderCount, -1);\r
+ AssertHelper.Greater(c.OrderCount, -1);\r
count++;\r
}\r
- Assert.Greater(count, 0);\r
+ AssertHelper.Greater(count, 0);\r
}\r
\r
[Test]\r
foreach (var v in q)\r
{\r
Assert.IsNotNull(v.c.CustomerID);\r
- Assert.Greater(v.OrderCount, -1);\r
+ AssertHelper.Greater(v.OrderCount, -1);\r
count++;\r
}\r
- Assert.Greater(count, 0);\r
+ AssertHelper.Greater(count, 0);\r
}\r
\r
[Test]\r
Assert.IsTrue(c.CustomerID!=null, "Non-null customerID required");\r
count++;\r
}\r
- Assert.Greater(count, 0);\r
+ AssertHelper.Greater(count, 0);\r
}\r
#endif\r
}\r
var customer = new Customer();\r
db.Customers.Attach(customer, originalCustomer);\r
\r
- Assert.Greater(db.Customers.GetModifiedMembers(customer).Count(), 0);\r
+ AssertHelper.Greater(db.Customers.GetModifiedMembers(customer).Count(), 0);\r
}\r
\r
#if !DEBUG && (SQLITE || POSTGRES || (MSSQL && !L2SQL))\r
newProd.QuantityPerUnit = "33 1/2";\r
db.Products.InsertOnSubmit(newProd);\r
db.SubmitChanges();\r
- Assert.Greater(newProd.ProductID, 0, "After insertion, ProductID should be non-zero");\r
+ AssertHelper.Greater(newProd.ProductID, 0, "After insertion, ProductID should be non-zero");\r
//Assert.IsFalse(newProd.IsModified, "After insertion, Product.IsModified should be false");\r
return (int)newProd.ProductID; //this test cab be used from delete tests\r
}\r
public void G2_DeleteTest()\r
{\r
int insertedID = insertProduct_priv();\r
- Assert.Greater(insertedID, 0, "DeleteTest cannot operate if row was not inserted");\r
+ AssertHelper.Greater(insertedID, 0, "DeleteTest cannot operate if row was not inserted");\r
\r
Northwind db = CreateDB();\r
\r
public void G3_DeleteTest()\r
{\r
int insertedID = insertProduct_priv();\r
- Assert.Greater(insertedID, 0, "DeleteTest cannot operate if row was not inserted");\r
+ AssertHelper.Greater(insertedID, 0, "DeleteTest cannot operate if row was not inserted");\r
\r
Northwind db = CreateDB();\r
\r
using NUnit.Framework;
using System;
using System.Data;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Data
{
using NUnit.Framework;
using System;
using System.Data;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Data
{
using NUnit.Framework;
using System;
using System.Data;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Data
{
using NUnit.Framework;\r
using System;\r
using System.Data;\r
-#if !MOBILE\r
-using NUnit.Framework.SyntaxHelpers;\r
-#endif\r
\r
namespace MonoTests.System.Data\r
{\r
using NUnit.Framework;
using System;
using System.Data;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Data
{
+../../test-helpers/NunitHelpers.cs
../../../build/common/Locale.cs
../System.Drawing/gdipEnums.cs
../System.Drawing/gdipFunctions.cs
using System.Drawing.Imaging;\r
using DrawingTestHelper;\r
using System.IO;\r
-#if !MONOTOUCH\r
-using NUnit.Framework.SyntaxHelpers;\r
-#endif\r
\r
namespace Test.Sys.Drawing.GraphicsFixtures {\r
#region GraphicsFixtureProps\r
+../../test-helpers/NunitHelpers.cs
System.Runtime.Remoting.Channels.Tcp/TcpChannelTest.cs
ServerObject.cs
ContextsTest.cs
IpcServerChannel chan = new IpcServerChannel (channelName, portName);
string[] uris = chan.GetUrlsForUri ("server.rem");
Assert.IsNotNull (uris);
- Assert.Greater (uris.Length, 0);
+ AssertHelper.Greater (uris.Length, 0);
bool found = false;
foreach (string s in uris) {
IpcChannel chan = new IpcChannel (props, null, null);
string[] uris = chan.GetUrlsForUri ("server.rem");
Assert.IsNotNull (uris);
- Assert.Greater (uris.Length, 0);
+ AssertHelper.Greater (uris.Length, 0);
bool found = false;
foreach (string s in uris) {
using System.ServiceModel;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Runtime.Serialization
{
using Microsoft.CSharp;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
using QName = System.Xml.XmlQualifiedName;
using Microsoft.CSharp;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
using QName = System.Xml.XmlQualifiedName;
+../../test-helpers/NunitHelpers.cs
NUnitMoonHelper.cs
FeatureBased/Features.Client/AsyncCallTesterProxy.cs
FeatureBased/Features.Client/AsyncPatternServer.cs
using System.ServiceModel.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
using QName = System.Xml.XmlQualifiedName;
using WS = System.Web.Services.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
namespace MonoTests.System.ServiceModel.MetadataTests {
using System.ServiceModel.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
using WS = System.Web.Services.Description;
using System.ServiceModel.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
namespace MonoTests.System.ServiceModel.MetadataTests {
using System.ServiceModel.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
using WS = System.Web.Services.Description;
using System.Text;
using NUnit.Framework;
using NUnit.Framework.Constraints;
-using NUnit.Framework.SyntaxHelpers;
using TextElement = System.ServiceModel.Channels.TextMessageEncodingBindingElement;
using BinaryElement = System.ServiceModel.Channels.BinaryMessageEncodingBindingElement;
+../../test-helpers/NunitHelpers.cs
System.ServiceProcess/ServiceBaseTest.cs
System.ServiceProcess/ServiceControllerTest.cs
System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs
+../../test-helpers/NunitHelpers.cs
TestScheduler.cs
AssertEx.cs
Blocks.cs
Assert.IsTrue (transform.Post (1));
Assert.IsTrue (transform.Post (2));
- Assert.GreaterOrEqual (scheduler.ExecuteAll (), 1);
+ AssertHelper.GreaterOrEqual (scheduler.ExecuteAll (), 1);
Assert.AreEqual (2, Volatile.Read (ref n));
}
Assert.IsTrue (transform.Post (1));
Assert.IsTrue (transform.Post (2));
- Assert.GreaterOrEqual (scheduler.ExecuteAll (), 1);
+ AssertHelper.GreaterOrEqual (scheduler.ExecuteAll (), 1);
Assert.AreEqual (2, Volatile.Read (ref n));
}
Assert.IsFalse (transform.Post (101));
- Assert.GreaterOrEqual (scheduler.ExecuteAll (), 1);
+ AssertHelper.GreaterOrEqual (scheduler.ExecuteAll (), 1);
Assert.IsFalse (transform.Post (102));
var queue = new ConcurrentQueue<Tuple<int, int>> ();
var block = factory (queue);
- Assert.IsEmpty (queue);
+ CollectionAssert.IsEmpty (queue);
for (int i = 0; i < 100; i++)
block.Post (i);
options = new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = 2 };
foreach (var taskIds in GetTaskIdsForExecutionsOptions (options))
- Assert.LessOrEqual (CalculateDegreeOfParallelism (taskIds), 2);
+ AssertHelper.LessOrEqual (CalculateDegreeOfParallelism (taskIds), 2);
options = new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = 4 };
foreach (var taskIds in GetTaskIdsForExecutionsOptions (options))
- Assert.LessOrEqual (CalculateDegreeOfParallelism (taskIds), 4);
+ AssertHelper.LessOrEqual (CalculateDegreeOfParallelism (taskIds), 4);
options = new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = -1 };
foreach (var taskIds in GetTaskIdsForExecutionsOptions (options))
- Assert.LessOrEqual (CalculateDegreeOfParallelism (taskIds), taskIds.Length);
+ AssertHelper.LessOrEqual (CalculateDegreeOfParallelism (taskIds), taskIds.Length);
}
}
{
var options = new ExecutionDataflowBlockOptions ();
foreach (var taskIds in GetTaskIdsForExecutionsOptions (options))
- Assert.GreaterOrEqual (taskIds.Distinct ().Count (), 1);
+ AssertHelper.GreaterOrEqual (taskIds.Distinct ().Count (), 1);
options = new ExecutionDataflowBlockOptions { MaxMessagesPerTask = 1 };
foreach (var taskIds in GetTaskIdsForExecutionsOptions (options))
options = new ExecutionDataflowBlockOptions { MaxMessagesPerTask = 2 };
foreach (var taskIds in GetTaskIdsForExecutionsOptions (options))
- Assert.GreaterOrEqual (taskIds.Distinct ().Count (), taskIds.Length / 2);
+ AssertHelper.GreaterOrEqual (taskIds.Distinct ().Count (), taskIds.Length / 2);
options = new ExecutionDataflowBlockOptions { MaxMessagesPerTask = 4 };
foreach (var taskIds in GetTaskIdsForExecutionsOptions (options))
- Assert.GreaterOrEqual (taskIds.Distinct ().Count (), taskIds.Length / 4);
+ AssertHelper.GreaterOrEqual (taskIds.Distinct ().Count (), taskIds.Length / 4);
}
[Test]
+../../test-helpers/NunitHelpers.cs
../../System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/crc32.cs
../../System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/Header.cs
../../System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/HtmlAttribute.cs
// Custom with UIHint attribute
mc = t.GetColumn ("CustomColumn2");
Assert.IsNotNull (mc.UIHint, "#A2");
- Assert.Greater (mc.UIHint.Length, 0, "#A2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#A2-1");
// Proves that UIHint on the column is not used, just the uiHint argument
AssertExtensions.Throws<InvalidOperationException> (() => {
// Custom with UIHint attribute
mc = t.GetColumn ("CustomColumn4");
Assert.IsNotNull (mc.UIHint, "#A4");
- Assert.Greater (mc.UIHint.Length, 0, "#A4-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#A4-1");
// Proves that UIHint on the column is not used, just the uiHint argument
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#A4-2");
mc = t.GetColumn ("DateTimeColumn2");
Assert.IsNotNull (mc.UIHint, "#B2");
- Assert.Greater (mc.UIHint.Length, 0, "#B2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#B2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "DateTime.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#B2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "DateTime.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#B2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "DateTime.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#B2-5");
mc = t.GetColumn ("DateColumn2");
Assert.IsNotNull (mc.UIHint, "#C2");
- Assert.Greater (mc.UIHint.Length, 0, "#C2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#C2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#C2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#C2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#C2-5");
mc = t.GetColumn ("DateColumn4");
Assert.IsNotNull (mc.UIHint, "#C4");
- Assert.Greater (mc.UIHint.Length, 0, "#C4-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#C4-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#C4-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#C4-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#C4-5");
mc = t.GetColumn ("TimeColumn2");
Assert.IsNotNull (mc.UIHint, "#D2");
- Assert.Greater (mc.UIHint.Length, 0, "#D2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#D2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#D2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#D2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#D2-5");
mc = t.GetColumn ("DurationColumn2");
Assert.IsNotNull (mc.UIHint, "#E2");
- Assert.Greater (mc.UIHint.Length, 0, "#E2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#E2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#E2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#E2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#E2-5");
mc = t.GetColumn ("PhoneNumberColumn2");
Assert.IsNotNull (mc.UIHint, "#F2");
- Assert.Greater (mc.UIHint.Length, 0, "#F2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#F2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#F2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#F2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#F2-5");
mc = t.GetColumn ("CurrencyColumn2");
Assert.IsNotNull (mc.UIHint, "#G2");
- Assert.Greater (mc.UIHint.Length, 0, "#G2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#G2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#G2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#G2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#G2-5");
mc = t.GetColumn ("TextColumn2");
Assert.IsNotNull (mc.UIHint, "#H2");
- Assert.Greater (mc.UIHint.Length, 0, "#H2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#H2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#H2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#H2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#H2-5");
mc = t.GetColumn ("HtmlColumn2");
Assert.IsNotNull (mc.UIHint, "#I2");
- Assert.Greater (mc.UIHint.Length, 0, "#I2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#I2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#I2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#I2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#I2-5");
mc = t.GetColumn ("MultilineTextColumn2");
Assert.IsNotNull (mc.UIHint, "#J2");
- Assert.Greater (mc.UIHint.Length, 0, "#J2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#J2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#J2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#J2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#J2-5");
mc = t.GetColumn ("EmailAddressColumn2");
Assert.IsNotNull (mc.UIHint, "#K2");
- Assert.Greater (mc.UIHint.Length, 0, "#K2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#K2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#K2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#K2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#K2-5");
mc = t.GetColumn ("PasswordColumn2");
Assert.IsNotNull (mc.UIHint, "#L2");
- Assert.Greater (mc.UIHint.Length, 0, "#L2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#L2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#L2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#L2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#L2-5");
mc = t.GetColumn ("UrlColumn2");
Assert.IsNotNull (mc.UIHint, "#M2");
- Assert.Greater (mc.UIHint.Length, 0, "#M2-1");
+ AssertHelper.Greater (mc.UIHint.Length, 0, "#M2-1");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, null), "#M2-3");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, String.Empty), "#M2-4");
Assert.AreEqual (ftf.TemplateFolderVirtualPath + "Text.ascx", ftf.GetFieldTemplateVirtualPath (mc, DataBoundControlMode.ReadOnly, "Boolean.ascx"), "#M2-5");
+../../test-helpers/NunitHelpers.cs
Test/standalone-tests/Consts.cs
Test/standalone-tests/Locations.cs
Test/standalone-tests/OutputCacheProvider.cs
+../../test-helpers/NunitHelpers.cs
../../System.Web.DynamicData/Test/Common/AssertExtensions.cs
mainsoft/MainsoftWebTest/HtmlAgilityPack/AssemblyInfo.cs
mainsoft/MainsoftWebTest/HtmlAgilityPack/crc32.cs
Assert.IsNull (HostingEnvironment.InitializationException, "During:InitializationException");
Assert.IsTrue (HostingEnvironment.IsHosted, "During:IsHosted");
Assert.IsNotNull (HostingEnvironment.ApplicationID, "During:ApplicationID:Null");
- Assert.IsNotEmpty (HostingEnvironment.ApplicationID, "During:ApplicationID:Empty");
+ AssertHelper.IsNotEmpty (HostingEnvironment.ApplicationID, "During:ApplicationID:Empty");
Assert.IsNotNull (HostingEnvironment.ApplicationPhysicalPath, "During:ApplicationPhysicalPath:Null");
- Assert.IsNotEmpty (HostingEnvironment.ApplicationPhysicalPath, "During:ApplicationPhysicalPath:Empty");
+ AssertHelper.IsNotEmpty (HostingEnvironment.ApplicationPhysicalPath, "During:ApplicationPhysicalPath:Empty");
Assert.IsNotNull (HostingEnvironment.ApplicationVirtualPath, "During:ApplicationVirtualPath:Null");
- Assert.IsNotEmpty (HostingEnvironment.ApplicationVirtualPath, "During:ApplicationVirtualPath:Empty");
+ AssertHelper.IsNotEmpty (HostingEnvironment.ApplicationVirtualPath, "During:ApplicationVirtualPath:Empty");
Assert.IsNotNull (HostingEnvironment.SiteName, "During:SiteName:Null");
- Assert.IsNotEmpty (HostingEnvironment.SiteName, "During:SiteName:Empty");
+ AssertHelper.IsNotEmpty (HostingEnvironment.SiteName, "During:SiteName:Empty");
Assert.IsNotNull (HostingEnvironment.Cache, "During:Cache");
Assert.AreEqual (ApplicationShutdownReason.None, HostingEnvironment.ShutdownReason, "During:ShutdownReason");
Assert.IsNotNull (HostingEnvironment.VirtualPathProvider, "During:VirtualPathProvider");
KnownResponseHeader known;
- Assert.LessOrEqual (1, f.KnownResponseHeaders.Count, "#B1");
+ AssertHelper.LessOrEqual (1, f.KnownResponseHeaders.Count, "#B1");
known = (KnownResponseHeader)f.KnownResponseHeaders ["Content-Type"];
Assert.AreEqual (HttpWorkerRequest.HeaderContentType, known.Index, "#B2");
KnownResponseHeader known;
- Assert.LessOrEqual (1, f.KnownResponseHeaders.Count, "#B1");
+ AssertHelper.LessOrEqual (1, f.KnownResponseHeaders.Count, "#B1");
known = (KnownResponseHeader)f.KnownResponseHeaders ["Content-Type"];
Assert.AreEqual (HttpWorkerRequest.HeaderContentType, known.Index, "#B2");
provider.DoAddNode (node, rootNode);
Assert.IsNotNull (provider.CallTrace, "#A1");
- Assert.Greater (provider.CallTrace.Length, 1, "#A1-1");
+ AssertHelper.Greater (provider.CallTrace.Length, 1, "#A1-1");
Assert.AreEqual (provider.CallTrace[0].Name, "BuildSiteMap", "#A1-2");
}
Assert.IsNotNull (provider.RootNode, "#A1");
Assert.AreEqual (provider.RootNode.Provider, provider, "#A2");
Assert.IsNotNull (provider.CallTrace, "#A3");
- Assert.Greater (provider.CallTrace.Length, 1, "#A3-1");
+ AssertHelper.Greater (provider.CallTrace.Length, 1, "#A3-1");
Assert.AreEqual ("BuildSiteMap", provider.CallTrace[0].Name, "#A3-2");
Assert.AreEqual ("get_RootNode", provider.CallTrace[1].Name, "#A3-3");
}
+../../test-helpers/NunitHelpers.cs
../../../build/common/Consts.cs
System.Windows.Forms/ApplicationTest.cs
System.Windows.Forms/AutoCompleteStringCollectionTest.cs
Assert.IsNotNull (returnedNode, "#A1");
object val = returnedNode.GetValue (new ReturnSerializableSubClassITRS ());
- Assert.IsNotInstanceOfType (typeof (serializableSubClass), val, "#A2");
+ AssertHelper.IsNotInstanceOfType (typeof (serializableSubClass), val, "#A2");
Assert.IsInstanceOfType (typeof (serializable), val, "#A3");
}
node = GetNodeFileRefToSerializable ("ser.bbb",true);
object val = node.GetValue (new ReturnSerializableSubClassITRS ());
- Assert.IsNotInstanceOfType (typeof (serializableSubClass), val, "#A1");
+ AssertHelper.IsNotInstanceOfType (typeof (serializableSubClass), val, "#A1");
Assert.IsInstanceOfType (typeof (serializable), val, "#A2");
}
// get value passing no params
object val = returnedNode.GetValue ((ITypeResolutionService) null);
Assert.IsInstanceOfType (typeof (serializable), val, "#A2");
- Assert.IsNotInstanceOfType (typeof (serializableSubClass), val, "#A3");
+ AssertHelper.IsNotInstanceOfType (typeof (serializableSubClass), val, "#A3");
//get value type passing different params
string newType = returnedNode.GetValueTypeName (new ReturnSerializableSubClassITRS ());
object defaultVal = returnedNode.GetValue ((ITypeResolutionService) null);
Assert.IsInstanceOfType (typeof (serializable), defaultVal, "#A2");
- Assert.IsNotInstanceOfType (typeof (serializableSubClass), defaultVal, "#A3");
+ AssertHelper.IsNotInstanceOfType (typeof (serializableSubClass), defaultVal, "#A3");
object newVal = returnedNode.GetValue (new ReturnSerializableSubClassITRS ());
- Assert.IsNotInstanceOfType (typeof (serializableSubClass), newVal, "#A4");
+ AssertHelper.IsNotInstanceOfType (typeof (serializableSubClass), newVal, "#A4");
Assert.IsInstanceOfType (typeof (serializable), newVal, "#A5");
}
// get value passing null params
object val = returnedNode.GetValue ((ITypeResolutionService) null);
- // Assert.IsNotInstanceOfType (typeof (serializable), val, "#A5"); this would fail as subclasses are id-ed as instances of parents
+ // AssertHelper.IsNotInstanceOfType (typeof (serializable), val, "#A5"); this would fail as subclasses are id-ed as instances of parents
Assert.IsInstanceOfType (typeof (serializableSubClass), val, "#A4");
}
object o = node.GetValue ((AssemblyName []) null);
- Assert.IsNotInstanceOfType (typeof (serializableSubClass), o, "#A2");
+ AssertHelper.IsNotInstanceOfType (typeof (serializableSubClass), o, "#A2");
Assert.IsInstanceOfType (typeof (serializable), o, "#A3");
rr.Close ();
}
Assert.IsNotNull (finalNode, "#A3");
object finalVal = finalNode.GetValue ((ITypeResolutionService) null);
- Assert.IsNotInstanceOfType (typeof (serializableSubClass), finalVal, "#A4");
+ AssertHelper.IsNotInstanceOfType (typeof (serializableSubClass), finalVal, "#A4");
Assert.IsInstanceOfType (typeof (serializable), finalVal, "#A5");
}
Assert.AreEqual (31, p.GetRowHeights ()[0], "D1");\r
Assert.AreEqual (31, p.GetRowHeights ()[1], "D2");\r
Assert.AreEqual (81, p.GetColumnWidths ()[0], "D3");\r
- Assert.LessOrEqual (75, p.GetColumnWidths ()[1], "D4");\r
- Assert.GreaterOrEqual (78, p.GetColumnWidths ()[1], "D5");\r
- Assert.LessOrEqual (78, p.GetColumnWidths ()[2], "D6");\r
- Assert.GreaterOrEqual (81, p.GetColumnWidths ()[2], "D7");\r
+ AssertHelper.LessOrEqual (75, p.GetColumnWidths ()[1], "D4");\r
+ AssertHelper.GreaterOrEqual (78, p.GetColumnWidths ()[1], "D5");\r
+ AssertHelper.LessOrEqual (78, p.GetColumnWidths ()[2], "D6");\r
+ AssertHelper.GreaterOrEqual (81, p.GetColumnWidths ()[2], "D7");\r
}\r
\r
[Test]\r
Assert.AreEqual (4, tlp.RowCount, "X18638-1");\r
Assert.AreEqual (3, tlp.ColumnCount, "X18638-2");\r
Assert.AreEqual (60, widths[0], "X18638-3");\r
- Assert.Greater (label2.Width, widths[1], "X18638-5");\r
+ AssertHelper.Greater (label2.Width, widths[1], "X18638-5");\r
Assert.AreEqual (45, widths[2], "X18638-4");\r
}\r
\r
+../../test-helpers/NunitHelpers.cs
System.Xml.Linq/ExtensionsTest.cs
System.Xml.Linq/XAttributeTest.cs
System.Xml.Linq/XCommentTest.cs
}
}
- Assert.GreaterOrEqual (afterNoOfAttributes, beforeNoOfAttributes, "newAttributes");
- Assert.GreaterOrEqual (afterNoOfElements, beforeNoOfElements, "newElements");
+ AssertHelper.GreaterOrEqual (afterNoOfAttributes, beforeNoOfAttributes, "newAttributes");
+ AssertHelper.GreaterOrEqual (afterNoOfElements, beforeNoOfElements, "newElements");
}
/*
+../../test-helpers/NunitHelpers.cs
Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs
Microsoft.CSharp/CodeGeneratorFromExpressionTest.cs
Microsoft.CSharp/CodeGeneratorFromNamespaceTest.cs
int importPosition = result.IndexOf (IMPORT);
int attributePosition = result.IndexOf (ATTRIBUTE);
- Assert.Greater (attributePosition, importPosition, "Actual order: " + result);
+ AssertHelper.Greater (attributePosition, importPosition, "Actual order: " + result);
}
[Test]
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Collections.Generic
{
public void ConstructorNullName ()
{
SourceSwitch s = new SourceSwitch (null);
- Assert.IsEmpty (s.DisplayName);
+ AssertHelper.IsEmpty (s.DisplayName);
}
[Test]
public void NullSwitchHasEmptyDisplayNameAndDescription ()
{
var s = new TestNullSwitch ();
- Assert.IsEmpty (s.DisplayName);
- Assert.IsEmpty (s.Description);
+ AssertHelper.IsEmpty (s.DisplayName);
+ AssertHelper.IsEmpty (s.Description);
}
}
}
+../../test-helpers/NunitHelpers.cs
WebMatrix.Data/ConnectionEventArgsTests.cs
WebMatrix.Data/DynamicRecordTests.cs
../WebMatrix.Data/DynamicRecord.cs
+../../test-helpers/NunitHelpers.cs
System.Collections.ObjectModel/ObservableCollectionTest.cs
System.Collections.ObjectModel/ReadOnlyObservableCollectionTest.cs
System.Collections.Specialized/NotifyCollectionChangedEventArgsTest.cs
using NUnit.Framework;
using Mono;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
-
namespace MonoTests.Mono {
[TestFixture]
using NUnit;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Collections.Concurrent
{
using System.Collections.Concurrent;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Collections.Concurrent
{
using System.Security.AccessControl;
using System.Security.Principal;
using NUnit.Framework;
-using NUnit.Framework.SyntaxHelpers;
namespace MonoTests.System.Security.AccessControl {
using NUnit.Framework;
using NUnit.Framework.Constraints;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
-
namespace MonoTests.System.Text
{
[TestFixture]
using System.Threading.Tasks;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Threading.Tasks
{
using System.Collections.Generic;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Threading.Tasks
{
using System.Threading.Tasks;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Threading.Tasks
{
using System.Collections.Generic;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Threading.Tasks
{
using System.Collections.Generic;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
-
namespace MonoTests.System.Threading.Tasks
{
[TestFixture]
using NUnit;
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
namespace MonoTests.System.Threading
{
using NUnit.Framework;
-#if !MOBILE
-using NUnit.Framework.SyntaxHelpers;
-#endif
-
namespace MonoTests.System
{
[TestFixture]
+../../test-helpers/NunitHelpers.cs
Microsoft.Win32/RegistryKeyTest.cs
Mono/DataConvertTest.cs
../Mono/DataConverter.cs
{
var xml = rootTree.RenderUrl ("T:System.String", generator);
Assert.IsNotNull (xml);
- Assert.IsNotEmpty (xml);
+ AssertHelper.IsNotEmpty (xml);
AssertValidXml (xml);
AssertEcmaFullTypeName (xml, "System.String");
}
{
var xml = rootTree.RenderUrl ("T:System.Int32", generator);
Assert.IsNotNull (xml);
- Assert.IsNotEmpty (xml);
+ AssertHelper.IsNotEmpty (xml);
AssertValidXml (xml);
AssertEcmaFullTypeName (xml, "System.Int32");
}
// HACK: in reality we have currently 4 known issues which are due to duplicated namespaces across
// doc sources, something that was never supported and that we need to improve/fix at some stage
- Assert.LessOrEqual (4, errorCount, errorCount + " / " + testCount.ToString ());
+ AssertHelper.LessOrEqual (4, errorCount, errorCount + " / " + testCount.ToString ());
}
IEnumerable<Node> GetLeaves (Node node)
{
// the docPath variable is the only one we know for sure should exist
Assert.IsNotNull (Config.Get ("docPath"));
- Assert.IsNotEmpty (Config.Get ("docPath"));
+ AssertHelper.IsNotEmpty (Config.Get ("docPath"));
}
}
}
+../../test-helpers/NunitHelpers.cs
Monodoc/HelpSourceTests.cs
Monodoc/EcmaDocTests.cs
Monodoc/TreeTest.cs
--- /dev/null
+using System.IO;
+using System.Collections;
+using NUnit.Framework.Constraints;
+
+namespace NUnit.Framework
+{
+ static class CollectionAssert
+ {
+ public static void DoesNotContain (IEnumerable collection, object val)
+ {
+ Assert.That(collection, Has.No.Member(val));
+ }
+
+ public static void Contains (IEnumerable collection, object val)
+ {
+ Assert.That(collection, Has.Member(val));
+ }
+
+ public static void AreEqual (IEnumerable expected, IEnumerable actual, string message = null, params object[] args)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ }
+
+ public static void AreEquivalent (IEnumerable expected, IEnumerable actual, string message = null, params object[] args)
+ {
+ Assert.That(actual, Is.EquivalentTo(expected), message, args);
+ }
+
+ public static void IsEmpty(IEnumerable collection, string message = null, params object[] args)
+ {
+ Assert.That(collection, new EmptyCollectionConstraint(), message, args);
+ }
+ }
+
+ static class FileAssert
+ {
+ public static void AreEqual(Stream expected, Stream actual, string message, params object[] args)
+ {
+ Assert.That(actual, Is.EqualTo(expected), message, args);
+ }
+
+ public static void AreEqual(string expected, string actual, string message, params object[] args)
+ {
+ using (FileStream exStream = File.OpenRead(expected))
+ using (FileStream acStream = File.OpenRead(actual))
+ {
+ AreEqual(exStream, acStream, message, args);
+ }
+ }
+ }
+
+ static class StringAssert
+ {
+ public static void Contains(string expected, string actual, string message = null, params object[] args)
+ {
+ Assert.That(actual, Is.StringContaining (expected), message, args);
+ }
+
+ public static void StartsWith(string expected, string actual, string message = null, params object[] args)
+ {
+ Assert.IsTrue (actual.StartsWith (expected), message, args);
+ }
+ }
+
+ static class AssertHelper
+ {
+ public static void IsEmpty (string aString, string message = null, params object[] args )
+ {
+ Assert.That(aString, Is.Empty, message, args);
+ }
+
+ public static void IsNotEmpty (string aString, string message = null, params object[] args )
+ {
+ Assert.That(aString, Is.Not.Empty, message, args);
+ }
+
+ public static void Greater(int arg1, int arg2, string message = null, params object[] args)
+ {
+ Assert.That(arg1, Is.GreaterThan(arg2), message, args);
+ }
+
+ public static void GreaterOrEqual(int arg1, int arg2, string message = null, params object[] args)
+ {
+ Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
+ }
+
+ public static void GreaterOrEqual(long arg1, long arg2, string message = null, params object[] args)
+ {
+ Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args);
+ }
+
+ public static void LessOrEqual (int arg1, int arg2, string message = null, params object[] args)
+ {
+ Assert.That(arg1, Is.LessThanOrEqualTo(arg2), message, args);
+ }
+
+ public static void IsNotInstanceOfType(System.Type expected, object actual, string message, params object[] args )
+ {
+ Assert.IsFalse (actual.GetType ().IsInstanceOfType (expected), message, args);
+ }
+ }
+}