* Removed AllTests.cs, System.Data/AllTests.cs,
authorMartin Willemoes Hansen <mwh@mono-cvs.ximian.com>
Mon, 17 Mar 2003 16:31:53 +0000 (16:31 -0000)
committerMartin Willemoes Hansen <mwh@mono-cvs.ximian.com>
Mon, 17 Mar 2003 16:31:53 +0000 (16:31 -0000)
          System.Data.SqlTypes/AllTests.cs,
          System.Xml/AllTests.cs,
          TheTests.cs
        * NUnit2ified makefile.gnu, data_linux_test.args
          System.Data/DataColumnCollectionTest.cs,
          System.Data/DataSetTest.cs,
          System.Data/DataColumnTest.cs,
          System.Data/DataTableTest.cs,
          System.Data/UniqueConstraintTest.cs,
          System.Data/ConstraintCollectionTest.cs,
          System.Data/DataRelationTest.cs,
          System.Data/ForeignKeyConstraintTest.cs,
          System.Data/ConstraintTest.cs,
          System.Data/DataRowCollectionTest.cs,
          System.Data/DataRowTest.cs,
          System.Data.SqlTypes/SqlBinaryTest.cs,
          System.Data.SqlTypes/SqlDateTimeTest.cs,
          System.Data.SqlTypes/SqlGuidTest.cs,
          System.Data.SqlTypes/SqlInt64Test.cs,
          System.Data.SqlTypes/SqlStringTest.cs,
          System.Data.SqlTypes/SqlBooleanTest.cs,
          System.Data.SqlTypes/SqlDecimalTest.cs,
          System.Data.SqlTypes/SqlInt16Test.cs,
          System.Data.SqlTypes/SqlMoneyTest.cs,
          System.Data.SqlTypes/SqlByteTest.cs,
          System.Data.SqlTypes/SqlDoubleTest.cs,
          System.Data.SqlTypes/SqlInt32Test.cs,
          System.Data.SqlTypes/SqlSingleTest.cs
          System.Xml/XmlDataDocumentTest.cs

svn path=/trunk/mcs/; revision=12623

33 files changed:
mcs/class/System.Data/Test/AllTests.cs [deleted file]
mcs/class/System.Data/Test/ChangeLog
mcs/class/System.Data/Test/System.Data.SqlTypes/AllTests.cs [deleted file]
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBinaryTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBooleanTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDateTimeTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDecimalTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDoubleTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlGuidTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt32Test.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlMoneyTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlSingleTest.cs
mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs
mcs/class/System.Data/Test/System.Data/AllTests.cs [deleted file]
mcs/class/System.Data/Test/System.Data/ConstraintCollectionTest.cs
mcs/class/System.Data/Test/System.Data/ConstraintTest.cs
mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest.cs
mcs/class/System.Data/Test/System.Data/DataColumnTest.cs
mcs/class/System.Data/Test/System.Data/DataRelationTest.cs
mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs
mcs/class/System.Data/Test/System.Data/DataRowTest.cs
mcs/class/System.Data/Test/System.Data/DataSetTest.cs
mcs/class/System.Data/Test/System.Data/DataTableTest.cs
mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest.cs
mcs/class/System.Data/Test/System.Data/UniqueConstraintTest.cs
mcs/class/System.Data/Test/System.Xml/AllTests.cs [deleted file]
mcs/class/System.Data/Test/System.Xml/XmlDataDocumentTest.cs
mcs/class/System.Data/Test/TheTests.cs [deleted file]
mcs/class/System.Data/Test/data_linux_test.args
mcs/class/System.Data/Test/makefile.gnu

diff --git a/mcs/class/System.Data/Test/AllTests.cs b/mcs/class/System.Data/Test/AllTests.cs
deleted file mode 100644 (file)
index 772d94b..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Author: Tim Coleman (tim@timcoleman.com)
-// Copyright 2002 Tim Coleman
-
-using System;
-using System.Data;
-using System.Data.SqlTypes;
-using NUnit.Framework;
-
-namespace MonoTests {
-       public class AllTests : TestCase {
-               public AllTests (string name) : base (name) {}
-
-               public static ITest Suite {
-                       get {
-                               TestSuite suite = new TestSuite ();
-                               suite.AddTest (System.Data.SqlTypes.AllTests.Suite);
-                               suite.AddTest (System.Data.Xml.AllTests.Suite);
-                               return suite;
-                       }
-               }
-       }
-}
index 8b7090965fbe15f00b937499b3e7c65b596e7dca..824ac504b8a8bf76a8bbb7006a31ef1b4249a7a5 100644 (file)
@@ -1,3 +1,35 @@
+2003-03-17  Martin Willemoes Hansen <mwh@sysrq.dk>
+       * Removed AllTests.cs, System.Data/AllTests.cs,
+         System.Data.SqlTypes/AllTests.cs,
+         System.Xml/AllTests.cs,
+         TheTests.cs
+       * NUnit2ified makefile.gnu, data_linux_test.args
+         System.Data/DataColumnCollectionTest.cs, 
+         System.Data/DataSetTest.cs,
+          System.Data/DataColumnTest.cs,
+          System.Data/DataTableTest.cs,
+          System.Data/UniqueConstraintTest.cs,
+         System.Data/ConstraintCollectionTest.cs,
+         System.Data/DataRelationTest.cs,
+         System.Data/ForeignKeyConstraintTest.cs,
+         System.Data/ConstraintTest.cs,
+          System.Data/DataRowCollectionTest.cs,
+         System.Data/DataRowTest.cs,
+         System.Data.SqlTypes/SqlBinaryTest.cs,
+         System.Data.SqlTypes/SqlDateTimeTest.cs,
+         System.Data.SqlTypes/SqlGuidTest.cs,
+         System.Data.SqlTypes/SqlInt64Test.cs,
+         System.Data.SqlTypes/SqlStringTest.cs,
+         System.Data.SqlTypes/SqlBooleanTest.cs,
+         System.Data.SqlTypes/SqlDecimalTest.cs,
+         System.Data.SqlTypes/SqlInt16Test.cs,
+         System.Data.SqlTypes/SqlMoneyTest.cs,
+         System.Data.SqlTypes/SqlByteTest.cs,
+         System.Data.SqlTypes/SqlDoubleTest.cs,
+         System.Data.SqlTypes/SqlInt32Test.cs,
+         System.Data.SqlTypes/SqlSingleTest.cs
+         System.Xml/XmlDataDocumentTest.cs
+
 2003-02-16  Daniel Morgan <danmorg@sc.rr.com>
 
        * TestSqlConnection.cs: added test file
diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/AllTests.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/AllTests.cs
deleted file mode 100644 (file)
index 938ae3f..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Author:
-//   Tim Coleman (tim@timcoleman.com)
-//
-// (C) Copyright 2002 Tim Coleman
-//
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data.SqlTypes
-{
-       /// <summary>
-       ///   Combines all unit tests for the System.Data.dll assembly
-       ///   into one test suite.
-       /// </summary>
-       public class AllTests : TestCase
-       {
-               public AllTests (string name) : base (name) {}
-
-               public static ITest Suite {
-                       get {
-                               TestSuite suite =  new TestSuite ();
-                               suite.AddTest (new TestSuite (typeof (SqlBinaryTest)));
-                                                               suite.AddTest (new TestSuite (typeof (SqlBooleanTest)));
-                               suite.AddTest (new TestSuite (typeof (SqlByteTest)));
-                               suite.AddTest (new TestSuite (typeof (SqlDoubleTest)));
-                               suite.AddTest (new TestSuite (typeof (SqlInt16Test)));
-                               suite.AddTest (new TestSuite (typeof (SqlInt32Test)));
-                               suite.AddTest (new TestSuite (typeof (SqlInt64Test)));
-                               suite.AddTest (new TestSuite (typeof (SqlSingleTest)));
-                               suite.AddTest (new TestSuite (typeof (SqlMoneyTest)));
-                               suite.AddTest (new TestSuite (typeof (SqlDateTimeTest)));
-                               suite.AddTest (new TestSuite (typeof (SqlGuidTest)));
-                               suite.AddTest (new TestSuite (typeof (SqlDecimalTest)));
-                               suite.AddTest (new TestSuite (typeof (SqlStringTest)));
-                               return suite;
-                       }
-               }
-       }
-}
index 605db9c8f4611d37aad483670aa7f82ba75fd0ae..9167ad9e972c94c2631decbf418247ea4bb4fad9 100644 (file)
@@ -1,9 +1,12 @@
 //
 // SqlBinaryTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlBinary
 //
-// Ville Palo (vi64pa@koti.soon.fi)
+// Authors:
+//   Ville Palo (vi64pa@koti.soon.fi)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
-// (C) Ville Palo 2002
+// (C) 2002 Ville Palo
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -12,18 +15,15 @@ using System.Data.SqlTypes;
 
 namespace MonoTests.System.Data.SqlTypes
 {
-        public class SqlBinaryTest : TestCase {
+       [TestFixture]
+        public class SqlBinaryTest {
        
                SqlBinary Test1;
                SqlBinary Test2;
                SqlBinary Test3;
 
-               public SqlBinaryTest() : base ("System.Data.SqlTypes.SqlBinary") {}
-               public SqlBinaryTest(string name) : base(name) {}
-
-               protected override void TearDown() {}
-
-               protected override void SetUp() 
+               [SetUp]
+               public void GetReady() 
                {
                         byte [] b1 = new Byte [2];
                         byte [] b2 = new Byte [3];
@@ -42,28 +42,25 @@ namespace MonoTests.System.Data.SqlTypes
                        Test3 = new SqlBinary(b3);
                }
 
-               public static ITest Suite {
-                       get {
-                               return new TestSuite(typeof(SqlBinary));
-                       }
-               }
-
                // Test constructor
-               public void TestCreate()
+               [Test]
+               public void Create()
                {
                        byte [] b = new byte [3];                        
                        SqlBinary Test = new SqlBinary (b);
-                        Assert ("#A01", !(Test.IsNull)); 
+                        Assertion.Assert ("#A01", !(Test.IsNull)); 
                }
 
                // Test public fields
-               public void TestPublicFields()
+               [Test]
+               public void PublicFields()
                {
-                       Assert ("#B01", SqlBinary.Null.IsNull);
+                       Assertion.Assert ("#B01", SqlBinary.Null.IsNull);
                }
 
                // Test properties
-               public void TestProperties()
+               [Test]
+               public void Properties()
                {
                        byte [] b = new byte [2];
                        b [0] = 64;
@@ -72,186 +69,194 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlBinary TestBinary = new SqlBinary (b);
 
                        // IsNull
-                       Assert ("#C01", SqlBinary.Null.IsNull);
+                       Assertion.Assert ("#C01", SqlBinary.Null.IsNull);
 
                        // Item
-                        AssertEquals ("#C02", (byte)128, TestBinary [1]);
-                        AssertEquals ("#C03", (byte)64, TestBinary [0]);
+                        Assertion.AssertEquals ("#C02", (byte)128, TestBinary [1]);
+                        Assertion.AssertEquals ("#C03", (byte)64, TestBinary [0]);
 
                         // FIXME: MSDN says that should throw SqlNullValueException
                         // but throws IndexOutOfRangeException
                         try {
                                 byte test = TestBinary [TestBinary.Length];
-                               Fail ("#C04");
+                               Assertion.Fail ("#C04");
                        } catch (Exception e) {
-                               AssertEquals ("#C05", typeof (SqlNullValueException),
+                               Assertion.AssertEquals ("#C05", typeof (SqlNullValueException),
                                            e.GetType ());
                        }
                  
                        try {
                                byte test = SqlBinary.Null [2];
-                               Fail ("#C06");
+                               Assertion.Fail ("#C06");
                        } catch (Exception e) {
-                               AssertEquals ("#C07", typeof (SqlNullValueException),
+                               Assertion.AssertEquals ("#C07", typeof (SqlNullValueException),
                                            e.GetType ());
                        }
 
                        // Length
-                        AssertEquals ("#C08", 2, TestBinary.Length);    
+                        Assertion.AssertEquals ("#C08", 2, TestBinary.Length);    
 
                        try {
                                int test = SqlBinary.Null.Length;
-                               Fail ("#C09");
+                               Assertion.Fail ("#C09");
                        } catch (Exception e) {
-                               AssertEquals ("#C10", typeof (SqlNullValueException),
+                               Assertion.AssertEquals ("#C10", typeof (SqlNullValueException),
                                            e.GetType ());
                        }
 
                        // Value
-                        AssertEquals ("#C11", (byte)128, TestBinary [1]);
-                        AssertEquals ("#C12", (byte)64, TestBinary [0]);               
+                        Assertion.AssertEquals ("#C11", (byte)128, TestBinary [1]);
+                        Assertion.AssertEquals ("#C12", (byte)64, TestBinary [0]);               
 
                        try {
                                 Byte [] test = SqlBinary.Null.Value;
-                               Fail ("#C13");
+                               Assertion.Fail ("#C13");
                        } catch (Exception e) {
-                               AssertEquals ("#C14", typeof (SqlNullValueException),
+                               Assertion.AssertEquals ("#C14", typeof (SqlNullValueException),
                                            e.GetType ());
                        }
                }
 
                // Methods 
-
-               public void TestComparisonMethods()
+               [Test]
+               public void ComparisonMethods()
                {
                        // GreaterThan
-                       Assert ("#D01", SqlBinary.GreaterThan (Test1, Test2).Value);
-                        Assert ("#D02", SqlBinary.GreaterThan (Test3, Test2).Value);
-                       Assert ("#D03", !SqlBinary.GreaterThan (Test2, Test1).Value);
+                       Assertion.Assert ("#D01", SqlBinary.GreaterThan (Test1, Test2).Value);
+                        Assertion.Assert ("#D02", SqlBinary.GreaterThan (Test3, Test2).Value);
+                       Assertion.Assert ("#D03", !SqlBinary.GreaterThan (Test2, Test1).Value);
                        
                        // GreaterThanOrEqual
-                       Assert ("#D04", SqlBinary.GreaterThanOrEqual (Test1, Test2).Value);
-                        Assert ("#D05", SqlBinary.GreaterThanOrEqual (Test1, Test2).Value);
-                       Assert ("#D06", !SqlBinary.GreaterThanOrEqual (Test2, Test1).Value);
+                       Assertion.Assert ("#D04", SqlBinary.GreaterThanOrEqual (Test1, Test2).Value);
+                        Assertion.Assert ("#D05", SqlBinary.GreaterThanOrEqual (Test1, Test2).Value);
+                       Assertion.Assert ("#D06", !SqlBinary.GreaterThanOrEqual (Test2, Test1).Value);
 
                        // LessThan
-                       Assert ("#D07", !SqlBinary.LessThan (Test1, Test2).Value);
-                       Assert ("#D08", !SqlBinary.LessThan (Test3, Test2).Value);
-                       Assert ("#D09", SqlBinary.LessThan (Test2, Test1).Value);
+                       Assertion.Assert ("#D07", !SqlBinary.LessThan (Test1, Test2).Value);
+                       Assertion.Assert ("#D08", !SqlBinary.LessThan (Test3, Test2).Value);
+                       Assertion.Assert ("#D09", SqlBinary.LessThan (Test2, Test1).Value);
 
                        // LessThanOrEqual
-                       Assert ("#D10", !SqlBinary.LessThanOrEqual (Test1, Test2).Value);
-                        Assert ("#D11", SqlBinary.LessThanOrEqual (Test3, Test1).Value);
-                        Assert ("#D12", SqlBinary.LessThanOrEqual (Test2, Test1).Value);
+                       Assertion.Assert ("#D10", !SqlBinary.LessThanOrEqual (Test1, Test2).Value);
+                        Assertion.Assert ("#D11", SqlBinary.LessThanOrEqual (Test3, Test1).Value);
+                        Assertion.Assert ("#D12", SqlBinary.LessThanOrEqual (Test2, Test1).Value);
 
                        // Equals
-                        Assert ("#D13", !Test1.Equals (Test2));
-                        Assert ("#D14", !Test3.Equals (Test2));
-                        Assert ("#D15", Test3.Equals (Test1));
+                        Assertion.Assert ("#D13", !Test1.Equals (Test2));
+                        Assertion.Assert ("#D14", !Test3.Equals (Test2));
+                        Assertion.Assert ("#D15", Test3.Equals (Test1));
 
                        // NotEquals
-                       Assert ("#D16", SqlBinary.NotEquals (Test1, Test2).Value);
-                        Assert ("#D17", !SqlBinary.NotEquals (Test3, Test1).Value);
-                       Assert ("#D18", SqlBinary.NotEquals (Test2, Test1).Value);
+                       Assertion.Assert ("#D16", SqlBinary.NotEquals (Test1, Test2).Value);
+                        Assertion.Assert ("#D17", !SqlBinary.NotEquals (Test3, Test1).Value);
+                       Assertion.Assert ("#D18", SqlBinary.NotEquals (Test2, Test1).Value);
                }
 
-
-               public void TestCompareTo()
+               [Test]
+               public void CompareTo()
                {
                         SqlString TestString = new SqlString ("This is a test");
                        
-                        Assert ("#E01", Test1.CompareTo(Test2) > 0);
-                        Assert ("#E02", Test2.CompareTo(Test1) < 0);
-                        Assert ("#E03", Test1.CompareTo(Test3) == 0);
+                        Assertion.Assert ("#E01", Test1.CompareTo(Test2) > 0);
+                        Assertion.Assert ("#E02", Test2.CompareTo(Test1) < 0);
+                        Assertion.Assert ("#E03", Test1.CompareTo(Test3) == 0);
                        
                        try {
                                 Test1.CompareTo (TestString);
-                                Fail ("#E04");
+                                Assertion.Fail ("#E04");
                        } catch(Exception e) {
-                                AssertEquals ("#E05", typeof (ArgumentException), e.GetType ());
+                                Assertion.AssertEquals ("#E05", typeof (ArgumentException), e.GetType ());
                        }                       
                }
 
-               public void TestGetHashCode()
+               [Test]
+               public void GetHashCodeTest()
                {
-                       AssertEquals ("#F01", Test1.GetHashCode (), Test1.GetHashCode ());
-                       Assert ("#F02", Test2.GetHashCode () !=  Test1.GetHashCode ());
+                       Assertion.AssertEquals ("#F01", Test1.GetHashCode (), Test1.GetHashCode ());
+                       Assertion.Assert ("#F02", Test2.GetHashCode () !=  Test1.GetHashCode ());
                }
 
-               public void TestGetType()
+               [Test]
+               public void GetTypeTest()
                {
-                       AssertEquals("#G01", "System.Data.SqlTypes.SqlBinary", 
+                       Assertion.AssertEquals("#G01", "System.Data.SqlTypes.SqlBinary", 
                                     Test1.GetType().ToString());                       
                }
 
-               public void TestConcat()
+               [Test]
+               public void Concat()
                {                       
                        SqlBinary TestBinary;
 
                        TestBinary = SqlBinary.Concat (Test2, Test3);
-                        AssertEquals ("H01", (byte)15, TestBinary [4]);
+                        Assertion.AssertEquals ("H01", (byte)15, TestBinary [4]);
 
                        TestBinary = SqlBinary.Concat (Test1, Test2);
-                        AssertEquals ("#H02", (byte)240, TestBinary [0]);
-                        AssertEquals ("#H03", (byte)15, TestBinary [1]);
+                        Assertion.AssertEquals ("#H02", (byte)240, TestBinary [0]);
+                        Assertion.AssertEquals ("#H03", (byte)15, TestBinary [1]);
                }
 
-               public void TestToSqlGuid()
+               [Test]
+               public void ToSqlGuid()
                {
                         SqlBinary TestBinary = new SqlBinary (new byte [16]);
                         SqlGuid TestGuid = TestBinary.ToSqlGuid ();
-                        Assert ("#I01", !TestGuid.IsNull);
+                        Assertion.Assert ("#I01", !TestGuid.IsNull);
                }
 
-               public void TestToString()
+               [Test]
+               public void ToStringTest()
                {
-                        AssertEquals ("#J01", "SqlBinary(3)", Test2.ToString ());
-                        AssertEquals ("#J02", "SqlBinary(2)", Test1.ToString ());              
+                        Assertion.AssertEquals ("#J01", "SqlBinary(3)", Test2.ToString ());
+                        Assertion.AssertEquals ("#J02", "SqlBinary(2)", Test1.ToString ());              
                }
 
                // OPERATORS
-
-               public void TestAdditionOperator()
+               [Test]
+               public void AdditionOperator()
                {
                        SqlBinary TestBinary = Test1 + Test2;
-                        AssertEquals ("#K01", (byte)240, TestBinary [0]);
-                        AssertEquals ("#K02", (byte)15, TestBinary [1]);
+                        Assertion.AssertEquals ("#K01", (byte)240, TestBinary [0]);
+                        Assertion.AssertEquals ("#K02", (byte)15, TestBinary [1]);
                }
 
-               public void TestComparisonOperators()
+               [Test]
+               public void ComparisonOperators()
                {
                        // Equality
-                        Assert ("#L01", !(Test1 == Test2).Value);
-                        Assert ("#L02", (Test3 == Test1).Value);
+                        Assertion.Assert ("#L01", !(Test1 == Test2).Value);
+                        Assertion.Assert ("#L02", (Test3 == Test1).Value);
 
                        // Greater than
-                        Assert ("#L03", (Test1 > Test2).Value);
-                        Assert ("#L04", !(Test3 > Test1).Value);
+                        Assertion.Assert ("#L03", (Test1 > Test2).Value);
+                        Assertion.Assert ("#L04", !(Test3 > Test1).Value);
 
                        // Greater than or equal
-                        Assert ("#L05", (Test1 >= Test2).Value);
-                        Assert ("#L06", (Test3 >= Test2).Value);
+                        Assertion.Assert ("#L05", (Test1 >= Test2).Value);
+                        Assertion.Assert ("#L06", (Test3 >= Test2).Value);
 
                        // Inequality
-                        Assert ("#L07", (Test1 != Test2).Value);
-                        Assert ("#L08", !(Test3 != Test1).Value);
+                        Assertion.Assert ("#L07", (Test1 != Test2).Value);
+                        Assertion.Assert ("#L08", !(Test3 != Test1).Value);
 
                        // Less than
-                        Assert ("#L09", !(Test1 < Test2).Value);
-                        Assert ("#L10", !(Test3 < Test2).Value);
+                        Assertion.Assert ("#L09", !(Test1 < Test2).Value);
+                        Assertion.Assert ("#L10", !(Test3 < Test2).Value);
 
                        // Less than or equal
-                        Assert ("#L11", !(Test1 <= Test2).Value);
-                        Assert ("#L12", (Test3 <= Test1).Value);
+                        Assertion.Assert ("#L11", !(Test1 <= Test2).Value);
+                        Assertion.Assert ("#L12", (Test3 <= Test1).Value);
                }
 
-               public void TestSqlBinaryToByteArray() 
+               [Test]
+               public void SqlBinaryToByteArray() 
                {
                        byte [] TestByteArray = (Byte[])Test1;
-                       AssertEquals ("#M01", (byte)240, TestByteArray[0]);                     
+                       Assertion.AssertEquals ("#M01", (byte)240, TestByteArray[0]);                   
                }
 
-               public void TestSqlGuidToSqlBinary()
+               [Test]
+               public void SqlGuidToSqlBinary()
                {
                         byte [] TestByteArray = new Byte [16];
                        TestByteArray [0] = 15;
@@ -259,16 +264,17 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlGuid TestGuid = new SqlGuid (TestByteArray);
                        
                        SqlBinary TestBinary = (SqlBinary)TestGuid;
-                        AssertEquals ("#N01", (byte)15, TestBinary [0]);
+                        Assertion.AssertEquals ("#N01", (byte)15, TestBinary [0]);
                }
 
-               public void TestByteArrayToSqlBinary()
+               [Test]
+               public void ByteArrayToSqlBinary()
                {
                         byte [] TestByteArray = new Byte [2];
                        TestByteArray [0] = 15;
                        TestByteArray [1] = 200;
                        SqlBinary TestBinary = (SqlBinary)TestByteArray;
-                        AssertEquals ("#O1", (byte)15, TestBinary [0]);
+                        Assertion.AssertEquals ("#O1", (byte)15, TestBinary [0]);
                }
        }
 }
index f209e19b7833daa9c761a4c7fc1e28b5d4a744fc..e724c3ee10bb63f3284bcd8bad1a7a053e5c522f 100644 (file)
@@ -1,6 +1,8 @@
 // SqlDataTimeTest.cs - NUnit Test Cases for [explain here]
 //
-// Ville Palo (vi64pa@users.sourceforge.net)
+// Authors:
+//   Ville Palo (vi64pa@users.sourceforge.net)
+//   Martin Willemoes Hansen
 //
 // (C) Ville Palo
 // 
@@ -11,903 +13,945 @@ using System.Data.SqlTypes;
 
 namespace MonoTests.System.Data.SqlTypes
 {
-  public class SqlBooleanTest : TestCase {
 
-    private SqlBoolean SqlTrue;
-    private SqlBoolean SqlFalse;
+       [TestFixture]
+        public class SqlBooleanTest {
+               private SqlBoolean SqlTrue;
+               private SqlBoolean SqlFalse;
 
-    public SqlBooleanTest() : base ("System.Data.SqlTypes.SqlBoolean") {}
-    public SqlBooleanTest(string name) : base(name) {}
+               [SetUp]
+               public void GetReady() {
+                       SqlTrue = new SqlBoolean(true);
+                       SqlFalse = new SqlBoolean(false);
 
-    protected override void TearDown() {}
+               }
 
-    protected override void SetUp() {
-      SqlTrue = new SqlBoolean(true);
-      SqlFalse = new SqlBoolean(false);
+               [Test]
+               public void Create ()
+                       {
+                               SqlBoolean SqlTrue2 = new SqlBoolean(1);
+                               SqlBoolean SqlFalse2 = new SqlBoolean(0);
 
-    }
+                               Assertion.Assert("Creation of SqlBoolean failed", SqlTrue.Value);
+                               Assertion.Assert("Creation of SqlBoolean failed", SqlTrue2.Value);
+                               Assertion.Assert("Creation of SqlBoolean failed", !SqlFalse.Value);
+                               Assertion.Assert("Creation of SqlBoolean failed", !SqlFalse2.Value);
 
-    public static ITest Suite {
-      get {
-         return new TestSuite(typeof(SqlBoolean));
-      }
-    }
+                       }
 
-    public void TestCreate ()
-    {
-      SqlBoolean SqlTrue2 = new SqlBoolean(1);
-      SqlBoolean SqlFalse2 = new SqlBoolean(0);
+               ////
+               // PUBLIC STATIC METHODS
+               //
 
-      Assert("Creation of SqlBoolean failed", SqlTrue.Value);
-      Assert("Creation of SqlBoolean failed", SqlTrue2.Value);
-      Assert("Creation of SqlBoolean failed", !SqlFalse.Value);
-      Assert("Creation of SqlBoolean failed", !SqlFalse2.Value);
+               // And
+               [Test]
+               public void And() {
 
-    }
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-    ////
-    // PUBLIC STATIC METHODS
-    //
+                       // One result value
+                       SqlBoolean sqlResult;
 
-    // And
-    public void TestAnd() {
+                       // true && false
+                       sqlResult = SqlBoolean.And(SqlTrue, SqlFalse);
+                       Assertion.Assert("And method does not work correctly (true && false)", !sqlResult.Value);
+                       sqlResult = SqlBoolean.And(SqlFalse, SqlTrue);
+                       Assertion.Assert("And method does not work correctly (false && true)", !sqlResult.Value);
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+                       // true && true
+                       sqlResult = SqlBoolean.And(SqlTrue, SqlTrue2);
+                       Assertion.Assert("And method does not work correctly (true && true)", sqlResult.Value);
 
-      // One result value
-      SqlBoolean sqlResult;
+                       sqlResult = SqlBoolean.And(SqlTrue, SqlTrue);
+                       Assertion.Assert("And method does not work correctly (true && true2)", sqlResult.Value);
 
-      // true && false
-      sqlResult = SqlBoolean.And(SqlTrue, SqlFalse);
-      Assert("And method does not work correctly (true && false)", !sqlResult.Value);
-      sqlResult = SqlBoolean.And(SqlFalse, SqlTrue);
-      Assert("And method does not work correctly (false && true)", !sqlResult.Value);
+                       // false && false
+                       sqlResult = SqlBoolean.And(SqlFalse, SqlFalse2);
+                       Assertion.Assert("And method does not work correctly (false && false)", !sqlResult.Value);
+                       sqlResult = SqlBoolean.And(SqlFalse, SqlFalse);
+                       Assertion.Assert("And method does not work correctly (false && false2)", !sqlResult.Value);
 
-      // true && true
-      sqlResult = SqlBoolean.And(SqlTrue, SqlTrue2);
-      Assert("And method does not work correctly (true && true)", sqlResult.Value);
+               }
 
-      sqlResult = SqlBoolean.And(SqlTrue, SqlTrue);
-      Assert("And method does not work correctly (true && true2)", sqlResult.Value);
+               // NotEquals
+               [Test]
+               public void NotEquals() {
 
-      // false && false
-      sqlResult = SqlBoolean.And(SqlFalse, SqlFalse2);
-      Assert("And method does not work correctly (false && false)", !sqlResult.Value);
-      sqlResult = SqlBoolean.And(SqlFalse, SqlFalse);
-      Assert("And method does not work correctly (false && false2)", !sqlResult.Value);
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-    }
+                       SqlBoolean SqlResult;
 
-    // NotEquals
-    public void TestNotEquals() {
+                       // true != false
+                       SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlFalse);
+                       Assertion.Assert("NotEquals method does not work correctly (true != false)", SqlResult.Value);
+                       SqlResult = SqlBoolean.NotEquals(SqlFalse, SqlTrue);
+                       Assertion.Assert("NotEquals method does not work correctly (false != true)", SqlResult.Value);
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-      SqlBoolean SqlResult;
+                       // true != true
+                       SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlTrue);
+                       Assertion.Assert("NotEquals method does not work correctly (true != true)", !SqlResult.Value);
+                       SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlTrue2);
+                       Assertion.Assert("NotEquals method does not work correctly (true != true2)", !SqlResult.Value);
+                       // false != false
+                       SqlResult = SqlBoolean.NotEquals(SqlFalse, SqlFalse);
+                       Assertion.Assert("NotEquals method does not work correctly (false != false)", !SqlResult.Value);
+                       SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlTrue2);
+                       Assertion.Assert("NotEquals method does not work correctly (false != false2)", !SqlResult.Value);
 
-      // true != false
-      SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlFalse);
-      Assert("NotEquals method does not work correctly (true != false)", SqlResult.Value);
-      SqlResult = SqlBoolean.NotEquals(SqlFalse, SqlTrue);
-      Assert("NotEquals method does not work correctly (false != true)", SqlResult.Value);
+                       // If either instance of SqlBoolean is null, the Value of the SqlBoolean will be Null.
+                       SqlResult = SqlBoolean.NotEquals(SqlBoolean.Null, SqlFalse);
+                       Assertion.Assert("NotEquals method does not work correctly (Null != false)", SqlResult.IsNull);
+                       SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlBoolean.Null);
+                       Assertion.Assert("NotEquals method does not work correctly (false != Null)", SqlResult.IsNull);
 
+               }
 
-      // true != true
-      SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlTrue);
-      Assert("NotEquals method does not work correctly (true != true)", !SqlResult.Value);
-      SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlTrue2);
-      Assert("NotEquals method does not work correctly (true != true2)", !SqlResult.Value);
-                 // false != false
-      SqlResult = SqlBoolean.NotEquals(SqlFalse, SqlFalse);
-      Assert("NotEquals method does not work correctly (false != false)", !SqlResult.Value);
-      SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlTrue2);
-      Assert("NotEquals method does not work correctly (false != false2)", !SqlResult.Value);
+               // OnesComplement
+               [Test]
+               public void OnesComplement() {
 
-      // If either instance of SqlBoolean is null, the Value of the SqlBoolean will be Null.
-      SqlResult = SqlBoolean.NotEquals(SqlBoolean.Null, SqlFalse);
-      Assert("NotEquals method does not work correctly (Null != false)", SqlResult.IsNull);
-      SqlResult = SqlBoolean.NotEquals(SqlTrue, SqlBoolean.Null);
-      Assert("NotEquals method does not work correctly (false != Null)", SqlResult.IsNull);
+                       SqlBoolean SqlFalse2 = SqlBoolean.OnesComplement(SqlTrue);
+                       Assertion.Assert("OnesComplement method does not work correctly", !SqlFalse2.Value);
 
-    }
+                       SqlBoolean SqlTrue2 = SqlBoolean.OnesComplement(SqlFalse);
+                       Assertion.Assert("OnesComplement method does not work correctly", SqlTrue2.Value);
 
-    // OnesComplement
-    public void TestOnesComplement() {
+               }
 
-      SqlBoolean SqlFalse2 = SqlBoolean.OnesComplement(SqlTrue);
-      Assert("OnesComplement method does not work correctly", !SqlFalse2.Value);
+               // Or
+               [Test]
+               public void Or() {
 
-      SqlBoolean SqlTrue2 = SqlBoolean.OnesComplement(SqlFalse);
-      Assert("OnesComplement method does not work correctly", SqlTrue2.Value);
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-    }
+                       SqlBoolean SqlResult;
 
-    // Or
-    public void TestOr() {
+                       // true || false
+                       SqlResult = SqlBoolean.Or(SqlTrue, SqlFalse);
+                       Assertion.Assert("Or method does not work correctly (true || false)", SqlResult.Value);
+                       SqlResult = SqlBoolean.Or(SqlFalse, SqlTrue);
+                       Assertion.Assert("Or method does not work correctly (false || true)", SqlResult.Value);
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+                       // true || true
+                       SqlResult = SqlBoolean.Or(SqlTrue, SqlTrue);
+                       Assertion.Assert("Or method does not work correctly (true || true)", SqlResult.Value);
+                       SqlResult = SqlBoolean.Or(SqlTrue, SqlTrue2);
+                       Assertion.Assert("Or method does not work correctly (true || true2)", SqlResult.Value);
 
-      SqlBoolean SqlResult;
+                       // false || false
+                       SqlResult = SqlBoolean.Or(SqlFalse, SqlFalse);
+                       Assertion.Assert("Or method does not work correctly (false || false)", !SqlResult.Value);
+                       SqlResult = SqlBoolean.Or(SqlFalse, SqlFalse2);
+                       Assertion.Assert("Or method does not work correctly (false || false2)", !SqlResult.Value);
 
-      // true || false
-      SqlResult = SqlBoolean.Or(SqlTrue, SqlFalse);
-      Assert("Or method does not work correctly (true || false)", SqlResult.Value);
-      SqlResult = SqlBoolean.Or(SqlFalse, SqlTrue);
-      Assert("Or method does not work correctly (false || true)", SqlResult.Value);
+               }
 
-      // true || true
-      SqlResult = SqlBoolean.Or(SqlTrue, SqlTrue);
-      Assert("Or method does not work correctly (true || true)", SqlResult.Value);
-      SqlResult = SqlBoolean.Or(SqlTrue, SqlTrue2);
-      Assert("Or method does not work correctly (true || true2)", SqlResult.Value);
 
-      // false || false
-      SqlResult = SqlBoolean.Or(SqlFalse, SqlFalse);
-      Assert("Or method does not work correctly (false || false)", !SqlResult.Value);
-      SqlResult = SqlBoolean.Or(SqlFalse, SqlFalse2);
-      Assert("Or method does not work correctly (false || false2)", !SqlResult.Value);
+               //  Parse
+               [Test]
+               public void Parse() {
 
-    }
-
-
-    //  Parse
-    public void TestParse() {
-
-      String error = "Parse method does not work correctly ";
+                       String error = "Parse method does not work correctly ";
                                                                          
-      Assert(error + "(\"True\")", SqlBoolean.Parse("True").Value);
-      Assert(error + "(\" True\")", SqlBoolean.Parse(" True").Value);
-      Assert(error + "(\"True \")", SqlBoolean.Parse("True ").Value);
-      Assert(error + "(\"tRue\")", SqlBoolean.Parse("tRuE").Value);
-      Assert(error + "(\"False\")", !SqlBoolean.Parse("False").Value);
-      Assert(error + "(\" False\")", !SqlBoolean.Parse(" False").Value);
-      Assert(error + "(\"False \")", !SqlBoolean.Parse("False ").Value);
-      Assert(error + "(\"fAlSe\")", !SqlBoolean.Parse("fAlSe").Value);
-
-    }
+                       Assertion.Assert(error + "(\"True\")", SqlBoolean.Parse("True").Value);
+                       Assertion.Assert(error + "(\" True\")", SqlBoolean.Parse(" True").Value);
+                       Assertion.Assert(error + "(\"True \")", SqlBoolean.Parse("True ").Value);
+                       Assertion.Assert(error + "(\"tRue\")", SqlBoolean.Parse("tRuE").Value);
+                       Assertion.Assert(error + "(\"False\")", !SqlBoolean.Parse("False").Value);
+                       Assertion.Assert(error + "(\" False\")", !SqlBoolean.Parse(" False").Value);
+                       Assertion.Assert(error + "(\"False \")", !SqlBoolean.Parse("False ").Value);
+                       Assertion.Assert(error + "(\"fAlSe\")", !SqlBoolean.Parse("fAlSe").Value);
 
-    // Xor
-    public void TestXor() {
+               }
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+               // Xor
+               [Test]
+               public void Xor() {
 
-      SqlBoolean SqlResult;
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-      // true ^ false
-      SqlResult = SqlBoolean.Xor(SqlTrue, SqlFalse);
-      Assert("Xor method does not work correctly (true ^ false)", SqlResult.Value);
-      SqlResult = SqlBoolean.Xor(SqlFalse, SqlTrue);
-      Assert("Xor method does not work correctly (false ^ true)", SqlResult.Value);
+                       SqlBoolean SqlResult;
 
-      // true ^ true
-      SqlResult = SqlBoolean.Xor(SqlTrue, SqlTrue2);
-      Assert("Xor method does not work correctly (true ^ true)", !SqlResult.Value);
+                       // true ^ false
+                       SqlResult = SqlBoolean.Xor(SqlTrue, SqlFalse);
+                       Assertion.Assert("Xor method does not work correctly (true ^ false)", SqlResult.Value);
+                       SqlResult = SqlBoolean.Xor(SqlFalse, SqlTrue);
+                       Assertion.Assert("Xor method does not work correctly (false ^ true)", SqlResult.Value);
 
-      // false ^ false
-      SqlResult = SqlBoolean.Xor(SqlFalse, SqlFalse2);
-      Assert("Xor method does not work correctly (false ^ false)", !SqlResult.Value);
+                       // true ^ true
+                       SqlResult = SqlBoolean.Xor(SqlTrue, SqlTrue2);
+                       Assertion.Assert("Xor method does not work correctly (true ^ true)", !SqlResult.Value);
 
-    }
+                       // false ^ false
+                       SqlResult = SqlBoolean.Xor(SqlFalse, SqlFalse2);
+                       Assertion.Assert("Xor method does not work correctly (false ^ false)", !SqlResult.Value);
 
-    // static Equals
-    public void TestStaticEquals() {
+               }
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
-      String error = "Static Equals method does not work correctly ";
+               // static Equals
+               [Test]
+               public void StaticEquals() {
 
-      Assert(error +  "(true == true)", SqlBoolean.Equals(SqlTrue, SqlTrue2).Value);
-      Assert(error +  "(false == false)", SqlBoolean.Equals(SqlFalse, SqlFalse2).Value);
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
+                       String error = "Static Equals method does not work correctly ";
 
-      Assert(error +  "(true == false)", !SqlBoolean.Equals(SqlTrue, SqlFalse).Value);
-      Assert(error +  "(false == true)", !SqlBoolean.Equals(SqlFalse, SqlTrue).Value);
+                       Assertion.Assert(error +  "(true == true)", SqlBoolean.Equals(SqlTrue, SqlTrue2).Value);
+                       Assertion.Assert(error +  "(false == false)", SqlBoolean.Equals(SqlFalse, SqlFalse2).Value);
 
-      AssertEquals(error +  "(null == false)", SqlBoolean.Null, SqlBoolean.Equals(SqlBoolean.Null, SqlFalse));
-      AssertEquals(error +  "(true == null)", SqlBoolean.Null, SqlBoolean.Equals(SqlTrue, SqlBoolean.Null));
+                       Assertion.Assert(error +  "(true == false)", !SqlBoolean.Equals(SqlTrue, SqlFalse).Value);
+                       Assertion.Assert(error +  "(false == true)", !SqlBoolean.Equals(SqlFalse, SqlTrue).Value);
 
-    }
+                       Assertion.AssertEquals(error +  "(null == false)", SqlBoolean.Null, SqlBoolean.Equals(SqlBoolean.Null, SqlFalse));
+                       Assertion.AssertEquals(error +  "(true == null)", SqlBoolean.Null, SqlBoolean.Equals(SqlTrue, SqlBoolean.Null));
 
-    //
-    // END OF STATIC METHODS
-    ////
+               }
 
-    ////
-    // PUBLIC METHODS
-    //
+               //
+               // END OF STATIC METHODS
+               ////
 
-    // CompareTo
-    public void TestCompareTo() {
+               ////
+               // PUBLIC METHODS
+               //
 
-      String error = "CompareTo method does not work correctly";
+               // CompareTo
+               [Test]
+               public void CompareTo() {
 
-      Assert(error, (SqlTrue.CompareTo(SqlBoolean.Null) > 0));
-      Assert(error, (SqlTrue.CompareTo(SqlFalse) > 0));
-      Assert(error, (SqlFalse.CompareTo(SqlTrue) < 0));
-      Assert(error, (SqlFalse.CompareTo(SqlFalse) == 0));
+                       String error = "CompareTo method does not work correctly";
 
-    }
+                       Assertion.Assert(error, (SqlTrue.CompareTo(SqlBoolean.Null) > 0));
+                       Assertion.Assert(error, (SqlTrue.CompareTo(SqlFalse) > 0));
+                       Assertion.Assert(error, (SqlFalse.CompareTo(SqlTrue) < 0));
+                       Assertion.Assert(error, (SqlFalse.CompareTo(SqlFalse) == 0));
 
-    // Equals
-    public void TestEquals() {
+               }
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+               // Equals
+               [Test]
+               public void Equals() {
 
-      String error = "Equals method does not work correctly ";
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-      Assert(error + "(true == true)", SqlTrue.Equals(SqlTrue2));
-      Assert(error + "(false == false)", SqlFalse.Equals(SqlFalse2));
+                       String error = "Equals method does not work correctly ";
 
-      Assert(error + "(true == false)", !SqlTrue.Equals(SqlFalse));
-      Assert(error + "(false == true)", !SqlFalse.Equals(SqlTrue));
+                       Assertion.Assert(error + "(true == true)", SqlTrue.Equals(SqlTrue2));
+                       Assertion.Assert(error + "(false == false)", SqlFalse.Equals(SqlFalse2));
 
-      Assert(error + "(true == false)", !SqlTrue.Equals(null));
+                       Assertion.Assert(error + "(true == false)", !SqlTrue.Equals(SqlFalse));
+                       Assertion.Assert(error + "(false == true)", !SqlFalse.Equals(SqlTrue));
 
-    }
+                       Assertion.Assert(error + "(true == false)", !SqlTrue.Equals(null));
 
-    public void TestGetHashCode() {
+               }
 
-      AssertEquals("GetHashCode method does not work correctly",
-          1, SqlTrue.GetHashCode());
+               [Test]
+               public void GetHashCodeTest() {
 
-      AssertEquals("GetHashCode method does not work correctly",
-          0, SqlFalse.GetHashCode());
+                       Assertion.AssertEquals("GetHashCode method does not work correctly",
+                                    1, SqlTrue.GetHashCode());
 
-    }
+                       Assertion.AssertEquals("GetHashCode method does not work correctly",
+                                    0, SqlFalse.GetHashCode());
 
-    // GetType
-    public void TestGetType() {
+               }
 
-      AssertEquals("GetType method does not work correctly",
-          SqlTrue.GetType().ToString(), "System.Data.SqlTypes.SqlBoolean");
-    }
+               // GetType
+               [Test]
+               public void GetTypeTest() {
 
-    // ToSqlByte
-    public void TestToSqlByte() {
+                       Assertion.AssertEquals("GetType method does not work correctly",
+                                    SqlTrue.GetType().ToString(), "System.Data.SqlTypes.SqlBoolean");
+               }
 
-      SqlByte SqlTestByte;
+               // ToSqlByte
+               [Test]
+               public void ToSqlByte() {
 
-      String error = "ToSqlByte method does not work correctly ";
+                       SqlByte SqlTestByte;
 
-      SqlTestByte = SqlTrue.ToSqlByte();
-      AssertEquals(error, (byte)1,SqlTestByte.Value);
+                       String error = "ToSqlByte method does not work correctly ";
 
-      SqlTestByte = SqlFalse.ToSqlByte();
-      AssertEquals(error, (byte)0, SqlTestByte.Value);
+                       SqlTestByte = SqlTrue.ToSqlByte();
+                       Assertion.AssertEquals(error, (byte)1,SqlTestByte.Value);
 
-    }
+                       SqlTestByte = SqlFalse.ToSqlByte();
+                       Assertion.AssertEquals(error, (byte)0, SqlTestByte.Value);
 
-    // ToSqlDecimal
-    public void TestToSqlDecimal() {
+               }
 
-      SqlDecimal SqlTestDecimal;
+               // ToSqlDecimal
+               [Test]
+               public void ToSqlDecimal() {
 
-      String error = "ToSqlDecimal method does not work correctly ";
+                       SqlDecimal SqlTestDecimal;
 
-      SqlTestDecimal = SqlTrue.ToSqlDecimal();
+                       String error = "ToSqlDecimal method does not work correctly ";
 
-      AssertEquals(error, (decimal)1, SqlTestDecimal.Value);
+                       SqlTestDecimal = SqlTrue.ToSqlDecimal();
 
-      SqlTestDecimal = SqlFalse.ToSqlDecimal();
-      AssertEquals(error, (decimal)0, SqlTestDecimal.Value);
-    }
+                       Assertion.AssertEquals(error, (decimal)1, SqlTestDecimal.Value);
 
-    // ToSqlDouble
-    public void TestToSqlDouble() {
+                       SqlTestDecimal = SqlFalse.ToSqlDecimal();
+                       Assertion.AssertEquals(error, (decimal)0, SqlTestDecimal.Value);
+               }
 
-      SqlDouble SqlTestDouble;
+               // ToSqlDouble
+               [Test]
+               public void ToSqlDouble() {
 
-      String error = "ToSqlDouble method does not work correctly ";
+                       SqlDouble SqlTestDouble;
 
-      SqlTestDouble = SqlTrue.ToSqlDouble();
-      AssertEquals(error, (double)1, SqlTestDouble.Value);
+                       String error = "ToSqlDouble method does not work correctly ";
 
-      SqlTestDouble = SqlFalse.ToSqlDouble();
-      AssertEquals(error, (double)0, SqlTestDouble.Value);
-    }
+                       SqlTestDouble = SqlTrue.ToSqlDouble();
+                       Assertion.AssertEquals(error, (double)1, SqlTestDouble.Value);
 
-    // ToSqlInt16
-    public void TestToSqlInt16() {
+                       SqlTestDouble = SqlFalse.ToSqlDouble();
+                       Assertion.AssertEquals(error, (double)0, SqlTestDouble.Value);
+               }
 
-      SqlInt16 SqlTestInt16;
+               // ToSqlInt16
+               [Test]
+               public void ToSqlInt16() {
 
-      String error = "ToSqlInt16 method does not work correctly ";
+                       SqlInt16 SqlTestInt16;
 
-      SqlTestInt16 = SqlTrue.ToSqlInt16();
-      AssertEquals(error, (short)1, SqlTestInt16.Value);
+                       String error = "ToSqlInt16 method does not work correctly ";
 
-      SqlTestInt16 = SqlFalse.ToSqlInt16();
-      AssertEquals(error, (short)0, SqlTestInt16.Value);
+                       SqlTestInt16 = SqlTrue.ToSqlInt16();
+                       Assertion.AssertEquals(error, (short)1, SqlTestInt16.Value);
 
-    }
+                       SqlTestInt16 = SqlFalse.ToSqlInt16();
+                       Assertion.AssertEquals(error, (short)0, SqlTestInt16.Value);
 
-    // ToSqlInt32
-    public void TestToSqlInt32() {
+               }
 
-      SqlInt32 SqlTestInt32;
+               // ToSqlInt32
+               [Test]
+               public void ToSqlInt32() {
 
-      String error = "ToSqlInt32 method does not work correctly ";
+                       SqlInt32 SqlTestInt32;
 
-      SqlTestInt32 = SqlTrue.ToSqlInt32();
-      AssertEquals(error, (int)1, SqlTestInt32.Value);
+                       String error = "ToSqlInt32 method does not work correctly ";
 
-      SqlTestInt32 = SqlFalse.ToSqlInt32();
-      AssertEquals(error, (int)0, SqlTestInt32.Value);
+                       SqlTestInt32 = SqlTrue.ToSqlInt32();
+                       Assertion.AssertEquals(error, (int)1, SqlTestInt32.Value);
 
-    }
+                       SqlTestInt32 = SqlFalse.ToSqlInt32();
+                       Assertion.AssertEquals(error, (int)0, SqlTestInt32.Value);
 
-    // ToSqlInt64
-    public void TestToSqlInt64() {
+               }
 
-      SqlInt64 SqlTestInt64;
+               // ToSqlInt64
+               [Test]
+               public void ToSqlInt64() {
 
-      String error = "ToSqlInt64 method does not work correctly ";
+                       SqlInt64 SqlTestInt64;
 
-      SqlTestInt64 = SqlTrue.ToSqlInt64();
-      AssertEquals(error, (long)1, SqlTestInt64.Value);
+                       String error = "ToSqlInt64 method does not work correctly ";
 
-      SqlTestInt64 = SqlFalse.ToSqlInt64();
-      AssertEquals(error, (long)0, SqlTestInt64.Value);
+                       SqlTestInt64 = SqlTrue.ToSqlInt64();
+                       Assertion.AssertEquals(error, (long)1, SqlTestInt64.Value);
 
-    }
+                       SqlTestInt64 = SqlFalse.ToSqlInt64();
+                       Assertion.AssertEquals(error, (long)0, SqlTestInt64.Value);
 
-    // ToSqlMoney
-    public void TestToSqlMoney() {
+               }
 
-      SqlMoney SqlTestMoney;
+               // ToSqlMoney
+               [Test]
+               public void ToSqlMoney() {
 
-      String error = "ToSqlMoney method does not work correctly ";
+                       SqlMoney SqlTestMoney;
 
-      SqlTestMoney = SqlTrue.ToSqlMoney();
-      AssertEquals(error, (decimal)1, SqlTestMoney.Value);
+                       String error = "ToSqlMoney method does not work correctly ";
 
-      SqlTestMoney = SqlFalse.ToSqlMoney();
-      AssertEquals(error, (decimal)0, SqlTestMoney.Value);
+                       SqlTestMoney = SqlTrue.ToSqlMoney();
+                       Assertion.AssertEquals(error, (decimal)1, SqlTestMoney.Value);
 
-    }
+                       SqlTestMoney = SqlFalse.ToSqlMoney();
+                       Assertion.AssertEquals(error, (decimal)0, SqlTestMoney.Value);
 
-    // ToSqlSingle
-    public void TestToSqlsingle() {
+               }
 
-      SqlSingle SqlTestSingle;
+               // ToSqlSingle
+               [Test]
+               public void ToSqlsingle() {
 
-      String error = "ToSqlSingle method does not work correctly ";
+                       SqlSingle SqlTestSingle;
 
-      SqlTestSingle = SqlTrue.ToSqlSingle();
-      AssertEquals(error, (float)1, SqlTestSingle.Value);
+                       String error = "ToSqlSingle method does not work correctly ";
 
-      SqlTestSingle = SqlFalse.ToSqlSingle();
-      AssertEquals(error, (float)0, SqlTestSingle.Value);
+                       SqlTestSingle = SqlTrue.ToSqlSingle();
+                       Assertion.AssertEquals(error, (float)1, SqlTestSingle.Value);
 
-    }
+                       SqlTestSingle = SqlFalse.ToSqlSingle();
+                       Assertion.AssertEquals(error, (float)0, SqlTestSingle.Value);
 
-    // ToSqlString
-    public void TestToSqlString() {
+               }
 
-      SqlString SqlTestString;
+               // ToSqlString
+               [Test]
+               public void ToSqlString() {
 
-      String error = "ToSqlString method does not work correctly ";
+                       SqlString SqlTestString;
 
-      SqlTestString = SqlTrue.ToSqlString();
-      AssertEquals(error, "True", SqlTestString.Value);
+                       String error = "ToSqlString method does not work correctly ";
 
-      SqlTestString = SqlFalse.ToSqlString();
-      AssertEquals(error, "False", SqlTestString.Value);
+                       SqlTestString = SqlTrue.ToSqlString();
+                       Assertion.AssertEquals(error, "True", SqlTestString.Value);
 
-    }
+                       SqlTestString = SqlFalse.ToSqlString();
+                       Assertion.AssertEquals(error, "False", SqlTestString.Value);
 
-    // ToString
-    public void TestToString() {
+               }
 
-      SqlString TestString;
+               // ToString
+               [Test]
+               public void ToStringTest() {
 
-      String error = "ToString method does not work correctly ";
+                       SqlString TestString;
 
-      TestString = SqlTrue.ToString();
-      AssertEquals(error, "True", TestString.Value);
+                       String error = "ToString method does not work correctly ";
 
-      TestString = SqlFalse.ToSqlString();
-      AssertEquals(error, "False", TestString.Value);
+                       TestString = SqlTrue.ToString();
+                       Assertion.AssertEquals(error, "True", TestString.Value);
 
-    }
+                       TestString = SqlFalse.ToSqlString();
+                       Assertion.AssertEquals(error, "False", TestString.Value);
 
-    // END OF PUBLIC METHODS
-    ////
+               }
 
-    ////
-    // OPERATORS
+               // END OF PUBLIC METHODS
+               ////
 
-    // BitwixeAnd operator
-    public void TestBitwiseAndOperator() {
+               ////
+               // OPERATORS
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+               // BitwixeAnd operator
+               [Test]
+               public void BitwiseAndOperator() {
 
-      SqlBoolean SqlResult;
-      String error = "BitwiseAnd operator does not work correctly ";
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-      SqlResult = SqlTrue & SqlFalse;
-      Assert(error + "(true & false)", !SqlResult.Value);
-      SqlResult = SqlFalse & SqlTrue;
-      Assert(error + "(false & true)", !SqlResult.Value);
+                       SqlBoolean SqlResult;
+                       String error = "BitwiseAnd operator does not work correctly ";
 
-      SqlResult = SqlTrue & SqlTrue2;
-      Assert(error + "(true & true)", SqlResult.Value);
+                       SqlResult = SqlTrue & SqlFalse;
+                       Assertion.Assert(error + "(true & false)", !SqlResult.Value);
+                       SqlResult = SqlFalse & SqlTrue;
+                       Assertion.Assert(error + "(false & true)", !SqlResult.Value);
 
-      SqlResult = SqlFalse & SqlFalse2;
-      Assert(error + "(false & false)", !SqlResult.Value);
+                       SqlResult = SqlTrue & SqlTrue2;
+                       Assertion.Assert(error + "(true & true)", SqlResult.Value);
 
+                       SqlResult = SqlFalse & SqlFalse2;
+                       Assertion.Assert(error + "(false & false)", !SqlResult.Value);
 
-    }
 
-    // BitwixeOr operator
-    public void TestBitwiseOrOperator() {
+               }
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+               // BitwixeOr operator
+               [Test]
+               public void BitwiseOrOperator() {
 
-      SqlBoolean SqlResult;
-      String error = "BitwiseOr operator does not work correctly ";
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-      SqlResult = SqlTrue | SqlFalse;
-      Assert(error + "(true | false)", SqlResult.Value);
-      SqlResult = SqlFalse | SqlTrue;
+                       SqlBoolean SqlResult;
+                       String error = "BitwiseOr operator does not work correctly ";
 
-      Assert(error + "(false | true)", SqlResult.Value);
+                       SqlResult = SqlTrue | SqlFalse;
+                       Assertion.Assert(error + "(true | false)", SqlResult.Value);
+                       SqlResult = SqlFalse | SqlTrue;
 
-      SqlResult = SqlTrue | SqlTrue2;
-      Assert(error + "(true | true)", SqlResult.Value);
+                       Assertion.Assert(error + "(false | true)", SqlResult.Value);
 
-      SqlResult = SqlFalse | SqlFalse2;
-      Assert(error + "(false | false)", !SqlResult.Value);
+                       SqlResult = SqlTrue | SqlTrue2;
+                       Assertion.Assert(error + "(true | true)", SqlResult.Value);
 
-    }
+                       SqlResult = SqlFalse | SqlFalse2;
+                       Assertion.Assert(error + "(false | false)", !SqlResult.Value);
 
-    // Equality operator
-    public void TestEqualityOperator() {
+               }
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+               // Equality operator
+               [Test]
+               public void EqualityOperator() {
 
-      SqlBoolean SqlResult;
-      String error = "Equality operator does not work correctly ";
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-      SqlResult = SqlTrue == SqlFalse;
-      Assert(error + "(true == false)", !SqlResult.Value);
-      SqlResult = SqlFalse == SqlTrue;
-      Assert(error + "(false == true)", !SqlResult.Value);
+                       SqlBoolean SqlResult;
+                       String error = "Equality operator does not work correctly ";
 
-      SqlResult = SqlTrue == SqlTrue2;
-      Assert(error + "(true == true)", SqlResult.Value);
+                       SqlResult = SqlTrue == SqlFalse;
+                       Assertion.Assert(error + "(true == false)", !SqlResult.Value);
+                       SqlResult = SqlFalse == SqlTrue;
+                       Assertion.Assert(error + "(false == true)", !SqlResult.Value);
 
-      SqlResult = SqlFalse == SqlFalse2;
-      Assert(error + "(false == false)", SqlResult.Value);
+                       SqlResult = SqlTrue == SqlTrue2;
+                       Assertion.Assert(error + "(true == true)", SqlResult.Value);
 
-      SqlResult = SqlFalse == SqlBoolean.Null;
-      Assert(error + "(false == Null)", SqlResult.IsNull);
-      SqlResult = SqlBoolean.Null == SqlBoolean.Null;
-      Assert(error + "(Null == true)", SqlResult.IsNull);
+                       SqlResult = SqlFalse == SqlFalse2;
+                       Assertion.Assert(error + "(false == false)", SqlResult.Value);
 
-    }
+                       SqlResult = SqlFalse == SqlBoolean.Null;
+                       Assertion.Assert(error + "(false == Null)", SqlResult.IsNull);
+                       SqlResult = SqlBoolean.Null == SqlBoolean.Null;
+                       Assertion.Assert(error + "(Null == true)", SqlResult.IsNull);
 
-    // ExlusiveOr operator
-    public void TestExlusiveOrOperator() {
+               }
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+               // ExlusiveOr operator
+               [Test]
+               public void ExlusiveOrOperator() {
 
-      SqlBoolean SqlResult;
-      String error = "ExclusiveOr operator does not work correctly ";
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-      SqlResult = SqlTrue ^ SqlFalse;
-      Assert(error + "(true ^ false)", SqlResult.Value);
-      SqlResult = SqlFalse | SqlTrue;
-      Assert(error + "(false ^ true)", SqlResult.Value);
+                       SqlBoolean SqlResult;
+                       String error = "ExclusiveOr operator does not work correctly ";
 
-      SqlResult = SqlTrue ^ SqlTrue2;
-      Assert(error + "(true ^ true)", !SqlResult.Value);
+                       SqlResult = SqlTrue ^ SqlFalse;
+                       Assertion.Assert(error + "(true ^ false)", SqlResult.Value);
+                       SqlResult = SqlFalse | SqlTrue;
+                       Assertion.Assert(error + "(false ^ true)", SqlResult.Value);
 
-      SqlResult = SqlFalse ^ SqlFalse2;
-      Assert(error + "(false ^ false)", !SqlResult.Value);
+                       SqlResult = SqlTrue ^ SqlTrue2;
+                       Assertion.Assert(error + "(true ^ true)", !SqlResult.Value);
 
-    }
+                       SqlResult = SqlFalse ^ SqlFalse2;
+                       Assertion.Assert(error + "(false ^ false)", !SqlResult.Value);
 
-    // false operator
-    public void TestFalseOperator() {
+               }
 
-      String error = "false operator does not work correctly ";
+               // false operator
+               [Test]
+               public void FalseOperator() {
 
-      AssertEquals(error + "(true)", SqlBoolean.False, (!SqlTrue));
-      AssertEquals(error + "(false)", SqlBoolean.True, (!SqlFalse));
+                       String error = "false operator does not work correctly ";
 
-    }
+                       Assertion.AssertEquals(error + "(true)", SqlBoolean.False, (!SqlTrue));
+                       Assertion.AssertEquals(error + "(false)", SqlBoolean.True, (!SqlFalse));
 
-    // Inequality operator
-    public void TestInequalityOperator() {
+               }
 
-      SqlBoolean SqlTrue2 = new SqlBoolean(true);
-      SqlBoolean SqlFalse2 = new SqlBoolean(false);
+               // Inequality operator
+               [Test]
+               public void InequalityOperator() {
 
-      String error = "Inequality operator does not work correctly" ;
+                       SqlBoolean SqlTrue2 = new SqlBoolean(true);
+                       SqlBoolean SqlFalse2 = new SqlBoolean(false);
 
-      AssertEquals(error + "(true != true)",   SqlBoolean.False, SqlTrue != SqlTrue);
-      AssertEquals(error + "(true != true)",   SqlBoolean.False, SqlTrue != SqlTrue2);
-      AssertEquals(error + "(false != false)", SqlBoolean.False, SqlFalse != SqlFalse);
-      AssertEquals(error + "(false != false)", SqlBoolean.False, SqlFalse != SqlFalse2);
-      AssertEquals(error + "(true != false)",  SqlBoolean.True, SqlTrue != SqlFalse);
-      AssertEquals(error + "(false != true)",  SqlBoolean.True, SqlFalse != SqlTrue);
-      AssertEquals(error + "(null != true)",   SqlBoolean.Null, SqlBoolean.Null != SqlTrue);
-      AssertEquals(error + "(false != null)",  SqlBoolean.Null, SqlFalse != SqlBoolean.Null);
+                       String error = "Inequality operator does not work correctly" ;
 
-    }
+                       Assertion.AssertEquals(error + "(true != true)",   SqlBoolean.False, SqlTrue != SqlTrue);
+                       Assertion.AssertEquals(error + "(true != true)",   SqlBoolean.False, SqlTrue != SqlTrue2);
+                       Assertion.AssertEquals(error + "(false != false)", SqlBoolean.False, SqlFalse != SqlFalse);
+                       Assertion.AssertEquals(error + "(false != false)", SqlBoolean.False, SqlFalse != SqlFalse2);
+                       Assertion.AssertEquals(error + "(true != false)",  SqlBoolean.True, SqlTrue != SqlFalse);
+                       Assertion.AssertEquals(error + "(false != true)",  SqlBoolean.True, SqlFalse != SqlTrue);
+                       Assertion.AssertEquals(error + "(null != true)",   SqlBoolean.Null, SqlBoolean.Null != SqlTrue);
+                       Assertion.AssertEquals(error + "(false != null)",  SqlBoolean.Null, SqlFalse != SqlBoolean.Null);
 
-    // Logical Not operator
-    public void TestLogicalNotOperator() {
+               }
 
-      String error = "Logical Not operator does not work correctly" ;
+               // Logical Not operator
+               [Test]
+               public void LogicalNotOperator() {
 
-      AssertEquals(error + "(true)", SqlBoolean.False, !SqlTrue);
-      AssertEquals(error + "(false)", SqlBoolean.True, !SqlFalse);
+                       String error = "Logical Not operator does not work correctly" ;
 
-    }
+                       Assertion.AssertEquals(error + "(true)", SqlBoolean.False, !SqlTrue);
+                       Assertion.AssertEquals(error + "(false)", SqlBoolean.True, !SqlFalse);
 
-    // OnesComplement operator
-    public void TestOnesComplementOperator() {
+               }
 
-      String error = "Ones complement operator does not work correctly" ;
+               // OnesComplement operator
+               [Test]
+               public void OnesComplementOperator() {
 
-      SqlBoolean SqlResult;
+                       String error = "Ones complement operator does not work correctly" ;
 
-      SqlResult = ~SqlTrue;
-      Assert(error + "(true)", !SqlResult.Value);
-      SqlResult = ~SqlFalse;
-      Assert(error + "(false)", SqlResult.Value);
+                       SqlBoolean SqlResult;
 
-    }
+                       SqlResult = ~SqlTrue;
+                       Assertion.Assert(error + "(true)", !SqlResult.Value);
+                       SqlResult = ~SqlFalse;
+                       Assertion.Assert(error + "(false)", SqlResult.Value);
 
+               }
 
-    // true operator
-    public void TestTrueOperator() {
 
-      String error = "true operator does not work correctly ";
+               // true operator
+               [Test]
+               public void TrueOperator() {
 
-      AssertEquals(error + "(true)", SqlBoolean.True, (SqlTrue));
-      AssertEquals(error + "(false)", SqlBoolean.False, (SqlFalse));
+                       String error = "true operator does not work correctly ";
 
-    }
+                       Assertion.AssertEquals(error + "(true)", SqlBoolean.True, (SqlTrue));
+                       Assertion.AssertEquals(error + "(false)", SqlBoolean.False, (SqlFalse));
 
-    // SqlBoolean to Boolean
-    public void TestSqlBooleanToBoolean() {
+               }
 
-      String error = "SqlBooleanToBoolean operator does not work correctly ";
+               // SqlBoolean to Boolean
+               [Test]
+               public void SqlBooleanToBoolean() {
 
-      Boolean TestBoolean = (Boolean)SqlTrue;
-      Assert(error + "(true)",  TestBoolean);
-      TestBoolean = (Boolean)SqlFalse;
-      Assert(error + "(false)",  !TestBoolean);
+                       String error = "SqlBooleanToBoolean operator does not work correctly ";
 
-    }
+                       Boolean TestBoolean = (Boolean)SqlTrue;
+                       Assertion.Assert(error + "(true)",  TestBoolean);
+                       TestBoolean = (Boolean)SqlFalse;
+                       Assertion.Assert(error + "(false)",  !TestBoolean);
 
-    // SqlByte to SqlBoolean
-    public void TestSqlByteToSqlBoolean() {
+               }
 
-      SqlByte SqlTestByte;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlByteToSqlBoolean operator does not work correctly ";
+               // SqlByte to SqlBoolean
+               [Test]
+               public void SqlByteToSqlBoolean() {
 
-      SqlTestByte = new SqlByte(1);
-      SqlTestBoolean = (SqlBoolean)SqlTestByte;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlByte SqlTestByte;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlByteToSqlBoolean operator does not work correctly ";
 
-      SqlTestByte = new SqlByte(2);
-      SqlTestBoolean = (SqlBoolean)SqlTestByte;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTestByte = new SqlByte(1);
+                       SqlTestBoolean = (SqlBoolean)SqlTestByte;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTestByte = new SqlByte(0);
-      SqlTestBoolean = (SqlBoolean)SqlTestByte;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTestByte = new SqlByte(2);
+                       SqlTestBoolean = (SqlBoolean)SqlTestByte;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    }
+                       SqlTestByte = new SqlByte(0);
+                       SqlTestBoolean = (SqlBoolean)SqlTestByte;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // SqlDecimal to SqlBoolean
-    public void TestSqlDecimalToSqlBoolean() {
+               }
 
-      SqlDecimal SqlTest;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlDecimalToSqlBoolean operator does not work correctly ";
+               // SqlDecimal to SqlBoolean
+               [Test]
+               public void SqlDecimalToSqlBoolean() {
 
-      SqlTest = new SqlDecimal(1);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlDecimal SqlTest;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlDecimalToSqlBoolean operator does not work correctly ";
 
-      SqlTest = new SqlDecimal(19);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlDecimal(1);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlDecimal(0);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTest = new SqlDecimal(19);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    }
+                       SqlTest = new SqlDecimal(0);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // SqlDouble to SqlBoolean
-    public void TestSqlDoubleToSqlBoolean() {
+               }
 
-      SqlDouble SqlTest;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlDoubleToSqlBoolean operator does not work correctly ";
+               // SqlDouble to SqlBoolean
+               [Test]
+               public void SqlDoubleToSqlBoolean() {
 
-      SqlTest = new SqlDouble(1);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlDouble SqlTest;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlDoubleToSqlBoolean operator does not work correctly ";
 
-      SqlTest = new SqlDouble(-19.8);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlDouble(1);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlDouble(0);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTest = new SqlDouble(-19.8);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    }
+                       SqlTest = new SqlDouble(0);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // SqlIn16 to SqlBoolean
-    public void TestSqlInt16ToSqlBoolean() {
+               }
 
-      SqlInt16 SqlTest;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlInt16ToSqlBoolean operator does not work correctly ";
+               // SqlIn16 to SqlBoolean
+               [Test]
+               public void SqlInt16ToSqlBoolean() {
 
-      SqlTest = new SqlInt16(1);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlInt16 SqlTest;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlInt16ToSqlBoolean operator does not work correctly ";
 
-      SqlTest = new SqlInt16(-143);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlInt16(1);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlInt16(0);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTest = new SqlInt16(-143);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    }
+                       SqlTest = new SqlInt16(0);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // SqlInt32 to SqlBoolean
-    public void TestSqlInt32ToSqlBoolean() {
+               }
 
-      SqlInt32 SqlTest;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlInt32ToSqlBoolean operator does not work correctly ";
+               // SqlInt32 to SqlBoolean
+               [Test]
+               public void SqlInt32ToSqlBoolean() {
 
-      SqlTest = new SqlInt32(1);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlInt32 SqlTest;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlInt32ToSqlBoolean operator does not work correctly ";
 
-      SqlTest = new SqlInt32(1430);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlInt32(1);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlInt32(0);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
-    }
+                       SqlTest = new SqlInt32(1430);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    // SqlInt64 to SqlBoolean
-    public void TestSqlInt64ToSqlBoolean() {
+                       SqlTest = new SqlInt32(0);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
+               }
 
-      SqlInt64 SqlTest;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlInt64ToSqlBoolean operator does not work correctly ";
+               // SqlInt64 to SqlBoolean
+               [Test]
+               public void SqlInt64ToSqlBoolean() {
 
-      SqlTest = new SqlInt64(1);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlInt64 SqlTest;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlInt64ToSqlBoolean operator does not work correctly ";
 
-      SqlTest = new SqlInt64(-14305);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlInt64(1);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlInt64(0);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTest = new SqlInt64(-14305);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    }
+                       SqlTest = new SqlInt64(0);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // SqlMoney to SqlBoolean
-    public void TestSqlMoneyToSqlBoolean() {
+               }
 
-      SqlMoney SqlTest;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlMoneyToSqlBoolean operator does not work correctly ";
+               // SqlMoney to SqlBoolean
+               [Test]
+               public void SqlMoneyToSqlBoolean() {
 
-      SqlTest = new SqlMoney(1);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlMoney SqlTest;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlMoneyToSqlBoolean operator does not work correctly ";
 
-      SqlTest = new SqlMoney(1305);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlMoney(1);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlMoney(0);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTest = new SqlMoney(1305);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    }
+                       SqlTest = new SqlMoney(0);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // SqlSingle to SqlBoolean
-    public void TestSqlSingleToSqlBoolean() {
+               }
 
-      SqlSingle SqlTest;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlSingleToSqlBoolean operator does not work correctly ";
+               // SqlSingle to SqlBoolean
+               [Test]
+               public void SqlSingleToSqlBoolean() {
 
-      SqlTest = new SqlSingle(1);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlSingle SqlTest;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlSingleToSqlBoolean operator does not work correctly ";
 
-      SqlTest = new SqlSingle(1305);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlSingle(1);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlSingle(-305.3);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlSingle(1305);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlSingle(0);
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTest = new SqlSingle(-305.3);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    }
+                       SqlTest = new SqlSingle(0);
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // SqlString to SqlBoolean
-    public void TestSqlStringToSqlBoolean() {
+               }
 
-      SqlString SqlTest;
-      SqlBoolean SqlTestBoolean;
-      String error = "SqlSingleToSqlBoolean operator does not work correctly ";
+               // SqlString to SqlBoolean
+               [Test]
+               public void SqlStringToSqlBoolean() {
 
-      SqlTest = new SqlString("true");
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlString SqlTest;
+                       SqlBoolean SqlTestBoolean;
+                       String error = "SqlSingleToSqlBoolean operator does not work correctly ";
 
-      SqlTest = new SqlString("TRUE");
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlString("true");
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlString("True");
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTest = new SqlString("TRUE");
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = new SqlString("false");
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTest = new SqlString("True");
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-    }
+                       SqlTest = new SqlString("false");
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // Boolean to SqlBoolean
-    public void BooleanToSqlBoolean() {
+               }
 
-      SqlBoolean SqlTestBoolean;
-      bool btrue = true;
-      bool bfalse = false;
-      String error = "BooleanToSqlBoolean operator does not work correctly ";
+               // Boolean to SqlBoolean
+               [Test]
+               public void BooleanToSqlBoolean() {
 
-      Boolean SqlTest = true;
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(true)", SqlTestBoolean.Value);
-      SqlTestBoolean = (SqlBoolean)btrue;
-      Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlBoolean SqlTestBoolean;
+                       bool btrue = true;
+                       bool bfalse = false;
+                       String error = "BooleanToSqlBoolean operator does not work correctly ";
 
+                       Boolean SqlTest = true;
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
+                       SqlTestBoolean = (SqlBoolean)btrue;
+                       Assertion.Assert(error + "(true)", SqlTestBoolean.Value);
 
-      SqlTest = false;
-      SqlTestBoolean = (SqlBoolean)SqlTest;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
-      SqlTestBoolean = (SqlBoolean)bfalse;
-      Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    }
+                       SqlTest = false;
+                       SqlTestBoolean = (SqlBoolean)SqlTest;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
+                       SqlTestBoolean = (SqlBoolean)bfalse;
+                       Assertion.Assert(error + "(false)", !SqlTestBoolean.Value);
 
-    // END OF OPERATORS
-    ////
+               }
 
-    ////
-    // PROPERTIES
+               // END OF OPERATORS
+               ////
 
-    // ByteValue property
-    public void TestByteValueProperty() {
+               ////
+               // PROPERTIES
 
-      String error = "ByteValue property does not work correctly ";
+               // ByteValue property
+               [Test]
+               public void ByteValueProperty() {
 
-      AssertEquals(error + "(true)", (byte)1, SqlTrue.ByteValue);
-      AssertEquals(error + "(false)", (byte)0, SqlFalse.ByteValue);
+                       String error = "ByteValue property does not work correctly ";
 
-    }
+                       Assertion.AssertEquals(error + "(true)", (byte)1, SqlTrue.ByteValue);
+                       Assertion.AssertEquals(error + "(false)", (byte)0, SqlFalse.ByteValue);
 
-    // IsFalse property
-    public void TestIsFalseProperty() {
+               }
 
-      String error = "IsFalse property does not work correctly ";
+               // IsFalse property
+               [Test]
+               public void IsFalseProperty() {
 
-      Assert(error + "(true)", !SqlTrue.IsFalse);
-      Assert(error + "(false)", SqlFalse.IsFalse);
+                       String error = "IsFalse property does not work correctly ";
 
-    }
+                       Assertion.Assert(error + "(true)", !SqlTrue.IsFalse);
+                       Assertion.Assert(error + "(false)", SqlFalse.IsFalse);
 
-    // IsNull property
-    public void TestIsNullProperty() {
+               }
 
-      String error = "IsNull property does not work correctly ";
+               // IsNull property
+               [Test]
+               public void IsNullProperty() {
 
-      Assert(error + "(true)", !SqlTrue.IsNull);
-      Assert(error + "(false)", !SqlFalse.IsNull);
-      Assert(error + "(Null)", SqlBoolean.Null.IsNull);
+                       String error = "IsNull property does not work correctly ";
 
-    }
+                       Assertion.Assert(error + "(true)", !SqlTrue.IsNull);
+                       Assertion.Assert(error + "(false)", !SqlFalse.IsNull);
+                       Assertion.Assert(error + "(Null)", SqlBoolean.Null.IsNull);
 
-    // IsTrue property
-    public void TestIsTrueProperty() {
+               }
 
-      String error = "IsTrue property does not work correctly ";
+               // IsTrue property
+               [Test]
+               public void IsTrueProperty() {
 
-      Assert(error + "(true)", SqlTrue.IsTrue);
-      Assert(error + "(false)", !SqlFalse.IsTrue);
+                       String error = "IsTrue property does not work correctly ";
 
-    }
+                       Assertion.Assert(error + "(true)", SqlTrue.IsTrue);
+                       Assertion.Assert(error + "(false)", !SqlFalse.IsTrue);
 
-    // Value property
-    public void TestValueProperty() {
+               }
 
-      String error = "Value property does not work correctly ";
+               // Value property
+               [Test]
+               public void ValueProperty() {
 
-      Assert(error + "(true)", SqlTrue.Value);
-      Assert(error + "(false)", !SqlFalse.Value);
+                       String error = "Value property does not work correctly ";
 
-    }
+                       Assertion.Assert(error + "(true)", SqlTrue.Value);
+                       Assertion.Assert(error + "(false)", !SqlFalse.Value);
 
-    // END OF PROPERTIEs
-    ////
+               }
 
-    ////
-    // FIELDS
+               // END OF PROPERTIEs
+               ////
 
-    public void TestFalseField() {
+               ////
+               // FIELDS
 
-      Assert("False field does not work correctly",
-        !SqlBoolean.False.Value);
+               [Test]
+               public void FalseField() {
 
-    }
+                       Assertion.Assert("False field does not work correctly",
+                              !SqlBoolean.False.Value);
 
-    public void TestNullField() {
+               }
 
-      Assert("Null field does not work correctly",
-        SqlBoolean.Null.IsNull);
+               [Test]
+               public void NullField() {
 
-    }
+                       Assertion.Assert("Null field does not work correctly",
+                              SqlBoolean.Null.IsNull);
 
-    public void TestOneField() {
+               }
 
-      AssertEquals("One field does not work correctly",
-        (byte)1, SqlBoolean.One.ByteValue);
-    }
+               [Test]
+               public void OneField() {
 
+                       Assertion.AssertEquals("One field does not work correctly",
+                                    (byte)1, SqlBoolean.One.ByteValue);
+               }
 
-    public void TestTrueField() {
+               [Test]
+               public void TrueField() {
 
-      Assert("True field does not work correctly",
-        SqlBoolean.True.Value);
+                       Assertion.Assert("True field does not work correctly",
+                              SqlBoolean.True.Value);
 
-    }
+               }
 
-    public void TestZeroField() {
+               [Test]
+               public void ZeroField() {
 
-      AssertEquals("Zero field does not work correctly",
-        (byte)0, SqlBoolean.Zero.ByteValue);
+                       Assertion.AssertEquals("Zero field does not work correctly",
+                                    (byte)0, SqlBoolean.Zero.ByteValue);
 
-    }
-  }
+               }
+       }
 }
 
index 8e4f4cfee28fdcbf3ac476c2a67eee8b1c260778..b3aaa27c4d28170e301636a8fa7b62f6072876a8 100644 (file)
@@ -1,9 +1,12 @@
 //
 // SqlByteTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlByte
 //
-// Ville Palo (vi64pa@koti.soon.fi)
+// Authors:
+//   Ville Palo (vi64pa@koti.soon.fi)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
-// (C) Ville Palo 2002
+// (C) 2002 Ville Palo
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -12,61 +15,46 @@ using System.Data.SqlTypes;
 
 namespace MonoTests.System.Data.SqlTypes
 {
-       public class SqlByteTest : TestCase {
-
+       [TestFixture]
+        public class SqlByteTest {
                private const string Error = " does not work correctly";
 
-               public SqlByteTest() : base ("System.Data.SqlTypes.SqlByte") {}
-               public SqlByteTest(string name) : base(name) {}
-
-               protected override void TearDown() {}
-
-               protected override void SetUp() {
-
-               }
-
-               public static ITest Suite {
-                       get {
-                               return new TestSuite(typeof(SqlString));
-                       }
-               }
-
                // Test constructor
-               public void TestCreate()
+               [Test]
+               public void Create()
                {
                        byte b = 29;
                        SqlByte TestByte = new SqlByte(b);
-                       AssertEquals("Constructor 1 does not work correctly", (byte)29, TestByte.Value);
-
+                       Assertion.AssertEquals("Constructor 1 does not work correctly", (byte)29, TestByte.Value);
                }
 
                // Test public fields
-               public void TestPublicFields()
+               [Test]
+               public void PublicFields()
                {
-
-                       AssertEquals("MaxValue field" + Error, (SqlByte)255, SqlByte.MaxValue);
-                       AssertEquals("MinValue field" + Error, (SqlByte)0, SqlByte.MinValue);
-                       Assert("Null field" + Error, SqlByte.Null.IsNull);
-                       AssertEquals("Zero field" + Error, (byte)0, SqlByte.Zero.Value);
-                       
+                       Assertion.AssertEquals("MaxValue field" + Error, (SqlByte)255, SqlByte.MaxValue);
+                       Assertion.AssertEquals("MinValue field" + Error, (SqlByte)0, SqlByte.MinValue);
+                       Assertion.Assert("Null field" + Error, SqlByte.Null.IsNull);
+                       Assertion.AssertEquals("Zero field" + Error, (byte)0, SqlByte.Zero.Value);
                }
 
                // Test properties
-               public void TestProperties()
+               [Test]
+               public void Properties()
                {
 
                        SqlByte TestByte = new SqlByte(54);
                        SqlByte TestByte2 = new SqlByte(1);
 
-                       Assert("IsNull property" + Error, SqlByte.Null.IsNull);
-                       AssertEquals("Value property 1" + Error, (byte)54, TestByte.Value);
-                       AssertEquals("Value property 2" + Error, (byte)1, TestByte2.Value);
+                       Assertion.Assert("IsNull property" + Error, SqlByte.Null.IsNull);
+                       Assertion.AssertEquals("Value property 1" + Error, (byte)54, TestByte.Value);
+                       Assertion.AssertEquals("Value property 2" + Error, (byte)1, TestByte2.Value);
 
                }
 
                // PUBLIC STATIC METHODS
-
-               public void TestAddMethod()
+               [Test]
+               public void AddMethod()
                {
 
                        SqlByte TestByte64 = new SqlByte(64);
@@ -74,21 +62,22 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlByte TestByte164 = new SqlByte(164);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       AssertEquals("AddMethod 1" + Error, (byte)64, SqlByte.Add(TestByte64, TestByte0).Value);
-                       AssertEquals("AddMethod 2" + Error, (byte)228, SqlByte.Add(TestByte64, TestByte164).Value);
-                       AssertEquals("AddMethod 3" + Error, (byte)164, SqlByte.Add(TestByte0, TestByte164).Value);
-                       AssertEquals("AddMethod 4" + Error, (byte)255, SqlByte.Add(TestByte255, TestByte0).Value);
+                       Assertion.AssertEquals("AddMethod 1" + Error, (byte)64, SqlByte.Add(TestByte64, TestByte0).Value);
+                       Assertion.AssertEquals("AddMethod 2" + Error, (byte)228, SqlByte.Add(TestByte64, TestByte164).Value);
+                       Assertion.AssertEquals("AddMethod 3" + Error, (byte)164, SqlByte.Add(TestByte0, TestByte164).Value);
+                       Assertion.AssertEquals("AddMethod 4" + Error, (byte)255, SqlByte.Add(TestByte255, TestByte0).Value);
 
                        try {
                                SqlByte.Add(TestByte255, TestByte64);
-                               Fail ("AddMethod 6" + Error);
+                               Assertion.Fail ("AddMethod 6" + Error);
                        } catch (Exception e) {
-                               AssertEquals("AddMethod 5" + Error, typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("AddMethod 5" + Error, typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestBitwiseAndMethod()
+               [Test]
+               public void BitwiseAndMethod()
                {
 
                        SqlByte TestByte2 = new SqlByte(2);
@@ -96,20 +85,21 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlByte TestByte62 = new SqlByte(62);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       AssertEquals("BitwiseAnd method 1" + Error,
+                       Assertion.AssertEquals("BitwiseAnd method 1" + Error,
                                     (byte)0, SqlByte.BitwiseAnd(TestByte2, TestByte1).Value);
-                       AssertEquals("BitwiseAnd method 2" + Error,
+                       Assertion.AssertEquals("BitwiseAnd method 2" + Error,
                                     (byte)0, SqlByte.BitwiseAnd(TestByte1, TestByte62).Value);
-                       AssertEquals("BitwiseAnd method 3" + Error,
+                       Assertion.AssertEquals("BitwiseAnd method 3" + Error,
                                     (byte)2, SqlByte.BitwiseAnd(TestByte62, TestByte2).Value);
-                       AssertEquals("BitwiseAnd method 4" + Error,
+                       Assertion.AssertEquals("BitwiseAnd method 4" + Error,
                                     (byte)1, SqlByte.BitwiseAnd(TestByte1, TestByte255).Value);
-                       AssertEquals("BitwiseAnd method 5" + Error,
+                       Assertion.AssertEquals("BitwiseAnd method 5" + Error,
                                     (byte)62, SqlByte.BitwiseAnd(TestByte62, TestByte255).Value);
 
                }
 
-               public void TestBitwiseOrMethod()
+               [Test]
+               public void BitwiseOrMethod()
                {
 
                        SqlByte TestByte2 = new SqlByte(2);
@@ -117,21 +107,21 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlByte TestByte62 = new SqlByte(62);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       AssertEquals("BitwiseOr method 1" + Error,
+                       Assertion.AssertEquals("BitwiseOr method 1" + Error,
                                     (byte)3, SqlByte.BitwiseOr(TestByte2, TestByte1).Value);
-                       AssertEquals("BitwiseOr method 2" + Error,
+                       Assertion.AssertEquals("BitwiseOr method 2" + Error,
                                     (byte)63, SqlByte.BitwiseOr(TestByte1, TestByte62).Value);
-                       AssertEquals("BitwiseOr method 3" + Error,
+                       Assertion.AssertEquals("BitwiseOr method 3" + Error,
                                     (byte)62, SqlByte.BitwiseOr(TestByte62, TestByte2).Value);
-                       AssertEquals("BitwiseOr method 4" + Error,
+                       Assertion.AssertEquals("BitwiseOr method 4" + Error,
                                     (byte)255, SqlByte.BitwiseOr(TestByte1, TestByte255).Value);
-                       AssertEquals("BitwiseOr method 5" + Error,
+                       Assertion.AssertEquals("BitwiseOr method 5" + Error,
                                     (byte)255, SqlByte.BitwiseOr(TestByte62, TestByte255).Value);
 
                }
 
-
-               public void TestCompareTo()
+               [Test]
+               public void CompareTo()
                {
 
                        SqlByte TestByte13 = new SqlByte(13);
@@ -140,20 +130,21 @@ namespace MonoTests.System.Data.SqlTypes
 
                        SqlString TestString = new SqlString("This is a test");
                        
-                       Assert("CompareTo method 1" + Error, TestByte13.CompareTo(TestByte10) > 0);
-                       Assert("CompareTo method 2" + Error, TestByte10.CompareTo(TestByte13) < 0);
-                       Assert("CompareTo method 3" + Error, TestByte10.CompareTo(TestByte10II) == 0);
+                       Assertion.Assert("CompareTo method 1" + Error, TestByte13.CompareTo(TestByte10) > 0);
+                       Assertion.Assert("CompareTo method 2" + Error, TestByte10.CompareTo(TestByte13) < 0);
+                       Assertion.Assert("CompareTo method 3" + Error, TestByte10.CompareTo(TestByte10II) == 0);
                        
                        try {
                                TestByte13.CompareTo(TestString);
-                               Fail("CompareTo method 4" + Error);
+                               Assertion.Fail("CompareTo method 4" + Error);
                        } catch(Exception e) {
-                               AssertEquals("Parse method 5" + Error, typeof(ArgumentException), e.GetType());
+                               Assertion.AssertEquals("Parse method 5" + Error, typeof(ArgumentException), e.GetType());
                        }
                        
                }
 
-               public void TestDivideMethod()
+               [Test]
+               public void DivideMethod()
                {
 
                        SqlByte TestByte13 = new SqlByte(13);
@@ -163,28 +154,29 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlByte TestByte180 = new SqlByte(180);
                        SqlByte TestByte3 = new SqlByte(3);
 
-                       AssertEquals("Divide method 1" + Error,
+                       Assertion.AssertEquals("Divide method 1" + Error,
                                     (byte)6, SqlByte.Divide(TestByte13, TestByte2).Value);
-                       AssertEquals("Divide method 2" + Error,
+                       Assertion.AssertEquals("Divide method 2" + Error,
                                     (byte)90, SqlByte.Divide(TestByte180, TestByte2).Value);
-                       AssertEquals("Divide method 3" + Error,
+                       Assertion.AssertEquals("Divide method 3" + Error,
                                     (byte)60, SqlByte.Divide(TestByte180, TestByte3).Value);
-                       AssertEquals("Divide method 4" + Error,
+                       Assertion.AssertEquals("Divide method 4" + Error,
                                     (byte)0, SqlByte.Divide(TestByte13, TestByte180).Value);
-                       AssertEquals("Divide method 5" + Error,
+                       Assertion.AssertEquals("Divide method 5" + Error,
                                     (byte)0, SqlByte.Divide(TestByte13, TestByte180).Value);
 
                        try {
                                SqlByte.Divide(TestByte13, TestByte0);
-                               Fail ("Divide method 6" + Error);
+                               Assertion.Fail ("Divide method 6" + Error);
                        } catch(Exception e) {
-                               AssertEquals("DivideByZeroException", typeof(DivideByZeroException), e.GetType());
+                               Assertion.AssertEquals("DivideByZeroException", typeof(DivideByZeroException), e.GetType());
 
                        }
 
                }
 
-               public void TestEqualsMethod()
+               [Test]
+               public void EqualsMethod()
                {
 
                        SqlByte TestByte0 = new SqlByte(0);
@@ -192,376 +184,400 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlByte TestByte180 = new SqlByte(180);
                        SqlByte TestByte180II = new SqlByte(180);
 
-                       Assert("Equals method 1" + Error, !TestByte0.Equals(TestByte158));
-                       Assert("Equals method 2" + Error, !TestByte158.Equals(TestByte180));
-                       Assert("Equals method 3" + Error, !TestByte180.Equals(new SqlString("TEST")));
-                       Assert("Equals method 4" + Error, TestByte180.Equals(TestByte180II));
+                       Assertion.Assert("Equals method 1" + Error, !TestByte0.Equals(TestByte158));
+                       Assertion.Assert("Equals method 2" + Error, !TestByte158.Equals(TestByte180));
+                       Assertion.Assert("Equals method 3" + Error, !TestByte180.Equals(new SqlString("TEST")));
+                       Assertion.Assert("Equals method 4" + Error, TestByte180.Equals(TestByte180II));
 
                }
 
-               public void TestStaticEqualsMethod()
+               [Test]
+               public void StaticEqualsMethod()
                {
 
                        SqlByte TestByte34 = new SqlByte(34);
                        SqlByte TestByte34II = new SqlByte(34);
                        SqlByte TestByte15 = new SqlByte(15);
                        
-                       Assert("static Equals method 1" + Error, SqlByte.Equals(TestByte34, TestByte34II).Value);
-                       Assert("static Equals method 2" + Error, !SqlByte.Equals(TestByte34, TestByte15).Value);
-                       Assert("static Equals method 3" + Error, !SqlByte.Equals(TestByte15, TestByte34II).Value);
+                       Assertion.Assert("static Equals method 1" + Error, SqlByte.Equals(TestByte34, TestByte34II).Value);
+                       Assertion.Assert("static Equals method 2" + Error, !SqlByte.Equals(TestByte34, TestByte15).Value);
+                       Assertion.Assert("static Equals method 3" + Error, !SqlByte.Equals(TestByte15, TestByte34II).Value);
 
                }
 
-               public void TestGetHashCode()
+               [Test]
+               public void GetHashCodeTest()
                {
 
                        SqlByte TestByte15 = new SqlByte(15);
                        SqlByte TestByte216 = new SqlByte(216);
                        
-                       AssertEquals("GetHashCode method 1" + Error, 15, TestByte15.GetHashCode());
-                       AssertEquals("GetHashCode method 2" + Error, 216, TestByte216.GetHashCode());
+                       Assertion.AssertEquals("GetHashCode method 1" + Error, 15, TestByte15.GetHashCode());
+                       Assertion.AssertEquals("GetHashCode method 2" + Error, 216, TestByte216.GetHashCode());
 
                }
 
-               public void TestGetType()
+               [Test]
+               public void GetTypeTest()
                {
 
                        SqlByte TestByte = new SqlByte(84);
 
-                       AssertEquals("GetType method" + Error,
+                       Assertion.AssertEquals("GetType method" + Error,
                                     "System.Data.SqlTypes.SqlByte", TestByte.GetType().ToString());
                        
                }
 
-               public void TestGreaterThan()
+               [Test]
+               public void GreaterThan()
                {
 
                        SqlByte TestByte10 = new SqlByte(10);
                        SqlByte TestByte10II = new SqlByte(10);
                        SqlByte TestByte110 = new SqlByte(110);
 
-                       Assert("GreaterThan method 1" + Error, !SqlByte.GreaterThan(TestByte10, TestByte110).Value);
-                       Assert("GreaterThan method 2" + Error, SqlByte.GreaterThan(TestByte110, TestByte10).Value);
-                       Assert("GreaterThan method 3" + Error, !SqlByte.GreaterThan(TestByte10II, TestByte10).Value);
+                       Assertion.Assert("GreaterThan method 1" + Error, !SqlByte.GreaterThan(TestByte10, TestByte110).Value);
+                       Assertion.Assert("GreaterThan method 2" + Error, SqlByte.GreaterThan(TestByte110, TestByte10).Value);
+                       Assertion.Assert("GreaterThan method 3" + Error, !SqlByte.GreaterThan(TestByte10II, TestByte10).Value);
 
                }
 
-               public void TestGreaterThanOrEqual()
+               [Test]
+               public void GreaterThanOrEqual()
                {
 
                        SqlByte TestByte10 = new SqlByte(10);
                        SqlByte TestByte10II = new SqlByte(10);
                        SqlByte TestByte110 = new SqlByte(110);
 
-                       Assert("GreaterThanOrEqual method 1" + Error,
+                       Assertion.Assert("GreaterThanOrEqual method 1" + Error,
                               !SqlByte.GreaterThanOrEqual(TestByte10, TestByte110).Value);
 
-                       Assert("GreaterThanOrEqual method 2" + Error,
+                       Assertion.Assert("GreaterThanOrEqual method 2" + Error,
                               SqlByte.GreaterThanOrEqual(TestByte110, TestByte10).Value);
 
-                       Assert("GreaterThanOrEqual method 3" + Error,
+                       Assertion.Assert("GreaterThanOrEqual method 3" + Error,
                               SqlByte.GreaterThanOrEqual(TestByte10II, TestByte10).Value);
 
                }
 
-               public void TestLessThan()
+               [Test]
+               public void LessThan()
                {
 
                        SqlByte TestByte10 = new SqlByte(10);
                        SqlByte TestByte10II = new SqlByte(10);
                        SqlByte TestByte110 = new SqlByte(110);
 
-                       Assert("LessThan method 1" + Error,
+                       Assertion.Assert("LessThan method 1" + Error,
                               SqlByte.LessThan(TestByte10, TestByte110).Value);
 
-                       Assert("LessThan method 2" + Error,
+                       Assertion.Assert("LessThan method 2" + Error,
                               !SqlByte.LessThan(TestByte110, TestByte10).Value);
 
-                       Assert("LessThan method 3" + Error,
+                       Assertion.Assert("LessThan method 3" + Error,
                               !SqlByte.LessThan(TestByte10II, TestByte10).Value);
 
                }
 
-               public void TestLessThanOrEqual()
+               [Test]
+               public void LessThanOrEqual()
                {
 
                        SqlByte TestByte10 = new SqlByte(10);
                        SqlByte TestByte10II = new SqlByte(10);
                        SqlByte TestByte110 = new SqlByte(110);
 
-                       Assert("LessThanOrEqual method 1" + Error,
+                       Assertion.Assert("LessThanOrEqual method 1" + Error,
                               SqlByte.LessThanOrEqual(TestByte10, TestByte110).Value);
 
-                       Assert("LessThanOrEqual method 2" + Error,
+                       Assertion.Assert("LessThanOrEqual method 2" + Error,
                               !SqlByte.LessThanOrEqual(TestByte110, TestByte10).Value);
 
-                       Assert("LessThanOrEqual method 3" + Error,
+                       Assertion.Assert("LessThanOrEqual method 3" + Error,
                               SqlByte.LessThanOrEqual(TestByte10II, TestByte10).Value);
 
-                       Assert("LessThanOrEqual method 4" + Error,
+                       Assertion.Assert("LessThanOrEqual method 4" + Error,
                               SqlByte.LessThanOrEqual(TestByte10II, SqlByte.Null).IsNull);
                }
 
-               public void TestMod()
+               [Test]
+               public void Mod()
                {
 
                        SqlByte TestByte132 = new SqlByte(132);
                        SqlByte TestByte10 = new SqlByte(10);
                        SqlByte TestByte200 = new SqlByte(200);
 
-                       AssertEquals("Mod method 1" + Error, (SqlByte)2, SqlByte.Mod(TestByte132, TestByte10));
-                       AssertEquals("Mod method 2" + Error,  (SqlByte)10, SqlByte.Mod(TestByte10, TestByte200));
-                       AssertEquals("Mod method 3" + Error,  (SqlByte)0, SqlByte.Mod(TestByte200, TestByte10));
-                       AssertEquals("Mod method 4" + Error,  (SqlByte)68, SqlByte.Mod(TestByte200, TestByte132));
+                       Assertion.AssertEquals("Mod method 1" + Error, (SqlByte)2, SqlByte.Mod(TestByte132, TestByte10));
+                       Assertion.AssertEquals("Mod method 2" + Error,  (SqlByte)10, SqlByte.Mod(TestByte10, TestByte200));
+                       Assertion.AssertEquals("Mod method 3" + Error,  (SqlByte)0, SqlByte.Mod(TestByte200, TestByte10));
+                       Assertion.AssertEquals("Mod method 4" + Error,  (SqlByte)68, SqlByte.Mod(TestByte200, TestByte132));
 
                }
 
-               public void TestMultiply()
+               [Test]
+               public void Multiply()
                {
 
                        SqlByte TestByte12 = new SqlByte (12);
                        SqlByte TestByte2 = new SqlByte (2);
                        SqlByte TestByte128 = new SqlByte (128);
 
-                       AssertEquals ("Multiply method 1" + Error,
+                       Assertion.AssertEquals ("Multiply method 1" + Error,
                                      (byte)24, SqlByte.Multiply(TestByte12, TestByte2).Value);
-                       AssertEquals ("Multiply method 2" + Error,
+                       Assertion.AssertEquals ("Multiply method 2" + Error,
                                      (byte)24, SqlByte.Multiply(TestByte2, TestByte12).Value);
                        
                        try {
                                SqlByte.Multiply(TestByte128, TestByte2);
-                               Fail ("Multiply method 3");
+                               Assertion.Fail ("Multiply method 3");
                        } catch(Exception e) {
 
-                               AssertEquals("OverflowException" + Error, typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException" + Error, typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestNotEquals()
+               [Test]
+               public void NotEquals()
                {
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte128 = new SqlByte(128);
                        SqlByte TestByte128II = new SqlByte(128);
 
-                       Assert("NotEquals method 1" + Error, SqlByte.NotEquals(TestByte12, TestByte128).Value);
-                       Assert("NotEquals method 2" + Error, SqlByte.NotEquals(TestByte128, TestByte12).Value);
-                       Assert("NotEquals method 3" + Error, SqlByte.NotEquals(TestByte128II, TestByte12).Value);
-                       Assert("NotEquals method 4" + Error, !SqlByte.NotEquals(TestByte128II, TestByte128).Value);
-                       Assert("NotEquals method 5" + Error, !SqlByte.NotEquals(TestByte128, TestByte128II).Value);
+                       Assertion.Assert("NotEquals method 1" + Error, SqlByte.NotEquals(TestByte12, TestByte128).Value);
+                       Assertion.Assert("NotEquals method 2" + Error, SqlByte.NotEquals(TestByte128, TestByte12).Value);
+                       Assertion.Assert("NotEquals method 3" + Error, SqlByte.NotEquals(TestByte128II, TestByte12).Value);
+                       Assertion.Assert("NotEquals method 4" + Error, !SqlByte.NotEquals(TestByte128II, TestByte128).Value);
+                       Assertion.Assert("NotEquals method 5" + Error, !SqlByte.NotEquals(TestByte128, TestByte128II).Value);
 
                }
 
-               public void TestOnesComplement()
+               [Test]
+               public void OnesComplement()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte128 = new SqlByte(128);
 
-                       AssertEquals("OnesComplement method 1" + Error,
+                       Assertion.AssertEquals("OnesComplement method 1" + Error,
                                     (SqlByte)243, SqlByte.OnesComplement(TestByte12));
-                       AssertEquals("OnesComplement method 2" + Error,
+                       Assertion.AssertEquals("OnesComplement method 2" + Error,
                                     (SqlByte)127, SqlByte.OnesComplement(TestByte128));
 
                }
 
-               public void TestParse()
+               [Test]
+               public void Parse()
                {
                        try {
                                SqlByte.Parse(null);
-                               Fail("Parse method 2" + Error);
+                               Assertion.Fail("Parse method 2" + Error);
                        }
                        catch (Exception e) {
-                               AssertEquals("Parse method 3" + Error, typeof(ArgumentNullException), e.GetType());
+                               Assertion.AssertEquals("Parse method 3" + Error, typeof(ArgumentNullException), e.GetType());
                        }
 
                        try {
                                SqlByte.Parse("not-a-number");
-                               Fail("Parse method 4" + Error);
+                               Assertion.Fail("Parse method 4" + Error);
                        }
                        catch (Exception e) {
-                               AssertEquals("Parse method 5" + Error, typeof(FormatException), e.GetType());
+                               Assertion.AssertEquals("Parse method 5" + Error, typeof(FormatException), e.GetType());
                        }
 
                        try {
                                int OverInt = (int)SqlByte.MaxValue + 1;
                                SqlByte.Parse(OverInt.ToString());
-                               Fail("Parse method 6" + Error);
+                               Assertion.Fail("Parse method 6" + Error);
                        }
                        catch (Exception e) {
-                               AssertEquals("Parse method 7" + Error, typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("Parse method 7" + Error, typeof(OverflowException), e.GetType());
                        }
 
-                       AssertEquals("Parse method 8" + Error, (byte)150, SqlByte.Parse("150").Value);
+                       Assertion.AssertEquals("Parse method 8" + Error, (byte)150, SqlByte.Parse("150").Value);
 
                }
 
-               public void TestSubtract()
+               [Test]
+               public void Subtract()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte128 = new SqlByte(128);
-                       AssertEquals("Subtract method 1" + Error, (byte)116, SqlByte.Subtract(TestByte128, TestByte12).Value);
+                       Assertion.AssertEquals("Subtract method 1" + Error, (byte)116, SqlByte.Subtract(TestByte128, TestByte12).Value);
 
                        try {
                                SqlByte.Subtract(TestByte12, TestByte128);
                        } catch(Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestToSqlBoolean()
+               [Test]
+               public void ToSqlBoolean()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByteNull = SqlByte.Null;
 
-                       Assert("ToSqlBoolean method 1" + Error, TestByte12.ToSqlBoolean().Value);
-                       Assert("ToSqlBoolean method 2" + Error, !TestByte0.ToSqlBoolean().Value);
-                       Assert("ToSqlBoolean method 3" + Error, TestByteNull.ToSqlBoolean().IsNull);
+                       Assertion.Assert("ToSqlBoolean method 1" + Error, TestByte12.ToSqlBoolean().Value);
+                       Assertion.Assert("ToSqlBoolean method 2" + Error, !TestByte0.ToSqlBoolean().Value);
+                       Assertion.Assert("ToSqlBoolean method 3" + Error, TestByteNull.ToSqlBoolean().IsNull);
                }
 
-               public void TestToSqlDecimal()
+               [Test]
+               public void ToSqlDecimal()
                {
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
 
-                       AssertEquals("ToSqlDecimal method 1" + Error,
+                       Assertion.AssertEquals("ToSqlDecimal method 1" + Error,
                                     (decimal)12, TestByte12.ToSqlDecimal().Value);
-                       AssertEquals("ToSqlDecimal method 2" + Error,
+                       Assertion.AssertEquals("ToSqlDecimal method 2" + Error,
                                     (decimal)0, TestByte0.ToSqlDecimal().Value);
-                       AssertEquals("ToSqlDecimal method 3" + Error,
+                       Assertion.AssertEquals("ToSqlDecimal method 3" + Error,
                                     (decimal)228, TestByte228.ToSqlDecimal().Value);
                        
                }
 
-               public void TestToSqlDouble()
+               [Test]
+               public void ToSqlDouble()
                {
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
 
-                       AssertEquals("ToSqlDouble method 1" + Error,
+                       Assertion.AssertEquals("ToSqlDouble method 1" + Error,
                                     (double)12, TestByte12.ToSqlDouble().Value);
-                       AssertEquals("ToSqlDouble method 2" + Error,
+                       Assertion.AssertEquals("ToSqlDouble method 2" + Error,
                                     (double)0, TestByte0.ToSqlDouble().Value);
-                       AssertEquals("ToSqlDouble method 3" + Error,
+                       Assertion.AssertEquals("ToSqlDouble method 3" + Error,
                                     (double)228, TestByte228.ToSqlDouble().Value);
 
                }
 
-               public void TestToSqlInt16()
+               [Test]
+               public void ToSqlInt16()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
 
-                       AssertEquals("ToSqInt16 method 1" + Error,
+                       Assertion.AssertEquals("ToSqInt16 method 1" + Error,
                                     (short)12, TestByte12.ToSqlInt16().Value);
-                       AssertEquals("ToSqlInt16 method 2" + Error,
+                       Assertion.AssertEquals("ToSqlInt16 method 2" + Error,
                                     (short)0, TestByte0.ToSqlInt16().Value);
-                       AssertEquals("ToSqlInt16 method 3" + Error,
+                       Assertion.AssertEquals("ToSqlInt16 method 3" + Error,
                                     (short)228, TestByte228.ToSqlInt16().Value);
                }
 
-               public void TestToSqlInt32()
+               [Test]
+               public void ToSqlInt32()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
                        
-                       AssertEquals("ToSqInt32 method 1" + Error,
+                       Assertion.AssertEquals("ToSqInt32 method 1" + Error,
                                     (int)12, TestByte12.ToSqlInt32().Value);
-                       AssertEquals("ToSqlInt32 method 2" + Error,
+                       Assertion.AssertEquals("ToSqlInt32 method 2" + Error,
                                     (int)0, TestByte0.ToSqlInt32().Value);
-                       AssertEquals("ToSqlInt32 method 3" + Error,
+                       Assertion.AssertEquals("ToSqlInt32 method 3" + Error,
                                     (int)228, TestByte228.ToSqlInt32().Value);
 
                }
 
-               public void TestToSqlInt64()
+               [Test]
+               public void ToSqlInt64()
                {
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
 
-                       AssertEquals("ToSqInt64 method " + Error,
+                       Assertion.AssertEquals("ToSqInt64 method " + Error,
                                     (long)12, TestByte12.ToSqlInt64().Value);
-                       AssertEquals("ToSqlInt64 method 2" + Error,
+                       Assertion.AssertEquals("ToSqlInt64 method 2" + Error,
                                     (long)0, TestByte0.ToSqlInt64().Value);
-                       AssertEquals("ToSqlInt64 method 3" + Error,
+                       Assertion.AssertEquals("ToSqlInt64 method 3" + Error,
                                     (long)228, TestByte228.ToSqlInt64().Value);
 
                }
 
-               public void TestToSqlMoney()
+               [Test]
+               public void ToSqlMoney()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
 
-                       AssertEquals("ToSqMoney method 1" + Error,
+                       Assertion.AssertEquals("ToSqMoney method 1" + Error,
                                     (decimal)12, TestByte12.ToSqlMoney().Value);
-                       AssertEquals("ToSqlMoney method 2" + Error,
+                       Assertion.AssertEquals("ToSqlMoney method 2" + Error,
                                     (decimal)0, TestByte0.ToSqlMoney().Value);
-                       AssertEquals("ToSqlMoney method 3" + Error,
+                       Assertion.AssertEquals("ToSqlMoney method 3" + Error,
                                     (decimal)228, TestByte228.ToSqlMoney().Value);
                }
 
-               public void TestToSqlSingle()
+               [Test]
+               public void ToSqlSingle()
                {
            
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
 
-                       AssertEquals("ToSqlSingle method 1" + Error,
+                       Assertion.AssertEquals("ToSqlSingle method 1" + Error,
                                     (float)12, TestByte12.ToSqlSingle().Value);
-                       AssertEquals("ToSqlSingle method 2" + Error,
+                       Assertion.AssertEquals("ToSqlSingle method 2" + Error,
                                     (float)0, TestByte0.ToSqlSingle().Value);
-                       AssertEquals("ToSqlSingle method 3" + Error,
+                       Assertion.AssertEquals("ToSqlSingle method 3" + Error,
                                     (float)228, TestByte228.ToSqlSingle().Value);
 
                }
 
-               public void TestToSqlString()
+               [Test]
+               public void ToSqlString()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
 
-                       AssertEquals("ToSqlString method 1" + Error,
+                       Assertion.AssertEquals("ToSqlString method 1" + Error,
                                     "12", TestByte12.ToSqlString().Value);
-                       AssertEquals("ToSqlString method 2" + Error,
+                       Assertion.AssertEquals("ToSqlString method 2" + Error,
                                     "0", TestByte0.ToSqlString().Value);
-                       AssertEquals("ToSqlString method 3" + Error,
+                       Assertion.AssertEquals("ToSqlString method 3" + Error,
                                     "228", TestByte228.ToSqlString().Value);
 
                }
 
-               public void TestToString()
+               [Test]
+               public void ToStringTest()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte0 = new SqlByte(0);
                        SqlByte TestByte228 = new SqlByte(228);
                        
-                       AssertEquals("ToString method 1" + Error,
+                       Assertion.AssertEquals("ToString method 1" + Error,
                                     "12", TestByte12.ToString());
-                       AssertEquals("ToString method 2" + Error,
+                       Assertion.AssertEquals("ToString method 2" + Error,
                                     "0", TestByte0.ToString());
-                       AssertEquals("ToString method 3" + Error,
+                       Assertion.AssertEquals("ToString method 3" + Error,
                                     "228", TestByte228.ToString());
                }
 
+               [Test]
                public void TestXor()
                {
 
@@ -569,55 +585,59 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlByte TestByte58 = new SqlByte(58);
                        SqlByte TestByte130 = new SqlByte(130);
 
-                       AssertEquals("Xor method 1" + Error, (byte)52, SqlByte.Xor(TestByte14, TestByte58).Value);
-                       AssertEquals("Xor method 2" + Error, (byte)140, SqlByte.Xor(TestByte14, TestByte130).Value);
-                       AssertEquals("Xor method 3" + Error, (byte)184, SqlByte.Xor(TestByte58, TestByte130).Value);
+                       Assertion.AssertEquals("Xor method 1" + Error, (byte)52, SqlByte.Xor(TestByte14, TestByte58).Value);
+                       Assertion.AssertEquals("Xor method 2" + Error, (byte)140, SqlByte.Xor(TestByte14, TestByte130).Value);
+                       Assertion.AssertEquals("Xor method 3" + Error, (byte)184, SqlByte.Xor(TestByte58, TestByte130).Value);
 
                }
 
                // OPERATORS
                
-               public void TestAdditionOperator()
+               [Test]
+               public void AdditionOperator()
                {
 
                        SqlByte TestByte24 = new SqlByte(24);
                        SqlByte TestByte64 = new SqlByte(64);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       AssertEquals("Addition operator" + Error, (SqlByte)88,TestByte24 + TestByte64);
+                       Assertion.AssertEquals("Addition operator" + Error, (SqlByte)88,TestByte24 + TestByte64);
 
                        try {
                                SqlByte result = TestByte64 + TestByte255;
-                               Fail("Addition operator 1" + Error);
+                               Assertion.Fail("Addition operator 1" + Error);
                        } catch (Exception e) {
-                               AssertEquals("Addition operator 2" + Error, typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("Addition operator 2" + Error, typeof(OverflowException), e.GetType());
                        }
                        
                }
 
-               public void TestBitwiseAndOperator()
+               [Test]
+               public void BitwiseAndOperator()
                {
 
                        SqlByte TestByte2 = new SqlByte(2);
                        SqlByte TestByte4 = new SqlByte(4);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       AssertEquals("Bitwise and operator 1" + Error, (SqlByte)0,TestByte2 & TestByte4);
-                       AssertEquals("Bitwise and operaror 2" + Error, (SqlByte)2, TestByte2 & TestByte255);
+                       Assertion.AssertEquals("Bitwise and operator 1" + Error, (SqlByte)0,TestByte2 & TestByte4);
+                       Assertion.AssertEquals("Bitwise and operaror 2" + Error, (SqlByte)2, TestByte2 & TestByte255);
                }
 
-               public void TestBitwiseOrOperator()
+               [Test]
+               public void BitwiseOrOperator()
                {
 
                        SqlByte TestByte2 = new SqlByte(2);
                        SqlByte TestByte4 = new SqlByte(4);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       AssertEquals("Bitwise or operator 1" + Error, (SqlByte)6,TestByte2 | TestByte4);
-                       AssertEquals("Bitwise or operaror 2" + Error, (SqlByte)255, TestByte2 | TestByte255);
+                       Assertion.AssertEquals("Bitwise or operator 1" + Error, (SqlByte)6,TestByte2 | TestByte4);
+                       Assertion.AssertEquals("Bitwise or operaror 2" + Error, (SqlByte)255, TestByte2 | TestByte255);
                }
 
-               public void TestDivisionOperator()
+               [Test]
+               public void DivisionOperator()
                {
 
                        SqlByte TestByte2 = new SqlByte(2);
@@ -625,44 +645,47 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlByte TestByte255 = new SqlByte(255);
                        SqlByte TestByte0 = new SqlByte(0);
 
-                       AssertEquals("Division operator 1" + Error, (SqlByte)2,TestByte4 / TestByte2);
-                       AssertEquals("Division operaror 2" + Error, (SqlByte)127, TestByte255 / TestByte2);
+                       Assertion.AssertEquals("Division operator 1" + Error, (SqlByte)2,TestByte4 / TestByte2);
+                       Assertion.AssertEquals("Division operaror 2" + Error, (SqlByte)127, TestByte255 / TestByte2);
 
                        try {
                                TestByte2 = TestByte255 / TestByte0;
-                               Fail("Division operator 3" + Error);
+                               Assertion.Fail("Division operator 3" + Error);
                        } catch (Exception e) {
-                               AssertEquals("DivideByZeroException", typeof(DivideByZeroException), e.GetType());
+                               Assertion.AssertEquals("DivideByZeroException", typeof(DivideByZeroException), e.GetType());
                        }
 
                }
 
-               public void TestEqualityOperator()
+               [Test]
+               public void EqualityOperator()
                {
 
                        SqlByte TestByte15 = new SqlByte(15);
                        SqlByte TestByte15II = new SqlByte(15);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       Assert("== operator" + Error, (TestByte15 == TestByte15II).Value);
-                       Assert("== operator 2" + Error, !(TestByte15 == TestByte255).Value);
-                       Assert("!= operator" + Error, !(TestByte15 != TestByte15II).Value);
-                       Assert("!= operator 2" + Error, (TestByte15 != TestByte255).Value);
+                       Assertion.Assert("== operator" + Error, (TestByte15 == TestByte15II).Value);
+                       Assertion.Assert("== operator 2" + Error, !(TestByte15 == TestByte255).Value);
+                       Assertion.Assert("!= operator" + Error, !(TestByte15 != TestByte15II).Value);
+                       Assertion.Assert("!= operator 2" + Error, (TestByte15 != TestByte255).Value);
 
                }
 
-               public void TestExclusiveOrOperator()
+               [Test]
+               public void ExclusiveOrOperator()
                {
 
                        SqlByte TestByte15 = new SqlByte(15);
                        SqlByte TestByte10 = new SqlByte(10);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       AssertEquals("Exclusive or operator 1" + Error, (SqlByte)5, (TestByte15 ^ TestByte10));
-                       AssertEquals("Exclusive or operator 2" + Error, (SqlByte)240, (TestByte15 ^ TestByte255));
+                       Assertion.AssertEquals("Exclusive or operator 1" + Error, (SqlByte)5, (TestByte15 ^ TestByte10));
+                       Assertion.AssertEquals("Exclusive or operator 2" + Error, (SqlByte)240, (TestByte15 ^ TestByte255));
                }
 
-               public void TestThanOrEqualOperators()
+               [Test]
+               public void ThanOrEqualOperators()
                {
 
                        SqlByte TestByte165 = new SqlByte(165);
@@ -670,237 +693,250 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlByte TestByte100II = new SqlByte(100);
                        SqlByte TestByte255 = new SqlByte(255);
 
-                       Assert("> operator 1" + Error, (TestByte165 > TestByte100).Value);
-                       Assert("> operator 2" + Error, !(TestByte165 > TestByte255).Value);
-                       Assert("> operator 3" + Error, !(TestByte100 > TestByte100II).Value);
-                       Assert(">= operator 1" + Error, !(TestByte165 >= TestByte255).Value);
-                       Assert(">= operator 2" + Error, (TestByte255 >= TestByte165).Value);
-                       Assert(">= operator 3" + Error, (TestByte100 >= TestByte100II).Value);
+                       Assertion.Assert("> operator 1" + Error, (TestByte165 > TestByte100).Value);
+                       Assertion.Assert("> operator 2" + Error, !(TestByte165 > TestByte255).Value);
+                       Assertion.Assert("> operator 3" + Error, !(TestByte100 > TestByte100II).Value);
+                       Assertion.Assert(">= operator 1" + Error, !(TestByte165 >= TestByte255).Value);
+                       Assertion.Assert(">= operator 2" + Error, (TestByte255 >= TestByte165).Value);
+                       Assertion.Assert(">= operator 3" + Error, (TestByte100 >= TestByte100II).Value);
 
-                       Assert("< operator 1" + Error, !(TestByte165 < TestByte100).Value);
-                       Assert("< operator 2" + Error, (TestByte165 < TestByte255).Value);
-                       Assert("< operator 3" + Error, !(TestByte100 < TestByte100II).Value);
-                       Assert("<= operator 1" + Error, (TestByte165 <= TestByte255).Value);
-                       Assert("<= operator 2" + Error, !(TestByte255 <= TestByte165).Value);
-                       Assert("<= operator 3" + Error, (TestByte100 <= TestByte100II).Value);
+                       Assertion.Assert("< operator 1" + Error, !(TestByte165 < TestByte100).Value);
+                       Assertion.Assert("< operator 2" + Error, (TestByte165 < TestByte255).Value);
+                       Assertion.Assert("< operator 3" + Error, !(TestByte100 < TestByte100II).Value);
+                       Assertion.Assert("<= operator 1" + Error, (TestByte165 <= TestByte255).Value);
+                       Assertion.Assert("<= operator 2" + Error, !(TestByte255 <= TestByte165).Value);
+                       Assertion.Assert("<= operator 3" + Error, (TestByte100 <= TestByte100II).Value);
                }
 
-
-               public void TestMultiplicationOperator()
+               [Test]
+               public void MultiplicationOperator()
                {
 
                        SqlByte TestByte4 = new SqlByte(4);
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte128 = new SqlByte(128);
 
-                       AssertEquals("Multiplication operator 1" + Error, (SqlByte)48, TestByte4 * TestByte12);
+                       Assertion.AssertEquals("Multiplication operator 1" + Error, (SqlByte)48, TestByte4 * TestByte12);
                        try {
                                SqlByte test = (TestByte128 * TestByte4);
-                               Fail("Multiplication operator 2" + Error);
+                               Assertion.Fail("Multiplication operator 2" + Error);
                        } catch (Exception e) {
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestOnesComplementOperator()
+               [Test]
+               public void OnesComplementOperator()
                {
 
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte128 = new SqlByte(128);
 
-                       AssertEquals("OnesComplement operator 1" + Error,
+                       Assertion.AssertEquals("OnesComplement operator 1" + Error,
                                     (SqlByte)243, ~TestByte12);
-                       AssertEquals("OnesComplement operator 2" + Error,
+                       Assertion.AssertEquals("OnesComplement operator 2" + Error,
                                     (SqlByte)127, ~TestByte128);
 
                }
 
-               public void TestSubtractionOperator()
+               [Test]
+               public void SubtractionOperator()
                {
 
                        SqlByte TestByte4 = new SqlByte(4);
                        SqlByte TestByte12 = new SqlByte(12);
                        SqlByte TestByte128 = new SqlByte(128);
 
-                       AssertEquals("Subtraction operator 1" + Error, (SqlByte)8, TestByte12 - TestByte4);
+                       Assertion.AssertEquals("Subtraction operator 1" + Error, (SqlByte)8, TestByte12 - TestByte4);
                        try {
                                
                                SqlByte test = TestByte4 - TestByte128;
-                               Fail("Sybtraction operator 2" + Error);
+                               Assertion.Fail("Sybtraction operator 2" + Error);
 
                        } catch (Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestSqlBooleanToSqlByte()
+               [Test]
+               public void SqlBooleanToSqlByte()
                {
                        SqlBoolean TestBoolean = new SqlBoolean(true);
                        SqlByte TestByte;
 
                        TestByte = (SqlByte)TestBoolean;
                        
-                       AssertEquals("SqlBooleanToSqlByte op" + Error,
+                       Assertion.AssertEquals("SqlBooleanToSqlByte op" + Error,
                                     (byte)1, TestByte.Value);
                }
 
-               public void TestSqlByteToByte()
+               [Test]
+               public void SqlByteToByte()
                {
                        SqlByte TestByte = new SqlByte(12);
                        byte test = (byte)TestByte;
-                       AssertEquals("SqlByteToByte" + Error, (byte)12, test);
+                       Assertion.AssertEquals("SqlByteToByte" + Error, (byte)12, test);
                }
 
-               public void TestSqlDecimalToSqlByte()
+               [Test]
+               public void SqlDecimalToSqlByte()
                {
                        SqlDecimal TestDecimal64 = new SqlDecimal(64);
                        SqlDecimal TestDecimal900 = new SqlDecimal(900);
 
-                       AssertEquals("SqlDecimalToByte" + Error, (byte)64, ((SqlByte)TestDecimal64).Value);
+                       Assertion.AssertEquals("SqlDecimalToByte" + Error, (byte)64, ((SqlByte)TestDecimal64).Value);
 
                        try {
                                SqlByte test = (SqlByte)TestDecimal900;
-                               Fail("SqlDecimalToByte 2" + Error);
+                               Assertion.Fail("SqlDecimalToByte 2" + Error);
                        } catch (Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestSqlDoubleToSqlByte()
+               [Test]
+               public void SqlDoubleToSqlByte()
                {
                        SqlDouble TestDouble64 = new SqlDouble(64);
                        SqlDouble TestDouble900 = new SqlDouble(900);
 
-                       AssertEquals("SqlDecimalToByte" + Error, (byte)64, ((SqlByte)TestDouble64).Value);
+                       Assertion.AssertEquals("SqlDecimalToByte" + Error, (byte)64, ((SqlByte)TestDouble64).Value);
 
                        try {
                                SqlByte test = (SqlByte)TestDouble900;
-                               Fail("SqlDoubleToByte 2" + Error);
+                               Assertion.Fail("SqlDoubleToByte 2" + Error);
                        } catch (Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestSqlInt16ToSqlByte()
+               [Test]
+               public void SqlInt16ToSqlByte()
                {
                        SqlInt16 TestInt1664 = new SqlInt16(64);
                        SqlInt16 TestInt16900 = new SqlInt16(900);
                        
-                       AssertEquals("SqlInt16ToByte" + Error, (byte)64, ((SqlByte)TestInt1664).Value);
+                       Assertion.AssertEquals("SqlInt16ToByte" + Error, (byte)64, ((SqlByte)TestInt1664).Value);
 
                        try {
                                SqlByte test = (SqlByte)TestInt16900;
-                               Fail("SqlInt16ToByte 2" + Error);
+                               Assertion.Fail("SqlInt16ToByte 2" + Error);
                        } catch (Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestSqlInt32ToSqlByte()
+               [Test]
+               public void SqlInt32ToSqlByte()
                {
                        SqlInt32 TestInt3264 = new SqlInt32(64);
                        SqlInt32 TestInt32900 = new SqlInt32(900);
 
-                       AssertEquals("SqlInt32ToByte" + Error, (byte)64, ((SqlByte)TestInt3264).Value);
+                       Assertion.AssertEquals("SqlInt32ToByte" + Error, (byte)64, ((SqlByte)TestInt3264).Value);
 
                        try {
                                SqlByte test = (SqlByte)TestInt32900;
-                               Fail("SqlInt32ToByte 2" + Error);
+                               Assertion.Fail("SqlInt32ToByte 2" + Error);
                        } catch (Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestSqlInt64ToSqlByte()
+               [Test]
+               public void SqlInt64ToSqlByte()
                {
                        SqlInt64 TestInt6464 = new SqlInt64(64);
                        SqlInt64 TestInt64900 = new SqlInt64(900);
 
-                       AssertEquals("SqlInt64ToByte" + Error, (byte)64, ((SqlByte)TestInt6464).Value);
+                       Assertion.AssertEquals("SqlInt64ToByte" + Error, (byte)64, ((SqlByte)TestInt6464).Value);
 
                        try {
                                SqlByte test = (SqlByte)TestInt64900;
-                               Fail("SqlInt64ToByte 2" + Error);
+                               Assertion.Fail("SqlInt64ToByte 2" + Error);
                        } catch (Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestSqlMoneyToSqlByte()
+               [Test]
+               public void SqlMoneyToSqlByte()
                {
                        SqlMoney TestMoney64 = new SqlMoney(64);
                        SqlMoney TestMoney900 = new SqlMoney(900);
 
-                       AssertEquals("SqlMoneyToByte" + Error, (byte)64, ((SqlByte)TestMoney64).Value);
+                       Assertion.AssertEquals("SqlMoneyToByte" + Error, (byte)64, ((SqlByte)TestMoney64).Value);
 
                        try {
                                SqlByte test = (SqlByte)TestMoney900;
-                               Fail("SqlMoneyToByte 2" + Error);
+                               Assertion.Fail("SqlMoneyToByte 2" + Error);
                        } catch (Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestSqlSingleToSqlByte()
+               [Test]
+               public void SqlSingleToSqlByte()
                {
                        SqlSingle TestSingle64 = new SqlSingle(64);
                        SqlSingle TestSingle900 = new SqlSingle(900);
 
-                       AssertEquals("SqlSingleToByte" + Error, (byte)64, ((SqlByte)TestSingle64).Value);
+                       Assertion.AssertEquals("SqlSingleToByte" + Error, (byte)64, ((SqlByte)TestSingle64).Value);
 
                        try {
                                SqlByte test = (SqlByte)TestSingle900;
-                               Fail("SqlSingleToByte 2" + Error);
+                               Assertion.Fail("SqlSingleToByte 2" + Error);
                        } catch (Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                }
 
-               public void TestSqlStringToSqlByte()
+               [Test]
+               public void SqlStringToSqlByte()
                {
                        SqlString TestString = new SqlString("Test string");
                        SqlString TestString100 = new SqlString("100");
                        SqlString TestString1000 = new SqlString("1000");
 
-                       AssertEquals ("SqlStringToByte 1" + Error, (byte)100, ((SqlByte)TestString100).Value);
+                       Assertion.AssertEquals ("SqlStringToByte 1" + Error, (byte)100, ((SqlByte)TestString100).Value);
 
                        try {
                                SqlByte test = (SqlByte)TestString1000;
                        } catch(Exception e) {
 
-                               AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
+                               Assertion.AssertEquals("OverflowException", typeof(OverflowException), e.GetType());
                        }
 
                        try {
                                SqlByte test = (SqlByte)TestString;
-                               Fail("SqlStringToByte 2" + Error);
+                               Assertion.Fail("SqlStringToByte 2" + Error);
                                
                        } catch(Exception e) {
-                               AssertEquals("FormatException", typeof(FormatException), e.GetType());
+                               Assertion.AssertEquals("FormatException", typeof(FormatException), e.GetType());
                        }
                }
 
-               public void TestByteToSqlByte()
+               [Test]
+               public void ByteToSqlByte()
                {
                        byte TestByte = 14;
-                       AssertEquals ("ByteToSqlByte" + Error,
+                       Assertion.AssertEquals ("ByteToSqlByte" + Error,
                                      (byte)14, ((SqlByte)TestByte).Value);
                }
        }
index a83c9c22ce114cbc361e0f01969c815a5495d229..2e1e420a958caf31a7c86e08077c799ebf373bda 100755 (executable)
@@ -1,9 +1,12 @@
 //\r
 // SqlDateTimeTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlDateTime\r
 //\r
-// Ville Palo (vi64pa@koti.soon.fi)\r
+// Authors:\r
+//   Ville Palo (vi64pa@koti.soon.fi)\r
+//   Martin Willemoes Hansen\r
 //\r
-// (C) Ville Palo 2002\r
+// (C) 2002 Ville Palo\r
+// (C) 2003 Martin Willemoes Hansen\r
 // \r
 \r
 using NUnit.Framework;\r
@@ -12,7 +15,8 @@ using System.Data.SqlTypes;
 \r
 namespace MonoTests.System.Data.SqlTypes\r
 {\r
-        public class SqlDateTimeTest : TestCase {\r
+       [TestFixture]\r
+        public class SqlDateTimeTest {\r
 \r
                private long[] myTicks = {\r
                        631501920000000000L,    // 25 Feb 2002 - 00:00:00\r
@@ -28,312 +32,314 @@ namespace MonoTests.System.Data.SqlTypes
                private SqlDateTime Test2;\r
                private SqlDateTime Test3;\r
 \r
-                public SqlDateTimeTest() : base ("System.Data.SqlTypes.SqlDateTime") {}\r
-                public SqlDateTimeTest(string name) : base(name) {}\r
-\r
-                protected override void TearDown() {}\r
-\r
-                protected override void SetUp() \r
+               [SetUp]\r
+                public void GetReady() \r
                {\r
                        Test1 = new SqlDateTime (2002, 10, 19, 9, 40, 0);\r
                        Test2 = new SqlDateTime (2003, 11, 20,10, 50, 1);\r
                        Test3 = new SqlDateTime (2003, 11, 20, 10, 50, 1);\r
                }\r
 \r
-                public static ITest Suite {\r
-                        get {\r
-                                return new TestSuite(typeof(SqlDateTime));\r
-                        }\r
-                }\r
-\r
                 // Test constructor\r
-                public void TestCreate()\r
+               [Test]\r
+                public void Create()\r
                 {\r
                        // SqlDateTime (DateTime)\r
                        SqlDateTime CTest = new SqlDateTime (\r
                                new DateTime (2002, 5, 19, 3, 34, 0));\r
-                       AssertEquals ("#A01", 2002, CTest.Value.Year);\r
+                       Assertion.AssertEquals ("#A01", 2002, CTest.Value.Year);\r
                                \r
                        // SqlDateTime (int, int)\r
                         CTest = new SqlDateTime (0, 0);\r
                        \r
                        // SqlDateTime (int, int, int)\r
-                        AssertEquals ("#A02", 1900, CTest.Value.Year);\r
-                        AssertEquals ("#A03", 1, CTest.Value.Month);\r
-                        AssertEquals ("#A04", 1, CTest.Value.Day);\r
-                        AssertEquals ("#A05", 0, CTest.Value.Hour);\r
+                        Assertion.AssertEquals ("#A02", 1900, CTest.Value.Year);\r
+                        Assertion.AssertEquals ("#A03", 1, CTest.Value.Month);\r
+                        Assertion.AssertEquals ("#A04", 1, CTest.Value.Day);\r
+                        Assertion.AssertEquals ("#A05", 0, CTest.Value.Hour);\r
 \r
                        // SqlDateTime (int, int, int, int, int, int)\r
                        CTest = new SqlDateTime (5000, 12, 31);\r
-                       AssertEquals ("#A06", 5000, CTest.Value.Year);\r
-                       AssertEquals ("#A07", 12, CTest.Value.Month);\r
-                       AssertEquals ("#A08", 31, CTest.Value.Day);\r
+                       Assertion.AssertEquals ("#A06", 5000, CTest.Value.Year);\r
+                       Assertion.AssertEquals ("#A07", 12, CTest.Value.Month);\r
+                       Assertion.AssertEquals ("#A08", 31, CTest.Value.Day);\r
 \r
                        // SqlDateTime (int, int, int, int, int, int, double)\r
                        CTest = new SqlDateTime (1978, 5, 19, 3, 34, 0);\r
-                       AssertEquals ("#A09", 1978, CTest.Value.Year);\r
-                       AssertEquals ("#A10", 5, CTest.Value.Month);\r
-                       AssertEquals ("#A11", 19, CTest.Value.Day);\r
-                       AssertEquals ("#A12", 3, CTest.Value.Hour);\r
-                        AssertEquals ("#A13", 34, CTest.Value.Minute);\r
-                       AssertEquals ("#A14", 0, CTest.Value.Second);\r
+                       Assertion.AssertEquals ("#A09", 1978, CTest.Value.Year);\r
+                       Assertion.AssertEquals ("#A10", 5, CTest.Value.Month);\r
+                       Assertion.AssertEquals ("#A11", 19, CTest.Value.Day);\r
+                       Assertion.AssertEquals ("#A12", 3, CTest.Value.Hour);\r
+                        Assertion.AssertEquals ("#A13", 34, CTest.Value.Minute);\r
+                       Assertion.AssertEquals ("#A14", 0, CTest.Value.Second);\r
                        \r
                        try {\r
                                CTest = new SqlDateTime (10000, 12, 31);\r
-                               Fail ("#A15");\r
+                               Assertion.Fail ("#A15");\r
                        } catch (Exception e) {\r
-                                AssertEquals ("#A16", typeof (SqlTypeException),\r
+                                Assertion.AssertEquals ("#A16", typeof (SqlTypeException),\r
                                              e.GetType ());\r
                        }\r
                        \r
                        // SqlDateTime (int, int, int, int, int, int, int)\r
                        CTest = new SqlDateTime (1978, 5, 19, 3, 34, 0, 12);\r
-                       AssertEquals ("#A17", 1978, CTest.Value.Year);\r
-                       AssertEquals ("#A18", 5, CTest.Value.Month);\r
-                       AssertEquals ("#A19", 19, CTest.Value.Day);\r
-                       AssertEquals ("#A20", 3, CTest.Value.Hour);\r
-                        AssertEquals ("#A21", 34, CTest.Value.Minute);\r
-                       AssertEquals ("#A22", 0, CTest.Value.Second);\r
-                        AssertEquals ("#A23", 0, CTest.Value.Millisecond);\r
+                       Assertion.AssertEquals ("#A17", 1978, CTest.Value.Year);\r
+                       Assertion.AssertEquals ("#A18", 5, CTest.Value.Month);\r
+                       Assertion.AssertEquals ("#A19", 19, CTest.Value.Day);\r
+                       Assertion.AssertEquals ("#A20", 3, CTest.Value.Hour);\r
+                        Assertion.AssertEquals ("#A21", 34, CTest.Value.Minute);\r
+                       Assertion.AssertEquals ("#A22", 0, CTest.Value.Second);\r
+                        Assertion.AssertEquals ("#A23", 0, CTest.Value.Millisecond);\r
                 }\r
 \r
                 // Test public fields\r
-                public void TestPublicFields()\r
+               [Test]\r
+                public void PublicFields()\r
                 {\r
                        // MaxValue\r
-                       AssertEquals ("#B01", 9999, SqlDateTime.MaxValue.Value.Year);\r
-                       AssertEquals ("#B02", 12, SqlDateTime.MaxValue.Value.Month);\r
-                       AssertEquals ("#B03", 31, SqlDateTime.MaxValue.Value.Day);\r
-                       AssertEquals ("#B04", 23, SqlDateTime.MaxValue.Value.Hour);\r
-                       AssertEquals ("#B05", 59, SqlDateTime.MaxValue.Value.Minute);\r
-                       AssertEquals ("#B06", 59, SqlDateTime.MaxValue.Value.Second);\r
+                       Assertion.AssertEquals ("#B01", 9999, SqlDateTime.MaxValue.Value.Year);\r
+                       Assertion.AssertEquals ("#B02", 12, SqlDateTime.MaxValue.Value.Month);\r
+                       Assertion.AssertEquals ("#B03", 31, SqlDateTime.MaxValue.Value.Day);\r
+                       Assertion.AssertEquals ("#B04", 23, SqlDateTime.MaxValue.Value.Hour);\r
+                       Assertion.AssertEquals ("#B05", 59, SqlDateTime.MaxValue.Value.Minute);\r
+                       Assertion.AssertEquals ("#B06", 59, SqlDateTime.MaxValue.Value.Second);\r
 \r
                        // MinValue\r
-                        AssertEquals ("#B07", 1753, SqlDateTime.MinValue.Value.Year);\r
-                        AssertEquals ("#B08", 1, SqlDateTime.MinValue.Value.Month);\r
-                        AssertEquals ("#B09", 1, SqlDateTime.MinValue.Value.Day);\r
-                        AssertEquals ("#B10", 0, SqlDateTime.MinValue.Value.Hour);\r
-                        AssertEquals ("#B11", 0, SqlDateTime.MinValue.Value.Minute);\r
-                        AssertEquals ("#B12", 0, SqlDateTime.MinValue.Value.Second);\r
+                        Assertion.AssertEquals ("#B07", 1753, SqlDateTime.MinValue.Value.Year);\r
+                        Assertion.AssertEquals ("#B08", 1, SqlDateTime.MinValue.Value.Month);\r
+                        Assertion.AssertEquals ("#B09", 1, SqlDateTime.MinValue.Value.Day);\r
+                        Assertion.AssertEquals ("#B10", 0, SqlDateTime.MinValue.Value.Hour);\r
+                        Assertion.AssertEquals ("#B11", 0, SqlDateTime.MinValue.Value.Minute);\r
+                        Assertion.AssertEquals ("#B12", 0, SqlDateTime.MinValue.Value.Second);\r
 \r
                        // Null\r
-                       Assert ("#B13", SqlDateTime.Null.IsNull);\r
+                       Assertion.Assert ("#B13", SqlDateTime.Null.IsNull);\r
 \r
                        // SQLTicksPerHour\r
-                        AssertEquals ("#B14", 1080000, SqlDateTime.SQLTicksPerHour);\r
+                        Assertion.AssertEquals ("#B14", 1080000, SqlDateTime.SQLTicksPerHour);\r
 \r
                        // SQLTicksPerMinute\r
-                        AssertEquals ("#B15", 18000, SqlDateTime.SQLTicksPerMinute);\r
+                        Assertion.AssertEquals ("#B15", 18000, SqlDateTime.SQLTicksPerMinute);\r
 \r
                        // SQLTicksPerSecond\r
-                        AssertEquals ("#B16", 300, SqlDateTime.SQLTicksPerSecond);\r
+                        Assertion.AssertEquals ("#B16", 300, SqlDateTime.SQLTicksPerSecond);\r
                 }\r
 \r
                 // Test properties\r
-                public void TestProperties()\r
+                [Test]\r
+               public void Properties()\r
                 {\r
                        // DayTicks\r
-                        AssertEquals ("#C01", 37546, Test1.DayTicks);\r
+                        Assertion.AssertEquals ("#C01", 37546, Test1.DayTicks);\r
                        \r
                        try {\r
                                int test = SqlDateTime.Null.DayTicks;\r
-                               Fail ("#C02");\r
+                               Assertion.Fail ("#C02");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#C03", typeof (SqlNullValueException), \r
+                               Assertion.AssertEquals ("#C03", typeof (SqlNullValueException), \r
                                              e.GetType ());\r
                        }\r
                                \r
                        // IsNull\r
-                       Assert ("#C04", SqlDateTime.Null.IsNull);\r
-                       Assert ("#C05", !Test2.IsNull);\r
+                       Assertion.Assert ("#C04", SqlDateTime.Null.IsNull);\r
+                       Assertion.Assert ("#C05", !Test2.IsNull);\r
 \r
                        // TimeTicks\r
-                        AssertEquals ("#C06", 10440000, Test1.TimeTicks);\r
+                        Assertion.AssertEquals ("#C06", 10440000, Test1.TimeTicks);\r
                        \r
                        try {\r
                                int test = SqlDateTime.Null.TimeTicks;\r
-                               Fail ("#C07");\r
+                               Assertion.Fail ("#C07");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#C08", typeof (SqlNullValueException), \r
+                               Assertion.AssertEquals ("#C08", typeof (SqlNullValueException), \r
                                              e.GetType ());\r
                        }\r
 \r
                        // Value\r
-                       AssertEquals ("#C09", 2003, Test2.Value.Year);\r
-                       AssertEquals ("#C10", 2002, Test1.Value.Year);                  \r
+                       Assertion.AssertEquals ("#C09", 2003, Test2.Value.Year);\r
+                       Assertion.AssertEquals ("#C10", 2002, Test1.Value.Year);                        \r
                 }\r
 \r
                 // PUBLIC METHODS\r
 \r
-                public void TestCompareTo()\r
+               [Test]          \r
+                public void CompareTo()\r
                 {\r
                         SqlString TestString = new SqlString ("This is a test");\r
 \r
-                        Assert ("#D01", Test1.CompareTo (Test3) < 0);\r
-                        Assert ("#D02", Test2.CompareTo (Test1) > 0);\r
-                        Assert ("#D03", Test2.CompareTo (Test3) == 0);\r
-                        Assert ("#D04", Test1.CompareTo (SqlDateTime.Null) > 0);\r
+                        Assertion.Assert ("#D01", Test1.CompareTo (Test3) < 0);\r
+                        Assertion.Assert ("#D02", Test2.CompareTo (Test1) > 0);\r
+                        Assertion.Assert ("#D03", Test2.CompareTo (Test3) == 0);\r
+                        Assertion.Assert ("#D04", Test1.CompareTo (SqlDateTime.Null) > 0);\r
 \r
                         try {\r
                                 Test1.CompareTo (TestString);\r
-                                Fail("#D05");\r
+                                Assertion.Fail("#D05");\r
                         } catch(Exception e) {\r
-                                AssertEquals ("#D06", typeof (ArgumentException), e.GetType ());\r
+                                Assertion.AssertEquals ("#D06", typeof (ArgumentException), e.GetType ());\r
                         }\r
                 }\r
 \r
-                public void TestEqualsMethods()\r
+               [Test]\r
+                public void EqualsMethods()\r
                 {\r
-                        Assert ("#E01", !Test1.Equals (Test2));\r
-                        Assert ("#E03", !Test2.Equals (new SqlString ("TEST")));\r
-                        Assert ("#E04", Test2.Equals (Test3));\r
+                        Assertion.Assert ("#E01", !Test1.Equals (Test2));\r
+                        Assertion.Assert ("#E03", !Test2.Equals (new SqlString ("TEST")));\r
+                        Assertion.Assert ("#E04", Test2.Equals (Test3));\r
 \r
                         // Static Equals()-method\r
-                        Assert ("#E05", SqlDateTime.Equals (Test2, Test3).Value);\r
-                        Assert ("#E06", !SqlDateTime.Equals (Test1, Test2).Value);\r
+                        Assertion.Assert ("#E05", SqlDateTime.Equals (Test2, Test3).Value);\r
+                        Assertion.Assert ("#E06", !SqlDateTime.Equals (Test1, Test2).Value);\r
                 }\r
 \r
-                public void TestGetHashCode()\r
+               [Test]\r
+                public void GetHashCodeTest()\r
                 {\r
                         // FIXME: Better way to test HashCode\r
-                        AssertEquals ("#F01", Test1.GetHashCode (), Test1.GetHashCode ());\r
-                        Assert ("#F02", Test2.GetHashCode () != Test1.GetHashCode ());\r
+                        Assertion.AssertEquals ("#F01", Test1.GetHashCode (), Test1.GetHashCode ());\r
+                        Assertion.Assert ("#F02", Test2.GetHashCode () != Test1.GetHashCode ());\r
                 }\r
 \r
-                public void TestGetType()\r
+               [Test]\r
+                public void GetTypeTest()\r
                 {\r
-                        AssertEquals ("#G01", "System.Data.SqlTypes.SqlDateTime", \r
+                        Assertion.AssertEquals ("#G01", "System.Data.SqlTypes.SqlDateTime", \r
                                      Test1.GetType ().ToString ());\r
-                        AssertEquals ("#G02", "System.DateTime", \r
+                        Assertion.AssertEquals ("#G02", "System.DateTime", \r
                                      Test1.Value.GetType ().ToString ());\r
                 }\r
 \r
-                public void TestGreaters()\r
+               [Test]\r
+                public void Greaters()\r
                 {\r
                         // GreateThan ()\r
-                        Assert ("#H01", !SqlDateTime.GreaterThan (Test1, Test2).Value);\r
-                        Assert ("#H02", SqlDateTime.GreaterThan (Test2, Test1).Value);\r
-                        Assert ("#H03", !SqlDateTime.GreaterThan (Test2, Test3).Value);\r
+                        Assertion.Assert ("#H01", !SqlDateTime.GreaterThan (Test1, Test2).Value);\r
+                        Assertion.Assert ("#H02", SqlDateTime.GreaterThan (Test2, Test1).Value);\r
+                        Assertion.Assert ("#H03", !SqlDateTime.GreaterThan (Test2, Test3).Value);\r
 \r
                         // GreaterTharOrEqual ()\r
-                        Assert ("#H04", !SqlDateTime.GreaterThanOrEqual (Test1, Test2).Value);\r
-                        Assert ("#H05", SqlDateTime.GreaterThanOrEqual (Test2, Test1).Value);\r
-                        Assert ("#H06", SqlDateTime.GreaterThanOrEqual (Test2, Test3).Value);\r
+                        Assertion.Assert ("#H04", !SqlDateTime.GreaterThanOrEqual (Test1, Test2).Value);\r
+                        Assertion.Assert ("#H05", SqlDateTime.GreaterThanOrEqual (Test2, Test1).Value);\r
+                        Assertion.Assert ("#H06", SqlDateTime.GreaterThanOrEqual (Test2, Test3).Value);\r
                 }\r
 \r
-                public void TestLessers()\r
+               [Test]\r
+                public void Lessers()\r
                 {\r
                         // LessThan()\r
-                        Assert ("#I01", !SqlDateTime.LessThan (Test2, Test3).Value);\r
-                        Assert ("#I02", !SqlDateTime.LessThan (Test2, Test1).Value);\r
-                        Assert ("#I03", SqlDateTime.LessThan (Test1, Test3).Value);\r
+                        Assertion.Assert ("#I01", !SqlDateTime.LessThan (Test2, Test3).Value);\r
+                        Assertion.Assert ("#I02", !SqlDateTime.LessThan (Test2, Test1).Value);\r
+                        Assertion.Assert ("#I03", SqlDateTime.LessThan (Test1, Test3).Value);\r
 \r
                         // LessThanOrEqual ()\r
-                        Assert ("#I04", SqlDateTime.LessThanOrEqual (Test1, Test2).Value);\r
-                        Assert ("#I05", !SqlDateTime.LessThanOrEqual (Test2, Test1).Value);\r
-                        Assert ("#I06", SqlDateTime.LessThanOrEqual (Test3, Test2).Value);\r
-                        Assert ("#I07", SqlDateTime.LessThanOrEqual (Test1, SqlDateTime.Null).IsNull);\r
+                        Assertion.Assert ("#I04", SqlDateTime.LessThanOrEqual (Test1, Test2).Value);\r
+                        Assertion.Assert ("#I05", !SqlDateTime.LessThanOrEqual (Test2, Test1).Value);\r
+                        Assertion.Assert ("#I06", SqlDateTime.LessThanOrEqual (Test3, Test2).Value);\r
+                        Assertion.Assert ("#I07", SqlDateTime.LessThanOrEqual (Test1, SqlDateTime.Null).IsNull);\r
                 }\r
 \r
-                public void TestNotEquals()\r
+               [Test]\r
+                public void NotEquals()\r
                 {\r
-                        Assert ("#J01", SqlDateTime.NotEquals (Test1, Test2).Value);\r
-                        Assert ("#J02", SqlDateTime.NotEquals (Test3, Test1).Value);\r
-                        Assert ("#J03", !SqlDateTime.NotEquals (Test2, Test3).Value);\r
-                        Assert ("#J04", SqlDateTime.NotEquals (SqlDateTime.Null, Test2).IsNull);\r
+                        Assertion.Assert ("#J01", SqlDateTime.NotEquals (Test1, Test2).Value);\r
+                        Assertion.Assert ("#J02", SqlDateTime.NotEquals (Test3, Test1).Value);\r
+                        Assertion.Assert ("#J03", !SqlDateTime.NotEquals (Test2, Test3).Value);\r
+                        Assertion.Assert ("#J04", SqlDateTime.NotEquals (SqlDateTime.Null, Test2).IsNull);\r
                 }\r
 \r
-                public void TestParse()\r
+               [Test]\r
+                public void Parse()\r
                 {\r
                         try {\r
                                 SqlDateTime.Parse (null);\r
-                                Fail ("#K01");\r
+                                Assertion.Fail ("#K01");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#K02", typeof (ArgumentNullException), \r
+                                Assertion.AssertEquals ("#K02", typeof (ArgumentNullException), \r
                                              e.GetType ());\r
                         }\r
 \r
                         try {\r
                                 SqlDateTime.Parse ("not-a-number");\r
-                                Fail ("#K03");\r
+                                Assertion.Fail ("#K03");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#K04", typeof (FormatException), \r
+                                Assertion.AssertEquals ("#K04", typeof (FormatException), \r
                                              e.GetType ());\r
                         }\r
 \r
                        SqlDateTime t1 = SqlDateTime.Parse ("02/25/2002");\r
-                       AssertEquals ("#K05", myTicks[0], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K05", myTicks[0], t1.Value.Ticks);\r
 \r
                        try {\r
                                t1 = SqlDateTime.Parse ("2002-02-25");\r
                        } catch (Exception e) {\r
-                               Fail ("#K06 " + e);\r
+                               Assertion.Fail ("#K06 " + e);\r
                        }\r
 \r
                        // Thanks for Martin Baulig for these (DateTimeTest.cs)\r
-                       AssertEquals ("#K07", myTicks[0], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K07", myTicks[0], t1.Value.Ticks);\r
                        t1 = SqlDateTime.Parse ("Monday, 25 February 2002");\r
-                       AssertEquals ("#K08", myTicks[0], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K08", myTicks[0], t1.Value.Ticks);\r
                        t1 = SqlDateTime.Parse ("Monday, 25 February 2002 05:25");\r
-                       AssertEquals ("#K09", myTicks[3], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K09", myTicks[3], t1.Value.Ticks);\r
                        t1 = SqlDateTime.Parse ("Monday, 25 February 2002 05:25:13");\r
-                        AssertEquals ("#K10", myTicks[4], t1.Value.Ticks);\r
+                        Assertion.AssertEquals ("#K10", myTicks[4], t1.Value.Ticks);\r
                        t1 = SqlDateTime.Parse ("02/25/2002 05:25");\r
-                       AssertEquals ("#K11", myTicks[3], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K11", myTicks[3], t1.Value.Ticks);\r
                        t1 = SqlDateTime.Parse ("02/25/2002 05:25:13");\r
-                       AssertEquals ("#K12", myTicks[4], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K12", myTicks[4], t1.Value.Ticks);\r
                         t1 = SqlDateTime.Parse ("2002-02-25 04:25:13Z");\r
                         t1 = TimeZone.CurrentTimeZone.ToUniversalTime(t1.Value);\r
-                       AssertEquals ("#K13", 2002, t1.Value.Year);\r
-                       AssertEquals ("#K14", 02, t1.Value.Month);\r
-                       AssertEquals ("#K15", 25, t1.Value.Day);\r
-                       AssertEquals ("#K16", 04, t1.Value.Hour);\r
-                       AssertEquals ("#K17", 25, t1.Value.Minute);\r
-                       AssertEquals ("#K18", 13, t1.Value.Second);\r
+                       Assertion.AssertEquals ("#K13", 2002, t1.Value.Year);\r
+                       Assertion.AssertEquals ("#K14", 02, t1.Value.Month);\r
+                       Assertion.AssertEquals ("#K15", 25, t1.Value.Day);\r
+                       Assertion.AssertEquals ("#K16", 04, t1.Value.Hour);\r
+                       Assertion.AssertEquals ("#K17", 25, t1.Value.Minute);\r
+                       Assertion.AssertEquals ("#K18", 13, t1.Value.Second);\r
                        \r
                        SqlDateTime t2 = new SqlDateTime (DateTime.Today.Year, 2, 25);\r
                        t1 = SqlDateTime.Parse ("February 25");\r
-                       AssertEquals ("#K19", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K19", t2.Value.Ticks, t1.Value.Ticks);\r
                        \r
                        t2 = new SqlDateTime (DateTime.Today.Year, 2, 8);\r
                        t1 = SqlDateTime.Parse ("February 08");\r
-                        AssertEquals ("#K20", t2.Value.Ticks, t1.Value.Ticks);\r
+                        Assertion.AssertEquals ("#K20", t2.Value.Ticks, t1.Value.Ticks);\r
 \r
                        t1 = SqlDateTime.Parse ("Mon, 25 Feb 2002 04:25:13 GMT");\r
                        t1 = TimeZone.CurrentTimeZone.ToUniversalTime(t1.Value);\r
-                       AssertEquals ("#K21", 2002, t1.Value.Year);\r
-                       AssertEquals ("#K22", 02, t1.Value.Month);\r
-                       AssertEquals ("#K23", 25, t1.Value.Day);\r
-                       AssertEquals ("#K24", 04, t1.Value.Hour);\r
-                       AssertEquals ("#K25", 25, t1.Value.Minute);\r
-                       AssertEquals ("#K26", 13, t1.Value.Second);\r
+                       Assertion.AssertEquals ("#K21", 2002, t1.Value.Year);\r
+                       Assertion.AssertEquals ("#K22", 02, t1.Value.Month);\r
+                       Assertion.AssertEquals ("#K23", 25, t1.Value.Day);\r
+                       Assertion.AssertEquals ("#K24", 04, t1.Value.Hour);\r
+                       Assertion.AssertEquals ("#K25", 25, t1.Value.Minute);\r
+                       Assertion.AssertEquals ("#K26", 13, t1.Value.Second);\r
 \r
                        t1 = SqlDateTime.Parse ("2002-02-25T05:25:13");\r
-                       AssertEquals ("#K27", myTicks[4], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K27", myTicks[4], t1.Value.Ticks);\r
 \r
                         t2 = DateTime.Today + new TimeSpan (5,25,0);\r
                        t1 = SqlDateTime.Parse ("05:25");\r
-                       AssertEquals("#K28", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals("#K28", t2.Value.Ticks, t1.Value.Ticks);\r
 \r
                         t2 = DateTime.Today + new TimeSpan (5,25,13);\r
                        t1 = SqlDateTime.Parse ("05:25:13");\r
-                       AssertEquals("#K29", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals("#K29", t2.Value.Ticks, t1.Value.Ticks);\r
 \r
                        t2 = new SqlDateTime (2002, 2, 1);\r
                        t1 = SqlDateTime.Parse ("2002 February");\r
-                       AssertEquals ("#K30", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K30", t2.Value.Ticks, t1.Value.Ticks);\r
                        \r
                        t2 = new SqlDateTime (2002, 2, 1);\r
                        t1 = SqlDateTime.Parse ("2002 February");\r
-                       AssertEquals ("#K31", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K31", t2.Value.Ticks, t1.Value.Ticks);\r
                        \r
                        t2 = new SqlDateTime (DateTime.Today.Year, 2, 8);\r
                        t1 = SqlDateTime.Parse ("February 8");\r
                        \r
-                       AssertEquals ("#K32", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#K32", t2.Value.Ticks, t1.Value.Ticks);\r
                 }\r
 \r
-               public void TestToString()\r
+               [Test]\r
+               public void ToStringTest()\r
                {\r
                        //\r
                        // Thanks for Marting Baulig for these (DateTimeTest.cs)\r
@@ -343,178 +349,182 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlDateTime t2 = new SqlDateTime (2002, 2, 25, 15, 25, 13);\r
                        \r
                        // Standard patterns\r
-                        AssertEquals("L01", "25.2.2002 5:25:13", t1.ToString ());\r
-                        AssertEquals("L02", (SqlString)"25.2.2002 5:25:13", t1.ToSqlString ());\r
+                        Assertion.AssertEquals("L01", "25.2.2002 5:25:13", t1.ToString ());\r
+                        Assertion.AssertEquals("L02", (SqlString)"25.2.2002 5:25:13", t1.ToSqlString ());\r
                }\r
 \r
                 // OPERATORS\r
-\r
-                public void TestArithmeticOperators()\r
+               [Test]\r
+                public void ArithmeticOperators()\r
                 {\r
                        TimeSpan TestSpan = new TimeSpan (20, 1, 20, 20);\r
                        SqlDateTime ResultDateTime;\r
 \r
                         // "+"-operator\r
                         ResultDateTime = Test1 + TestSpan;\r
-                       AssertEquals ("#M01", 2002, ResultDateTime.Value.Year);\r
-                       AssertEquals ("#M02", 8, ResultDateTime.Value.Day);\r
-                       AssertEquals ("#M03", 11, ResultDateTime.Value.Hour);\r
-                        AssertEquals ("#M04", 0, ResultDateTime.Value.Minute);\r
-                        AssertEquals ("#M05", 20, ResultDateTime.Value.Second);     \r
-                       Assert ("#M06", (SqlDateTime.Null + TestSpan).IsNull);\r
+                       Assertion.AssertEquals ("#M01", 2002, ResultDateTime.Value.Year);\r
+                       Assertion.AssertEquals ("#M02", 8, ResultDateTime.Value.Day);\r
+                       Assertion.AssertEquals ("#M03", 11, ResultDateTime.Value.Hour);\r
+                        Assertion.AssertEquals ("#M04", 0, ResultDateTime.Value.Minute);\r
+                        Assertion.AssertEquals ("#M05", 20, ResultDateTime.Value.Second);     \r
+                       Assertion.Assert ("#M06", (SqlDateTime.Null + TestSpan).IsNull);\r
 \r
                         try {\r
                                 ResultDateTime = SqlDateTime.MaxValue + TestSpan;\r
-                                Fail ("#M07");\r
+                                Assertion.Fail ("#M07");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#M08", typeof (ArgumentOutOfRangeException), e.GetType ());\r
+                                Assertion.AssertEquals ("#M08", typeof (ArgumentOutOfRangeException), e.GetType ());\r
                         }\r
 \r
                         // "-"-operator\r
                        ResultDateTime = Test1 - TestSpan;\r
-                       AssertEquals ("#M09", 2002, ResultDateTime.Value.Year);\r
-                        AssertEquals ("#M10", 29, ResultDateTime.Value.Day);\r
-                       AssertEquals ("#M11", 8, ResultDateTime.Value.Hour);\r
-                        AssertEquals ("#M12", 19, ResultDateTime.Value.Minute);\r
-                        AssertEquals ("#M13", 40, ResultDateTime.Value.Second);     \r
-                        Assert ("#M14", (SqlDateTime.Null - TestSpan).IsNull);\r
+                       Assertion.AssertEquals ("#M09", 2002, ResultDateTime.Value.Year);\r
+                        Assertion.AssertEquals ("#M10", 29, ResultDateTime.Value.Day);\r
+                       Assertion.AssertEquals ("#M11", 8, ResultDateTime.Value.Hour);\r
+                        Assertion.AssertEquals ("#M12", 19, ResultDateTime.Value.Minute);\r
+                        Assertion.AssertEquals ("#M13", 40, ResultDateTime.Value.Second);     \r
+                        Assertion.Assert ("#M14", (SqlDateTime.Null - TestSpan).IsNull);\r
                        \r
                         try {\r
                                 ResultDateTime = SqlDateTime.MinValue - TestSpan;\r
-                                Fail ("#M15");\r
+                                Assertion.Fail ("#M15");\r
                         } catch  (Exception e) {\r
-                                AssertEquals ("#M16", typeof (SqlTypeException), e.GetType ());\r
+                                Assertion.AssertEquals ("#M16", typeof (SqlTypeException), e.GetType ());\r
                         }\r
                 }\r
 \r
-                public void TestThanOrEqualOperators()\r
+               [Test]\r
+                public void ThanOrEqualOperators()\r
                 {\r
                         // == -operator\r
-                        Assert ("#N01", (Test2 == Test3).Value);\r
-                        Assert ("#N02", !(Test1 == Test2).Value);\r
-                        Assert ("#N03", (Test1 == SqlDateTime.Null).IsNull);\r
+                        Assertion.Assert ("#N01", (Test2 == Test3).Value);\r
+                        Assertion.Assert ("#N02", !(Test1 == Test2).Value);\r
+                        Assertion.Assert ("#N03", (Test1 == SqlDateTime.Null).IsNull);\r
                         \r
                         // != -operator\r
-                        Assert ("#N04", !(Test2 != Test3).Value);\r
-                        Assert ("#N05", (Test1 != Test3).Value);\r
-                        Assert ("#N06", (Test1 != SqlDateTime.Null).IsNull);\r
+                        Assertion.Assert ("#N04", !(Test2 != Test3).Value);\r
+                        Assertion.Assert ("#N05", (Test1 != Test3).Value);\r
+                        Assertion.Assert ("#N06", (Test1 != SqlDateTime.Null).IsNull);\r
 \r
                         // > -operator\r
-                        Assert ("#N07", (Test2 > Test1).Value);\r
-                        Assert ("#N08", !(Test3 > Test2).Value);\r
-                        Assert ("#N09", (Test1 > SqlDateTime.Null).IsNull);\r
+                        Assertion.Assert ("#N07", (Test2 > Test1).Value);\r
+                        Assertion.Assert ("#N08", !(Test3 > Test2).Value);\r
+                        Assertion.Assert ("#N09", (Test1 > SqlDateTime.Null).IsNull);\r
 \r
                         // >=  -operator\r
-                        Assert ("#N10", !(Test1 >= Test3).Value);\r
-                        Assert ("#N11", (Test3 >= Test1).Value);\r
-                        Assert ("#N12", (Test2 >= Test3).Value);\r
-                        Assert ("#N13", (Test1 >= SqlDateTime.Null).IsNull);\r
+                        Assertion.Assert ("#N10", !(Test1 >= Test3).Value);\r
+                        Assertion.Assert ("#N11", (Test3 >= Test1).Value);\r
+                        Assertion.Assert ("#N12", (Test2 >= Test3).Value);\r
+                        Assertion.Assert ("#N13", (Test1 >= SqlDateTime.Null).IsNull);\r
 \r
                         // < -operator\r
-                        Assert ("#N14", !(Test2 < Test1).Value);\r
-                        Assert ("#N15", (Test1 < Test3).Value);\r
-                        Assert ("#N16", !(Test2 < Test3).Value);\r
-                        Assert ("#N17", (Test1 < SqlDateTime.Null).IsNull);\r
+                        Assertion.Assert ("#N14", !(Test2 < Test1).Value);\r
+                        Assertion.Assert ("#N15", (Test1 < Test3).Value);\r
+                        Assertion.Assert ("#N16", !(Test2 < Test3).Value);\r
+                        Assertion.Assert ("#N17", (Test1 < SqlDateTime.Null).IsNull);\r
 \r
                         // <= -operator\r
-                        Assert ("#N18", (Test1 <= Test3).Value);\r
-                        Assert ("#N19", !(Test3 <= Test1).Value);\r
-                        Assert ("#N20", (Test2 <= Test3).Value);\r
-                        Assert ("#N21", (Test1 <= SqlDateTime.Null).IsNull);\r
+                        Assertion.Assert ("#N18", (Test1 <= Test3).Value);\r
+                        Assertion.Assert ("#N19", !(Test3 <= Test1).Value);\r
+                        Assertion.Assert ("#N20", (Test2 <= Test3).Value);\r
+                        Assertion.Assert ("#N21", (Test1 <= SqlDateTime.Null).IsNull);\r
                 }\r
 \r
-               public void TestSqlDateTimeToDateTime()\r
+               [Test]\r
+               public void SqlDateTimeToDateTime()\r
                {\r
-                       AssertEquals ("O01", 2002, ((DateTime)Test1).Year);\r
-                       AssertEquals ("O03", 2003, ((DateTime)Test2).Year);\r
-                       AssertEquals ("O04", 10, ((DateTime)Test1).Month);\r
-                       AssertEquals ("O05", 19, ((DateTime)Test1).Day);\r
-                       AssertEquals ("O06", 9, ((DateTime)Test1).Hour);\r
-                       AssertEquals ("O07", 40, ((DateTime)Test1).Minute);\r
-                        AssertEquals ("O08", 0, ((DateTime)Test1).Second);\r
+                       Assertion.AssertEquals ("O01", 2002, ((DateTime)Test1).Year);\r
+                       Assertion.AssertEquals ("O03", 2003, ((DateTime)Test2).Year);\r
+                       Assertion.AssertEquals ("O04", 10, ((DateTime)Test1).Month);\r
+                       Assertion.AssertEquals ("O05", 19, ((DateTime)Test1).Day);\r
+                       Assertion.AssertEquals ("O06", 9, ((DateTime)Test1).Hour);\r
+                       Assertion.AssertEquals ("O07", 40, ((DateTime)Test1).Minute);\r
+                        Assertion.AssertEquals ("O08", 0, ((DateTime)Test1).Second);\r
                }\r
 \r
-               public void TestSqlStringToSqlDateTime()\r
+               [Test]\r
+               public void SqlStringToSqlDateTime()\r
                {\r
 \r
                        SqlString TestString = new SqlString ("02/25/2002");\r
                         SqlDateTime t1 = (SqlDateTime)TestString;\r
 \r
-                       AssertEquals ("#P01", myTicks[0], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P01", myTicks[0], t1.Value.Ticks);\r
 \r
                        // Thanks for Martin Baulig for these (DateTimeTest.cs)\r
-                       AssertEquals ("#P02", myTicks[0], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P02", myTicks[0], t1.Value.Ticks);\r
                        t1 = (SqlDateTime) new SqlString ("Monday, 25 February 2002");\r
-                       AssertEquals ("#P04", myTicks[0], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P04", myTicks[0], t1.Value.Ticks);\r
                        t1 = (SqlDateTime) new SqlString ("Monday, 25 February 2002 05:25");\r
-                       AssertEquals ("#P05", myTicks[3], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P05", myTicks[3], t1.Value.Ticks);\r
                        t1 = (SqlDateTime) new SqlString ("Monday, 25 February 2002 05:25:13");\r
-                       AssertEquals ("#P05", myTicks[4], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P05", myTicks[4], t1.Value.Ticks);\r
                        t1 = (SqlDateTime) new SqlString ("02/25/2002 05:25");\r
-                       AssertEquals ("#P06", myTicks[3], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P06", myTicks[3], t1.Value.Ticks);\r
                        t1 = (SqlDateTime) new SqlString ("02/25/2002 05:25:13");\r
-                       AssertEquals ("#P07", myTicks[4], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P07", myTicks[4], t1.Value.Ticks);\r
                        t1 = (SqlDateTime) new SqlString ("2002-02-25 04:25:13Z");\r
                        t1 = TimeZone.CurrentTimeZone.ToUniversalTime(t1.Value);\r
-                       AssertEquals ("#P08", 2002, t1.Value.Year);\r
-                       AssertEquals ("#P09", 02, t1.Value.Month);\r
-                       AssertEquals ("#P10", 25, t1.Value.Day);\r
-                       AssertEquals ("#P11", 04, t1.Value.Hour);\r
-                       AssertEquals ("#P12", 25, t1.Value.Minute);\r
-                       AssertEquals ("#P13", 13, t1.Value.Second);\r
+                       Assertion.AssertEquals ("#P08", 2002, t1.Value.Year);\r
+                       Assertion.AssertEquals ("#P09", 02, t1.Value.Month);\r
+                       Assertion.AssertEquals ("#P10", 25, t1.Value.Day);\r
+                       Assertion.AssertEquals ("#P11", 04, t1.Value.Hour);\r
+                       Assertion.AssertEquals ("#P12", 25, t1.Value.Minute);\r
+                       Assertion.AssertEquals ("#P13", 13, t1.Value.Second);\r
                        \r
                        SqlDateTime t2 = new SqlDateTime (DateTime.Today.Year, 2, 25);\r
                        t1 = (SqlDateTime) new SqlString ("February 25");\r
-                       AssertEquals ("#P14", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P14", t2.Value.Ticks, t1.Value.Ticks);\r
                        \r
                        t2 = new SqlDateTime (DateTime.Today.Year, 2, 8);\r
                        t1 = (SqlDateTime) new SqlString ("February 08");\r
-                       AssertEquals ("#P15", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P15", t2.Value.Ticks, t1.Value.Ticks);\r
 \r
                        t1 = (SqlDateTime) new SqlString ("Mon, 25 Feb 2002 04:25:13 GMT");\r
                        t1 = TimeZone.CurrentTimeZone.ToUniversalTime(t1.Value);\r
-                       AssertEquals ("#P16", 2002, t1.Value.Year);\r
-                       AssertEquals ("#P17", 02, t1.Value.Month);\r
-                       AssertEquals ("#P18", 25, t1.Value.Day);\r
-                       AssertEquals ("#P19", 04, t1.Value.Hour);\r
-                       AssertEquals ("#P20", 25, t1.Value.Minute);\r
-                       AssertEquals ("#P21", 13, t1.Value.Second);\r
+                       Assertion.AssertEquals ("#P16", 2002, t1.Value.Year);\r
+                       Assertion.AssertEquals ("#P17", 02, t1.Value.Month);\r
+                       Assertion.AssertEquals ("#P18", 25, t1.Value.Day);\r
+                       Assertion.AssertEquals ("#P19", 04, t1.Value.Hour);\r
+                       Assertion.AssertEquals ("#P20", 25, t1.Value.Minute);\r
+                       Assertion.AssertEquals ("#P21", 13, t1.Value.Second);\r
 \r
                        t1 = (SqlDateTime) new SqlString ("2002-02-25T05:25:13");\r
-                       AssertEquals ("#P22", myTicks[4], t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P22", myTicks[4], t1.Value.Ticks);\r
 \r
                         t2 = DateTime.Today + new TimeSpan (5,25,0);\r
                        t1 = (SqlDateTime) new SqlString ("05:25");\r
-                       AssertEquals("#P23", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals("#P23", t2.Value.Ticks, t1.Value.Ticks);\r
 \r
                         t2 = DateTime.Today + new TimeSpan (5,25,13);\r
                        t1 = (SqlDateTime) new SqlString ("05:25:13");\r
-                       AssertEquals("#P24", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals("#P24", t2.Value.Ticks, t1.Value.Ticks);\r
 \r
                        t2 = new SqlDateTime (2002, 2, 1);\r
                        t1 = (SqlDateTime) new SqlString ("2002 February");\r
-                       AssertEquals ("#P25", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P25", t2.Value.Ticks, t1.Value.Ticks);\r
                        \r
                        t2 = new SqlDateTime (2002, 2, 1);\r
                        t1 = (SqlDateTime) new SqlString ("2002 February");\r
-                       AssertEquals ("#P26", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P26", t2.Value.Ticks, t1.Value.Ticks);\r
                        \r
                        t2 = new SqlDateTime (DateTime.Today.Year, 2, 8);\r
                        t1 = (SqlDateTime) new SqlString ("February 8");\r
                        \r
-                       AssertEquals ("#P27", t2.Value.Ticks, t1.Value.Ticks);\r
+                       Assertion.AssertEquals ("#P27", t2.Value.Ticks, t1.Value.Ticks);\r
                }\r
 \r
-               public void TestDateTimeToSqlDateTime()\r
+               [Test]\r
+               public void DateTimeToSqlDateTime()\r
                {\r
                        DateTime DateTimeTest = new DateTime (2002, 10, 19, 11, 53, 4);\r
                        SqlDateTime Result = (SqlDateTime)DateTimeTest;\r
-                       AssertEquals ("#Q01", 2002, Result.Value.Year);\r
-                       AssertEquals ("#Q02", 10, Result.Value.Month);\r
-                       AssertEquals ("#Q03", 19, Result.Value.Day);\r
-                       AssertEquals ("#Q04", 11, Result.Value.Hour);\r
-                               AssertEquals ("#Q05", 53, Result.Value.Minute);\r
-                       AssertEquals ("#Q06", 4, Result.Value.Second);\r
+                       Assertion.AssertEquals ("#Q01", 2002, Result.Value.Year);\r
+                       Assertion.AssertEquals ("#Q02", 10, Result.Value.Month);\r
+                       Assertion.AssertEquals ("#Q03", 19, Result.Value.Day);\r
+                       Assertion.AssertEquals ("#Q04", 11, Result.Value.Hour);\r
+                               Assertion.AssertEquals ("#Q05", 53, Result.Value.Minute);\r
+                       Assertion.AssertEquals ("#Q06", 4, Result.Value.Second);\r
                }\r
         }\r
 }\r
index cf9d2fd5a639263b2515b1117a6e333dcf1559d5..cd983e3e07c68f9913a689f6758929980ce184aa 100755 (executable)
@@ -1,9 +1,12 @@
 //\r
 // SqlDecimalTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlDecimal\r
 //\r
-// Ville Palo (vi64pa@koti.soon.fi)\r
+// Authors:\r
+//   Ville Palo (vi64pa@koti.soon.fi)\r
+//   Martin Willemoes Hansen\r
 //\r
-// (C) Ville Palo 2002\r
+// (C) 2002 Ville Palo\r
+// (C) 2003 Martin Willemoes Hansen\r
 // \r
 \r
 using NUnit.Framework;\r
@@ -12,19 +15,16 @@ using System.Data.SqlTypes;
 \r
 namespace MonoTests.System.Data.SqlTypes\r
 {\r
-        public class SqlDecimalTest : TestCase {\r
+       [TestFixture]\r
+        public class SqlDecimalTest {\r
 \r
                private SqlDecimal Test1;\r
                private SqlDecimal Test2;\r
                private SqlDecimal Test3;\r
                private SqlDecimal Test4;\r
                \r
-                public SqlDecimalTest() : base ("System.Data.SqlTypes.SqlDecimal") {}\r
-                public SqlDecimalTest(string name) : base(name) {}\r
-\r
-                protected override void TearDown() {}\r
-\r
-                protected override void SetUp() \r
+               [SetUp]\r
+                public void GetReady() \r
                 {\r
                        Test1 = new SqlDecimal (6464.6464m);\r
                        Test2 = new SqlDecimal (10000.00m); \r
@@ -32,560 +32,578 @@ namespace MonoTests.System.Data.SqlTypes
                        Test4 = new SqlDecimal (-6m);                 \r
                 }\r
 \r
-                public static ITest Suite {\r
-                        get {\r
-                                return new TestSuite(typeof(SqlDecimal));\r
-                        }\r
-                }\r
-\r
                 // Test constructor\r
-                public void TestCreate()\r
+               [Test]\r
+                public void Create()\r
                 {\r
                        // SqlDecimal (decimal)\r
                        SqlDecimal Test = new SqlDecimal (30.3098m);\r
-                       AssertEquals ("#A01", (decimal)30.3098, Test.Value);\r
+                       Assertion.AssertEquals ("#A01", (decimal)30.3098, Test.Value);\r
                        \r
                        try {\r
                                SqlDecimal test = new SqlDecimal (Decimal.MaxValue + 1);\r
-                               Fail ("#A02");                          \r
+                               Assertion.Fail ("#A02");                                \r
                        } catch (Exception e) {\r
-                               AssertEquals ("#A03", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#A03", typeof (OverflowException), e.GetType ());\r
                        }\r
                        \r
                        // SqlDecimal (double)\r
                        Test = new SqlDecimal (10E+10d);\r
-                       AssertEquals ("#A05", 100000000000m, Test.Value);\r
+                       Assertion.AssertEquals ("#A05", 100000000000m, Test.Value);\r
                        \r
                        try {\r
                                SqlDecimal test = new SqlDecimal (10E+200d);\r
-                               Fail ("#A06");                          \r
+                               Assertion.Fail ("#A06");                                \r
                        } catch (Exception e) {\r
-                               AssertEquals ("#A07", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#A07", typeof (OverflowException), e.GetType ());\r
                        }\r
                        \r
                        // SqlDecimal (int)\r
                        Test = new SqlDecimal (-1);\r
-                       AssertEquals ("#A08", -1m, Test.Value);\r
+                       Assertion.AssertEquals ("#A08", -1m, Test.Value);\r
                 \r
                        // SqlDecimal (long)\r
                        Test = new SqlDecimal ((long)(-99999));\r
-                       AssertEquals ("#A09", -99999m, Test.Value);\r
+                       Assertion.AssertEquals ("#A09", -99999m, Test.Value);\r
                 \r
                        // SqlDecimal (byte, byte, bool. int[]\r
                        Test = new SqlDecimal (10, 3, false, new int [4] {200, 1, 0, 0});\r
-                       AssertEquals ("#A10", -4294967.496m, Test.Value);\r
+                       Assertion.AssertEquals ("#A10", -4294967.496m, Test.Value);\r
                        \r
                        try {                           \r
                                Test = new SqlDecimal (100, 100, false, \r
                                                       new int [4] {Int32.MaxValue, \r
                                                       Int32.MaxValue, Int32.MaxValue, \r
                                                       Int32.MaxValue});\r
-                               Fail ("#A11");\r
+                               Assertion.Fail ("#A11");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#A12", typeof (SqlTypeException), e.GetType ());\r
+                               Assertion.AssertEquals ("#A12", typeof (SqlTypeException), e.GetType ());\r
                        }\r
 \r
                        // sqlDecimal (byte, byte, bool, int, int, int, int)\r
                        Test = new SqlDecimal (12, 2, true, 100, 100, 0, 0);\r
-                       AssertEquals ("#A13", 4294967297m, Test.Value);\r
+                       Assertion.AssertEquals ("#A13", 4294967297m, Test.Value);\r
                        \r
                        try {                           \r
                                Test = new SqlDecimal (100, 100, false, \r
                                                       Int32.MaxValue, \r
                                                       Int32.MaxValue, Int32.MaxValue, \r
                                                       Int32.MaxValue);\r
-                               Fail ("#A14");\r
+                               Assertion.Fail ("#A14");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#A15", typeof (SqlTypeException), e.GetType ());\r
+                               Assertion.AssertEquals ("#A15", typeof (SqlTypeException), e.GetType ());\r
                        }                       \r
                 }\r
 \r
                 // Test public fields\r
-                public void TestPublicFields()\r
+               [Test]\r
+                public void PublicFields()\r
                 {\r
-                        AssertEquals ("#B01", (byte)38, SqlDecimal.MaxPrecision);\r
-                        AssertEquals ("#B02", (byte)38, SqlDecimal.MaxScale);\r
+                        Assertion.AssertEquals ("#B01", (byte)38, SqlDecimal.MaxPrecision);\r
+                        Assertion.AssertEquals ("#B02", (byte)38, SqlDecimal.MaxScale);\r
                         \r
                         // FIXME: on windows: Conversion overflow\r
-                       AssertEquals  ("#B03a", 1262177448, SqlDecimal.MaxValue.Data [3]);\r
+                       Assertion.AssertEquals  ("#B03a", 1262177448, SqlDecimal.MaxValue.Data [3]);\r
 \r
 \r
-                        AssertEquals ("#B04", 1262177448, SqlDecimal.MinValue.Data [3]);\r
-                       Assert ("#B05", SqlDecimal.Null.IsNull);\r
-                       Assert ("#B06", !Test1.IsNull);\r
+                        Assertion.AssertEquals ("#B04", 1262177448, SqlDecimal.MinValue.Data [3]);\r
+                       Assertion.Assert ("#B05", SqlDecimal.Null.IsNull);\r
+                       Assertion.Assert ("#B06", !Test1.IsNull);\r
                 }\r
 \r
                 // Test properties\r
-                public void TestProperties()\r
+               [Test]\r
+                public void Properties()\r
                 {\r
                        byte[] b = Test1.BinData;\r
-                       AssertEquals ("#C01", (byte)64, b [0]);\r
+                       Assertion.AssertEquals ("#C01", (byte)64, b [0]);\r
                        \r
                        int[] i = Test1.Data;\r
-                       AssertEquals ("#C02", 64646464, i [0]);\r
+                       Assertion.AssertEquals ("#C02", 64646464, i [0]);\r
                 \r
-                        Assert ("#C03", SqlDecimal.Null.IsNull);\r
-                        Assert ("#C04", Test1.IsPositive);\r
-                        Assert ("#C05", !Test4.IsPositive);\r
-                        AssertEquals ("#C06", (byte)8, Test1.Precision);\r
-                       AssertEquals ("#C07", (byte)0, Test2.Scale);\r
-                       AssertEquals ("#C08", 6464.6464m, Test1.Value); \r
-                       AssertEquals ("#C09", (byte)4, Test1.Scale);\r
-                        AssertEquals ("#C06", (byte)5, Test2.Precision);\r
-                        AssertEquals ("#C06", (byte)1, Test4.Precision);\r
+                        Assertion.Assert ("#C03", SqlDecimal.Null.IsNull);\r
+                        Assertion.Assert ("#C04", Test1.IsPositive);\r
+                        Assertion.Assert ("#C05", !Test4.IsPositive);\r
+                        Assertion.AssertEquals ("#C06", (byte)8, Test1.Precision);\r
+                       Assertion.AssertEquals ("#C07", (byte)0, Test2.Scale);\r
+                       Assertion.AssertEquals ("#C08", 6464.6464m, Test1.Value); \r
+                       Assertion.AssertEquals ("#C09", (byte)4, Test1.Scale);\r
+                        Assertion.AssertEquals ("#C06", (byte)5, Test2.Precision);\r
+                        Assertion.AssertEquals ("#C06", (byte)1, Test4.Precision);\r
                 }\r
 \r
                 // PUBLIC METHODS\r
-\r
-                public void TestArithmeticMethods()\r
+               [Test]\r
+                public void ArithmeticMethods()\r
                 {\r
 \r
                        // Abs\r
-                       AssertEquals ("#D01", (SqlDecimal)6m, SqlDecimal.Abs (Test4));\r
-                       AssertEquals ("#D02", new SqlDecimal (6464.6464m).Value, SqlDecimal.Abs (Test1).Value);\r
+                       Assertion.AssertEquals ("#D01", (SqlDecimal)6m, SqlDecimal.Abs (Test4));\r
+                       Assertion.AssertEquals ("#D02", new SqlDecimal (6464.6464m).Value, SqlDecimal.Abs (Test1).Value);\r
                        \r
-                       AssertEquals ("#D03", SqlDecimal.Null, SqlDecimal.Abs (SqlDecimal.Null));\r
+                       Assertion.AssertEquals ("#D03", SqlDecimal.Null, SqlDecimal.Abs (SqlDecimal.Null));\r
                        \r
                         // Add()\r
-                        AssertEquals ("#D04", 16464.6464m, SqlDecimal.Add (Test1, Test2).Value);\r
+                        Assertion.AssertEquals ("#D04", 16464.6464m, SqlDecimal.Add (Test1, Test2).Value);\r
 \r
                         try {\r
                                 SqlDecimal test = SqlDecimal.Add (SqlDecimal.MaxValue, SqlDecimal.MaxValue);\r
-                                Fail ("#D05");\r
+                                Assertion.Fail ("#D05");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#D06", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#D06", typeof (OverflowException), e.GetType ());\r
                         }\r
                         \r
-                       AssertEquals ("#D07", (SqlDecimal)6465m, SqlDecimal.Ceiling(Test1));\r
-                       AssertEquals ("#D08", SqlDecimal.Null, SqlDecimal.Ceiling(SqlDecimal.Null));\r
+                       Assertion.AssertEquals ("#D07", (SqlDecimal)6465m, SqlDecimal.Ceiling(Test1));\r
+                       Assertion.AssertEquals ("#D08", SqlDecimal.Null, SqlDecimal.Ceiling(SqlDecimal.Null));\r
                        \r
                         // Divide()\r
-                        AssertEquals ("#D09", (SqlDecimal)(-1077.441066m), SqlDecimal.Divide (Test1, Test4));\r
-                        AssertEquals ("#D10", 1.546875015m, SqlDecimal.Divide (Test2, Test1).Value);\r
+                        Assertion.AssertEquals ("#D09", (SqlDecimal)(-1077.441066m), SqlDecimal.Divide (Test1, Test4));\r
+                        Assertion.AssertEquals ("#D10", 1.546875015m, SqlDecimal.Divide (Test2, Test1).Value);\r
 \r
                         try {\r
                                 SqlDecimal test = SqlDecimal.Divide(Test1, new SqlDecimal(0)).Value;\r
-                                Fail ("#D11");\r
+                                Assertion.Fail ("#D11");\r
                         } catch(Exception e) {\r
-                                AssertEquals ("#D12", typeof (DivideByZeroException), e.GetType ());\r
+                                Assertion.AssertEquals ("#D12", typeof (DivideByZeroException), e.GetType ());\r
                         }\r
 \r
-                       AssertEquals ("#D13", (SqlDecimal)6464m, SqlDecimal.Floor (Test1));\r
+                       Assertion.AssertEquals ("#D13", (SqlDecimal)6464m, SqlDecimal.Floor (Test1));\r
                        \r
                         // Multiply()\r
-                        AssertEquals ("#D14", 64646464m, SqlDecimal.Multiply (Test1, Test2).Value);\r
-                        AssertEquals ("#D15", -38787.8784m, SqlDecimal.Multiply (Test1, Test4).Value);\r
+                        Assertion.AssertEquals ("#D14", 64646464m, SqlDecimal.Multiply (Test1, Test2).Value);\r
+                        Assertion.AssertEquals ("#D15", -38787.8784m, SqlDecimal.Multiply (Test1, Test4).Value);\r
 \r
                         try {\r
                                 SqlDecimal test = SqlDecimal.Multiply (SqlDecimal.MaxValue, Test1);\r
-                                Fail ("#D16");\r
+                                Assertion.Fail ("#D16");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#D17", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#D17", typeof (OverflowException), e.GetType ());\r
                         }\r
                         \r
                         // Power\r
-                        AssertEquals ("#D18", (SqlDecimal)41791653.0770m, SqlDecimal.Power (Test1, 2));\r
+                        Assertion.AssertEquals ("#D18", (SqlDecimal)41791653.0770m, SqlDecimal.Power (Test1, 2));\r
                        \r
                                // Round\r
-                       AssertEquals ("#D19", (SqlDecimal)6464.65m, SqlDecimal.Round (Test1, 2));\r
+                       Assertion.AssertEquals ("#D19", (SqlDecimal)6464.65m, SqlDecimal.Round (Test1, 2));\r
                        \r
                         // Subtract()\r
-                        AssertEquals ("#D20", -3535.3536m, SqlDecimal.Subtract (Test1, Test3).Value);\r
+                        Assertion.AssertEquals ("#D20", -3535.3536m, SqlDecimal.Subtract (Test1, Test3).Value);\r
 \r
                         try {\r
                                 SqlDecimal test = SqlDecimal.Subtract(SqlDecimal.MinValue, SqlDecimal.MaxValue);\r
-                                Fail ("#D21");\r
+                                Assertion.Fail ("#D21");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#D22", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#D22", typeof (OverflowException), e.GetType ());\r
                         }                           \r
                         \r
-                        AssertEquals ("#D23", (SqlInt32)1, SqlDecimal.Sign (Test1));\r
-                        AssertEquals ("#D24", new SqlInt32(-1), SqlDecimal.Sign (Test4));\r
+                        Assertion.AssertEquals ("#D23", (SqlInt32)1, SqlDecimal.Sign (Test1));\r
+                        Assertion.AssertEquals ("#D24", new SqlInt32(-1), SqlDecimal.Sign (Test4));\r
                 }\r
 \r
-               public void TestAdjustScale()\r
+               [Test]\r
+               public void AdjustScale()\r
                {\r
-                       AssertEquals ("#E01", (SqlString)"6464.646400", SqlDecimal.AdjustScale (Test1, 2, false).ToSqlString ());\r
-                       AssertEquals ("#E02", (SqlString)"6464.65", SqlDecimal.AdjustScale (Test1, -2, true).ToSqlString ());\r
-                       AssertEquals ("#E03", (SqlString)"6464.64", SqlDecimal.AdjustScale (Test1, -2, false).ToSqlString ());\r
-                       AssertEquals ("#E01", (SqlString)"10000.0000000000", SqlDecimal.AdjustScale (Test2, 10, false).ToSqlString ());\r
+                       Assertion.AssertEquals ("#E01", (SqlString)"6464.646400", SqlDecimal.AdjustScale (Test1, 2, false).ToSqlString ());\r
+                       Assertion.AssertEquals ("#E02", (SqlString)"6464.65", SqlDecimal.AdjustScale (Test1, -2, true).ToSqlString ());\r
+                       Assertion.AssertEquals ("#E03", (SqlString)"6464.64", SqlDecimal.AdjustScale (Test1, -2, false).ToSqlString ());\r
+                       Assertion.AssertEquals ("#E01", (SqlString)"10000.0000000000", SqlDecimal.AdjustScale (Test2, 10, false).ToSqlString ());\r
                }\r
                \r
-               public void TestConvertToPrecScale()\r
+               [Test]\r
+               public void ConvertToPrecScale()\r
                {\r
-                       AssertEquals ("#F01", new SqlDecimal(6464.6m).Value, SqlDecimal.ConvertToPrecScale (Test1, 5, 1).Value);\r
+                       Assertion.AssertEquals ("#F01", new SqlDecimal(6464.6m).Value, SqlDecimal.ConvertToPrecScale (Test1, 5, 1).Value);\r
                        \r
                        try {\r
                                SqlDecimal test =  SqlDecimal.ConvertToPrecScale (Test1, 6, 5);\r
-                               Fail ("#F02");\r
+                               Assertion.Fail ("#F02");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#F03", typeof (SqlTruncateException), e.GetType ());\r
+                               Assertion.AssertEquals ("#F03", typeof (SqlTruncateException), e.GetType ());\r
                        }\r
                        \r
-                       AssertEquals ("#F01", (SqlString)"10000.00", SqlDecimal.ConvertToPrecScale (Test2, 7, 2).ToSqlString ());                       \r
+                       Assertion.AssertEquals ("#F01", (SqlString)"10000.00", SqlDecimal.ConvertToPrecScale (Test2, 7, 2).ToSqlString ());                     \r
                }\r
                \r
-                public void TestCompareTo()\r
+               [Test]\r
+                public void CompareTo()\r
                 {\r
                         SqlString TestString = new SqlString ("This is a test");\r
 \r
-                        Assert ("#G01", Test1.CompareTo (Test3) < 0);\r
-                        Assert ("#G02", Test2.CompareTo (Test1) > 0);\r
-                        Assert ("#G03", Test2.CompareTo (Test3) == 0);\r
-                        Assert ("#G04", Test4.CompareTo (SqlDecimal.Null) > 0);\r
+                        Assertion.Assert ("#G01", Test1.CompareTo (Test3) < 0);\r
+                        Assertion.Assert ("#G02", Test2.CompareTo (Test1) > 0);\r
+                        Assertion.Assert ("#G03", Test2.CompareTo (Test3) == 0);\r
+                        Assertion.Assert ("#G04", Test4.CompareTo (SqlDecimal.Null) > 0);\r
 \r
                         try {\r
                                 Test1.CompareTo (TestString);\r
-                                Fail("#G05");\r
+                                Assertion.Fail("#G05");\r
                         } catch(Exception e) {\r
-                                AssertEquals ("#G06", typeof (ArgumentException), e.GetType ());\r
+                                Assertion.AssertEquals ("#G06", typeof (ArgumentException), e.GetType ());\r
                         }\r
                 }\r
 \r
-                public void TestEqualsMethods()\r
+               [Test]\r
+                public void EqualsMethods()\r
                 {\r
-                        Assert ("#H01", !Test1.Equals (Test2));\r
-                        Assert ("#H02", !Test2.Equals (new SqlString ("TEST")));\r
-                        Assert ("#H03", Test2.Equals (Test3));\r
+                        Assertion.Assert ("#H01", !Test1.Equals (Test2));\r
+                        Assertion.Assert ("#H02", !Test2.Equals (new SqlString ("TEST")));\r
+                        Assertion.Assert ("#H03", Test2.Equals (Test3));\r
 \r
                         // Static Equals()-method\r
-                        Assert ("#H05", SqlDecimal.Equals (Test2, Test2).Value);\r
-                        Assert ("#H06", !SqlDecimal.Equals (Test1, Test2).Value);\r
+                        Assertion.Assert ("#H05", SqlDecimal.Equals (Test2, Test2).Value);\r
+                        Assertion.Assert ("#H06", !SqlDecimal.Equals (Test1, Test2).Value);\r
                        \r
                        // NotEquals\r
-                        Assert ("#H07", SqlDecimal.NotEquals (Test1, Test2).Value);\r
-                        Assert ("#H08", SqlDecimal.NotEquals (Test4, Test1).Value);\r
-                        Assert ("#H09", !SqlDecimal.NotEquals (Test2, Test3).Value);\r
-                        Assert ("#H10", SqlDecimal.NotEquals (SqlDecimal.Null, Test3).IsNull);                 \r
+                        Assertion.Assert ("#H07", SqlDecimal.NotEquals (Test1, Test2).Value);\r
+                        Assertion.Assert ("#H08", SqlDecimal.NotEquals (Test4, Test1).Value);\r
+                        Assertion.Assert ("#H09", !SqlDecimal.NotEquals (Test2, Test3).Value);\r
+                        Assertion.Assert ("#H10", SqlDecimal.NotEquals (SqlDecimal.Null, Test3).IsNull);                 \r
                 }\r
 \r
-                public void TestGetHashCode()\r
+               [Test]\r
+                public void GetHashCodeTest()\r
                 {\r
                         // FIXME: Better way to test HashCode\r
-                        AssertEquals ("#I01", -1281249885, Test1.GetHashCode ());\r
+                        Assertion.AssertEquals ("#I01", -1281249885, Test1.GetHashCode ());\r
                 }\r
 \r
-                public void TestGetType()\r
+               [Test]\r
+                public void GetTypeTest()\r
                 {\r
-                        AssertEquals ("#J01", "System.Data.SqlTypes.SqlDecimal", \r
+                        Assertion.AssertEquals ("#J01", "System.Data.SqlTypes.SqlDecimal", \r
                                       Test1.GetType ().ToString ());\r
-                        AssertEquals ("#J02", "System.Decimal", Test1.Value.GetType ().ToString ());\r
+                        Assertion.AssertEquals ("#J02", "System.Decimal", Test1.Value.GetType ().ToString ());\r
                 }\r
 \r
-                public void TestGreaters()\r
+               [Test]\r
+                public void Greaters()\r
                 {\r
                         // GreateThan ()\r
-                        Assert ("#K01", !SqlDecimal.GreaterThan (Test1, Test2).Value);\r
-                        Assert ("#K02", SqlDecimal.GreaterThan (Test2, Test1).Value);\r
-                        Assert ("#K03", !SqlDecimal.GreaterThan (Test2, Test3).Value);\r
+                        Assertion.Assert ("#K01", !SqlDecimal.GreaterThan (Test1, Test2).Value);\r
+                        Assertion.Assert ("#K02", SqlDecimal.GreaterThan (Test2, Test1).Value);\r
+                        Assertion.Assert ("#K03", !SqlDecimal.GreaterThan (Test2, Test3).Value);\r
 \r
                         // GreaterTharOrEqual ()\r
-                        Assert ("#K04", !SqlDecimal.GreaterThanOrEqual (Test1, Test2).Value);\r
-                        Assert ("#K05", SqlDecimal.GreaterThanOrEqual (Test2, Test1).Value);\r
-                        Assert ("#K06", SqlDecimal.GreaterThanOrEqual (Test2, Test3).Value);\r
+                        Assertion.Assert ("#K04", !SqlDecimal.GreaterThanOrEqual (Test1, Test2).Value);\r
+                        Assertion.Assert ("#K05", SqlDecimal.GreaterThanOrEqual (Test2, Test1).Value);\r
+                        Assertion.Assert ("#K06", SqlDecimal.GreaterThanOrEqual (Test2, Test3).Value);\r
                 }\r
 \r
-                public void TestLessers()\r
+               [Test]\r
+                public void Lessers()\r
                 {\r
                         // LessThan()\r
-                        Assert ("#L01", !SqlDecimal.LessThan (Test3, Test2).Value);\r
-                        Assert ("#L02", !SqlDecimal.LessThan (Test2, Test1).Value);\r
-                        Assert ("#L03", SqlDecimal.LessThan (Test1, Test2).Value);\r
+                        Assertion.Assert ("#L01", !SqlDecimal.LessThan (Test3, Test2).Value);\r
+                        Assertion.Assert ("#L02", !SqlDecimal.LessThan (Test2, Test1).Value);\r
+                        Assertion.Assert ("#L03", SqlDecimal.LessThan (Test1, Test2).Value);\r
 \r
                         // LessThanOrEqual ()\r
-                        Assert ("#L04", SqlDecimal.LessThanOrEqual (Test1, Test2).Value);\r
-                        Assert ("#L05", !SqlDecimal.LessThanOrEqual (Test2, Test1).Value);\r
-                        Assert ("#L06", SqlDecimal.LessThanOrEqual (Test2, Test3).Value);\r
-                        Assert ("#L07", SqlDecimal.LessThanOrEqual (Test1, SqlDecimal.Null).IsNull);\r
+                        Assertion.Assert ("#L04", SqlDecimal.LessThanOrEqual (Test1, Test2).Value);\r
+                        Assertion.Assert ("#L05", !SqlDecimal.LessThanOrEqual (Test2, Test1).Value);\r
+                        Assertion.Assert ("#L06", SqlDecimal.LessThanOrEqual (Test2, Test3).Value);\r
+                        Assertion.Assert ("#L07", SqlDecimal.LessThanOrEqual (Test1, SqlDecimal.Null).IsNull);\r
                 }\r
 \r
-                public void TestParse()\r
+               [Test]\r
+                public void Parse()\r
                 {\r
                         try {\r
                                 SqlDecimal.Parse (null);\r
-                                Fail ("#m01");\r
+                                Assertion.Fail ("#m01");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#M02", typeof (ArgumentNullException), e.GetType ());\r
+                                Assertion.AssertEquals ("#M02", typeof (ArgumentNullException), e.GetType ());\r
                         }\r
 \r
                         try {\r
                                 SqlDecimal.Parse ("not-a-number");\r
-                                Fail ("#M03");\r
+                                Assertion.Fail ("#M03");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#M04", typeof (FormatException), e.GetType ());\r
+                                Assertion.AssertEquals ("#M04", typeof (FormatException), e.GetType ());\r
                         }\r
 \r
                          try {\r
                                 SqlDecimal test = SqlDecimal.Parse ("9e300");\r
-                                Fail ("#M05");\r
+                                Assertion.Fail ("#M05");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#M06", typeof (FormatException), e.GetType ());\r
+                                Assertion.AssertEquals ("#M06", typeof (FormatException), e.GetType ());\r
                         }\r
 \r
-                        AssertEquals("#M07", 150m, SqlDecimal.Parse ("150").Value);\r
+                        Assertion.AssertEquals("#M07", 150m, SqlDecimal.Parse ("150").Value);\r
                 }\r
 \r
-                public void TestConversions()\r
+               [Test]\r
+                public void Conversions()\r
                 {\r
                        // ToDouble\r
-                       AssertEquals ("N01", 6464.6464, Test1.ToDouble ());\r
+                       Assertion.AssertEquals ("N01", 6464.6464, Test1.ToDouble ());\r
                        \r
                         // ToSqlBoolean ()\r
-                               AssertEquals ("#N02", new SqlBoolean(1), Test1.ToSqlBoolean ());\r
+                               Assertion.AssertEquals ("#N02", new SqlBoolean(1), Test1.ToSqlBoolean ());\r
                         \r
                         SqlDecimal Test = new SqlDecimal (0);\r
-                        Assert ("#N03", !Test.ToSqlBoolean ().Value);\r
+                        Assertion.Assert ("#N03", !Test.ToSqlBoolean ().Value);\r
                        \r
                        Test = new SqlDecimal (0);\r
-                       Assert ("#N04", !Test.ToSqlBoolean ().Value);\r
-                        Assert ("#N05", SqlDecimal.Null.ToSqlBoolean ().IsNull);\r
+                       Assertion.Assert ("#N04", !Test.ToSqlBoolean ().Value);\r
+                        Assertion.Assert ("#N05", SqlDecimal.Null.ToSqlBoolean ().IsNull);\r
 \r
                         // ToSqlByte ()\r
                         Test = new SqlDecimal (250);\r
-                        AssertEquals ("#N06", (byte)250, Test.ToSqlByte ().Value);\r
+                        Assertion.AssertEquals ("#N06", (byte)250, Test.ToSqlByte ().Value);\r
 \r
                         try {\r
                                 SqlByte b = (byte)Test2.ToSqlByte ();\r
-                                Fail ("#N07");\r
+                                Assertion.Fail ("#N07");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#N08", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#N08", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
                         // ToSqlDouble ()\r
-                        AssertEquals ("#N09", (SqlDouble)6464.6464, Test1.ToSqlDouble ());\r
+                        Assertion.AssertEquals ("#N09", (SqlDouble)6464.6464, Test1.ToSqlDouble ());\r
 \r
                         // ToSqlInt16 ()\r
-                        AssertEquals ("#N10", (short)1, new SqlDecimal (1).ToSqlInt16 ().Value);\r
+                        Assertion.AssertEquals ("#N10", (short)1, new SqlDecimal (1).ToSqlInt16 ().Value);\r
 \r
                         try {\r
                                 SqlInt16 test = SqlDecimal.MaxValue.ToSqlInt16().Value;\r
-                                Fail ("#N11");\r
+                                Assertion.Fail ("#N11");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#N12", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#N12", typeof (OverflowException), e.GetType ());\r
                         }        \r
 \r
                         // ToSqlInt32 () \r
                         // FIXME: 6464.6464 --> 64646464 ??? with windows\r
-                        AssertEquals ("#N13a", (int)64646464, Test1.ToSqlInt32 ().Value);\r
-                       AssertEquals ("#N13b", (int)1212, new SqlDecimal(12.12m).ToSqlInt32 ().Value);\r
+                        Assertion.AssertEquals ("#N13a", (int)64646464, Test1.ToSqlInt32 ().Value);\r
+                       Assertion.AssertEquals ("#N13b", (int)1212, new SqlDecimal(12.12m).ToSqlInt32 ().Value);\r
                        \r
                         try {\r
                                 SqlInt32 test = SqlDecimal.MaxValue.ToSqlInt32 ().Value;\r
-                                Fail ("#N14");\r
+                                Assertion.Fail ("#N14");\r
                         } catch (Exception e) { \r
-                                AssertEquals ("#N15", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#N15", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
                         // ToSqlInt64 ()\r
-                        AssertEquals ("#N16", (long)6464, Test1.ToSqlInt64 ().Value);\r
+                        Assertion.AssertEquals ("#N16", (long)6464, Test1.ToSqlInt64 ().Value);\r
 \r
                         // ToSqlMoney ()\r
-                        AssertEquals ("#N17", (decimal)6464.6464, Test1.ToSqlMoney ().Value);\r
+                        Assertion.AssertEquals ("#N17", (decimal)6464.6464, Test1.ToSqlMoney ().Value);\r
 \r
                         try {\r
                                 SqlMoney test = SqlDecimal.MaxValue.ToSqlMoney ().Value;\r
-                                Fail ("#N18");\r
+                                Assertion.Fail ("#N18");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#N19", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#N19", typeof (OverflowException), e.GetType ());\r
                         }        \r
 \r
                         // ToSqlSingle ()\r
-                        AssertEquals ("#N20", (float)6464.6464, Test1.ToSqlSingle ().Value);\r
+                        Assertion.AssertEquals ("#N20", (float)6464.6464, Test1.ToSqlSingle ().Value);\r
 \r
                         // ToSqlString ()\r
-                        AssertEquals ("#N21", "6464.6464", Test1.ToSqlString ().Value);\r
+                        Assertion.AssertEquals ("#N21", "6464.6464", Test1.ToSqlString ().Value);\r
 \r
                         // ToString ()\r
-                        AssertEquals ("#N22", "6464.6464", Test1.ToString ());                        \r
-                       AssertEquals ("#N23", (SqlDouble)1E+38, SqlDecimal.MaxValue.ToSqlDouble ());\r
+                        Assertion.AssertEquals ("#N22", "6464.6464", Test1.ToString ());                        \r
+                       Assertion.AssertEquals ("#N23", (SqlDouble)1E+38, SqlDecimal.MaxValue.ToSqlDouble ());\r
 \r
                 }\r
                 \r
-                public void TestTruncate()\r
+               [Test]\r
+                public void Truncate()\r
                 {\r
-                       AssertEquals ("#O01", new SqlDecimal (6464.64m).Value, SqlDecimal.Truncate (Test1, 2).Value);\r
+                       Assertion.AssertEquals ("#O01", new SqlDecimal (6464.64m).Value, SqlDecimal.Truncate (Test1, 2).Value);\r
                 }\r
                 \r
                 // OPERATORS\r
 \r
-                public void TestArithmeticOperators()\r
+               [Test]\r
+                public void ArithmeticOperators()\r
                 {\r
                         // "+"-operator\r
-                        AssertEquals ("#P01", new SqlDecimal(16464.6464m), Test1 + Test2);\r
+                        Assertion.AssertEquals ("#P01", new SqlDecimal(16464.6464m), Test1 + Test2);\r
      \r
                         try {\r
                                 SqlDecimal test = SqlDecimal.MaxValue + SqlDecimal.MaxValue;\r
-                                Fail ("#P02");\r
+                                Assertion.Fail ("#P02");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#P03", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#P03", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
                         // "/"-operator\r
-                        AssertEquals ("#P04", (SqlDecimal)1.546875015m, Test2 / Test1);\r
+                        Assertion.AssertEquals ("#P04", (SqlDecimal)1.546875015m, Test2 / Test1);\r
 \r
                         try {\r
                                 SqlDecimal test = Test3 / new SqlDecimal (0);\r
-                                Fail ("#P05");\r
+                                Assertion.Fail ("#P05");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#P06", typeof (DivideByZeroException), e.GetType ());\r
+                                Assertion.AssertEquals ("#P06", typeof (DivideByZeroException), e.GetType ());\r
                         }\r
 \r
                         // "*"-operator\r
-                        AssertEquals ("#P07", (SqlDecimal)64646464m, Test1 * Test2);\r
+                        Assertion.AssertEquals ("#P07", (SqlDecimal)64646464m, Test1 * Test2);\r
 \r
                         try {\r
                                 SqlDecimal test = SqlDecimal.MaxValue * Test1;\r
-                                Fail ("#P08");\r
+                                Assertion.Fail ("#P08");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#P09", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#P09", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
                         // "-"-operator\r
-                        AssertEquals ("#P10", (SqlDecimal)3535.3536m, Test2 - Test1);\r
+                        Assertion.AssertEquals ("#P10", (SqlDecimal)3535.3536m, Test2 - Test1);\r
 \r
                         try {\r
                                 SqlDecimal test = SqlDecimal.MinValue - SqlDecimal.MaxValue;\r
-                                Fail ("#P11");\r
+                                Assertion.Fail ("#P11");\r
                         } catch  (Exception e) {\r
-                                AssertEquals ("#P12", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#P12", typeof (OverflowException), e.GetType ());\r
                         }\r
                         \r
-                        AssertEquals ("#P13", SqlDecimal.Null, SqlDecimal.Null + Test1);\r
+                        Assertion.AssertEquals ("#P13", SqlDecimal.Null, SqlDecimal.Null + Test1);\r
                 }\r
 \r
-                public void TestThanOrEqualOperators()\r
+               [Test]\r
+                public void ThanOrEqualOperators()\r
                 {\r
 \r
                         // == -operator\r
-                        Assert ("#Q01", (Test2 == Test3).Value);\r
-                        Assert ("#Q02", !(Test1 == Test2).Value);\r
-                        Assert ("#Q03", (Test1 == SqlDecimal.Null).IsNull);\r
+                        Assertion.Assert ("#Q01", (Test2 == Test3).Value);\r
+                        Assertion.Assert ("#Q02", !(Test1 == Test2).Value);\r
+                        Assertion.Assert ("#Q03", (Test1 == SqlDecimal.Null).IsNull);\r
                         \r
                         // != -operator\r
-                        Assert ("#Q04", !(Test2 != Test3).Value);\r
-                        Assert ("#Q05", (Test1 != Test3).Value);\r
-                        Assert ("#Q06", (Test4 != Test3).Value);\r
-                        Assert ("#Q07", (Test1 != SqlDecimal.Null).IsNull);\r
+                        Assertion.Assert ("#Q04", !(Test2 != Test3).Value);\r
+                        Assertion.Assert ("#Q05", (Test1 != Test3).Value);\r
+                        Assertion.Assert ("#Q06", (Test4 != Test3).Value);\r
+                        Assertion.Assert ("#Q07", (Test1 != SqlDecimal.Null).IsNull);\r
 \r
                         // > -operator\r
-                        Assert ("#Q08", (Test2 > Test1).Value);\r
-                        Assert ("#Q09", !(Test1 > Test3).Value);\r
-                        Assert ("#Q10", !(Test2 > Test3).Value);\r
-                        Assert ("#Q11", (Test1 > SqlDecimal.Null).IsNull);\r
+                        Assertion.Assert ("#Q08", (Test2 > Test1).Value);\r
+                        Assertion.Assert ("#Q09", !(Test1 > Test3).Value);\r
+                        Assertion.Assert ("#Q10", !(Test2 > Test3).Value);\r
+                        Assertion.Assert ("#Q11", (Test1 > SqlDecimal.Null).IsNull);\r
 \r
                         // >=  -operator\r
-                        Assert ("#Q12", !(Test1 >= Test3).Value);\r
-                        Assert ("#Q13", (Test3 >= Test1).Value);\r
-                        Assert ("#Q14", (Test2 >= Test3).Value);\r
-                        Assert ("#Q15", (Test1 >= SqlDecimal.Null).IsNull);\r
+                        Assertion.Assert ("#Q12", !(Test1 >= Test3).Value);\r
+                        Assertion.Assert ("#Q13", (Test3 >= Test1).Value);\r
+                        Assertion.Assert ("#Q14", (Test2 >= Test3).Value);\r
+                        Assertion.Assert ("#Q15", (Test1 >= SqlDecimal.Null).IsNull);\r
 \r
                         // < -operator\r
-                        Assert ("#Q16", !(Test2 < Test1).Value);\r
-                        Assert ("#Q17", (Test1 < Test3).Value);\r
-                        Assert ("#Q18", !(Test2 < Test3).Value);\r
-                        Assert ("#Q19", (Test1 < SqlDecimal.Null).IsNull);\r
+                        Assertion.Assert ("#Q16", !(Test2 < Test1).Value);\r
+                        Assertion.Assert ("#Q17", (Test1 < Test3).Value);\r
+                        Assertion.Assert ("#Q18", !(Test2 < Test3).Value);\r
+                        Assertion.Assert ("#Q19", (Test1 < SqlDecimal.Null).IsNull);\r
 \r
                         // <= -operator\r
-                        Assert ("#Q20", (Test1 <= Test3).Value);\r
-                        Assert ("#Q21", !(Test3 <= Test1).Value);\r
-                        Assert ("#Q22", (Test2 <= Test3).Value);\r
-                        Assert ("#Q23", (Test1 <= SqlDecimal.Null).IsNull);\r
+                        Assertion.Assert ("#Q20", (Test1 <= Test3).Value);\r
+                        Assertion.Assert ("#Q21", !(Test3 <= Test1).Value);\r
+                        Assertion.Assert ("#Q22", (Test2 <= Test3).Value);\r
+                        Assertion.Assert ("#Q23", (Test1 <= SqlDecimal.Null).IsNull);\r
                 }\r
 \r
-                public void TestUnaryNegation()\r
+               [Test]\r
+                public void UnaryNegation()\r
                 {\r
-                        AssertEquals ("#R01", 6m, -Test4.Value);\r
-                        AssertEquals ("#R02", -6464.6464m, -Test1.Value);\r
-                        AssertEquals ("#R03", SqlDecimal.Null, SqlDecimal.Null);\r
+                        Assertion.AssertEquals ("#R01", 6m, -Test4.Value);\r
+                        Assertion.AssertEquals ("#R02", -6464.6464m, -Test1.Value);\r
+                        Assertion.AssertEquals ("#R03", SqlDecimal.Null, SqlDecimal.Null);\r
                 }\r
 \r
-                public void TestSqlBooleanToSqlDecimal()\r
+               [Test]\r
+                public void SqlBooleanToSqlDecimal()\r
                 {\r
                         SqlBoolean TestBoolean = new SqlBoolean (true);\r
                         SqlDecimal Result;\r
 \r
                         Result = (SqlDecimal)TestBoolean;\r
 \r
-                        AssertEquals ("#S01", 1m, Result.Value);\r
+                        Assertion.AssertEquals ("#S01", 1m, Result.Value);\r
 \r
                         Result = (SqlDecimal)SqlBoolean.Null;\r
-                        Assert ("#S02", Result.IsNull);\r
-                       AssertEquals ("#S03", SqlDecimal.Null, (SqlDecimal)SqlBoolean.Null);\r
+                        Assertion.Assert ("#S02", Result.IsNull);\r
+                       Assertion.AssertEquals ("#S03", SqlDecimal.Null, (SqlDecimal)SqlBoolean.Null);\r
                 }\r
                \r
-               public void TestSqlDecimalToDecimal()\r
+               [Test]\r
+               public void SqlDecimalToDecimal()\r
                {\r
-                       AssertEquals ("#T01", 6464.6464m, (Decimal)Test1);\r
+                       Assertion.AssertEquals ("#T01", 6464.6464m, (Decimal)Test1);\r
                }\r
 \r
-                public void TestSqlDoubleToSqlDecimal()\r
+               [Test]\r
+                public void SqlDoubleToSqlDecimal()\r
                 {\r
                         SqlDouble Test = new SqlDouble (12E+10);\r
-                        AssertEquals ("#U01", 120000000000m, ((SqlDecimal)Test).Value);\r
+                        Assertion.AssertEquals ("#U01", 120000000000m, ((SqlDecimal)Test).Value);\r
                 }\r
                 \r
-                public void TestSqlSingleToSqlDecimal()\r
+               [Test]\r
+                public void SqlSingleToSqlDecimal()\r
                 {\r
                        SqlSingle Test = new SqlSingle (1E+9);\r
-                       AssertEquals ("#V01", 1000000000m, ((SqlDecimal)Test).Value);\r
+                       Assertion.AssertEquals ("#V01", 1000000000m, ((SqlDecimal)Test).Value);\r
                        \r
                        try {\r
                                SqlDecimal test = (SqlDecimal)SqlSingle.MaxValue;\r
-                               Fail ("#V02");\r
+                               Assertion.Fail ("#V02");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#V03", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#V03", typeof (OverflowException), e.GetType ());\r
                        }\r
                 }\r
 \r
-                public void TestSqlStringToSqlDecimal()\r
+               [Test]\r
+                public void SqlStringToSqlDecimal()\r
                 {\r
                         SqlString TestString = new SqlString ("Test string");\r
                         SqlString TestString100 = new SqlString ("100");\r
 \r
-                        AssertEquals ("#W01", 100m, ((SqlDecimal)TestString100).Value);\r
+                        Assertion.AssertEquals ("#W01", 100m, ((SqlDecimal)TestString100).Value);\r
 \r
                         try {\r
                                 SqlDecimal test = (SqlDecimal)TestString;\r
-                                Fail ("#W02");\r
+                                Assertion.Fail ("#W02");\r
                         } catch(Exception e) {\r
-                                AssertEquals ("#W03", typeof (FormatException), e.GetType ());\r
+                                Assertion.AssertEquals ("#W03", typeof (FormatException), e.GetType ());\r
                         }\r
                         \r
                         try {\r
                                SqlDecimal test = (SqlDecimal)new SqlString("9E+100");\r
-                               Fail ("#W04");\r
+                               Assertion.Fail ("#W04");\r
                         } catch (Exception e) {\r
-                               AssertEquals ("#W05", typeof (FormatException), e.GetType());\r
+                               Assertion.AssertEquals ("#W05", typeof (FormatException), e.GetType());\r
                         }\r
                 }\r
 \r
-               public void TestDecimalToSqlDecimal()\r
+               [Test]\r
+               public void DecimalToSqlDecimal()\r
                {\r
                        decimal d = 1000.1m;\r
-                       AssertEquals ("#X01", (SqlDecimal)1000.1m, (SqlDecimal)d);              \r
+                       Assertion.AssertEquals ("#X01", (SqlDecimal)1000.1m, (SqlDecimal)d);            \r
                }\r
                \r
-                public void TestByteToSqlDecimal()\r
+               [Test]\r
+                public void ByteToSqlDecimal()\r
                 {                      \r
-                        AssertEquals ("#Y01", 255m, ((SqlDecimal)SqlByte.MaxValue).Value);\r
+                        Assertion.AssertEquals ("#Y01", 255m, ((SqlDecimal)SqlByte.MaxValue).Value);\r
                 }\r
                 \r
-\r
-                public void TestSqlIntToSqlDouble()\r
+               [Test]\r
+                public void SqlIntToSqlDouble()\r
                 {\r
                         SqlInt16 Test64 = new SqlInt16 (64);\r
                         SqlInt32 Test640 = new SqlInt32 (640);\r
                         SqlInt64 Test64000 = new SqlInt64 (64000);\r
-                        AssertEquals ("#Z01", 64m, ((SqlDecimal)Test64).Value);\r
-                        AssertEquals ("#Z02", 640m,((SqlDecimal)Test640).Value);\r
-                        AssertEquals ("#Z03", 64000m, ((SqlDecimal)Test64000).Value);\r
+                        Assertion.AssertEquals ("#Z01", 64m, ((SqlDecimal)Test64).Value);\r
+                        Assertion.AssertEquals ("#Z02", 640m,((SqlDecimal)Test640).Value);\r
+                        Assertion.AssertEquals ("#Z03", 64000m, ((SqlDecimal)Test64000).Value);\r
                 }\r
 \r
-\r
-                public void TestSqlMoneyToSqlDecimal()\r
+               [Test]\r
+                public void SqlMoneyToSqlDecimal()\r
                 {\r
                         SqlMoney TestMoney64 = new SqlMoney(64);\r
-                        AssertEquals ("#AA01", 64M, ((SqlDecimal)TestMoney64).Value);\r
+                        Assertion.AssertEquals ("#AA01", 64M, ((SqlDecimal)TestMoney64).Value);\r
                 }\r
         }\r
 }\r
index 45f30378c8bac6d4995796c303f3d5065a73e359..9f848f01150429dec85fe41c045b05d30c929285 100644 (file)
@@ -1,9 +1,12 @@
 //
 // SqlDoubleTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlDouble
 //
-// Ville Palo (vi64pa@koti.soon.fi)
+// Authors:
+//   Ville Palo (vi64pa@koti.soon.fi)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
-// (C) Ville Palo 2002
+// (C) 2002 Ville Palo
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -12,54 +15,46 @@ using System.Data.SqlTypes;
 
 namespace MonoTests.System.Data.SqlTypes
 {
-        public class SqlDoubleTest : TestCase {
-
-                public SqlDoubleTest() : base ("System.Data.SqlTypes.SqlDouble") {}
-                public SqlDoubleTest(string name) : base(name) {}
-
-                protected override void TearDown() {}
-
-                protected override void SetUp() {}
-
-                public static ITest Suite {
-                        get {
-                                return new TestSuite(typeof(SqlDouble));
-                        }
-                }
+       [TestFixture]
+        public class SqlDoubleTest {
 
                 // Test constructor
-                public void TestCreate()
+               [Test]
+                public void Create()
                 {
                         SqlDouble Test= new SqlDouble ((double)34.87);
-                        AssertEquals ("#A01", 34.87D, Test.Value);
+                        Assertion.AssertEquals ("#A01", 34.87D, Test.Value);
 
                         Test = new SqlDouble (-9000.6543);
-                        AssertEquals ("#A02", -9000.6543D, Test.Value);
+                        Assertion.AssertEquals ("#A02", -9000.6543D, Test.Value);
                 }
 
                 // Test public fields
-                public void TestPublicFields()
+               [Test]
+                public void PublicFields()
                 {
-                        AssertEquals ("#B01", 1.7976931348623157e+308, SqlDouble.MaxValue.Value);
-                        AssertEquals ("#B02", -1.7976931348623157e+308, SqlDouble.MinValue.Value);
-                        Assert ("#B03", SqlDouble.Null.IsNull);
-                        AssertEquals ("#B04", 0d, SqlDouble.Zero.Value);
+                        Assertion.AssertEquals ("#B01", 1.7976931348623157e+308, SqlDouble.MaxValue.Value);
+                        Assertion.AssertEquals ("#B02", -1.7976931348623157e+308, SqlDouble.MinValue.Value);
+                        Assertion.Assert ("#B03", SqlDouble.Null.IsNull);
+                        Assertion.AssertEquals ("#B04", 0d, SqlDouble.Zero.Value);
                 }
 
                 // Test properties
-                public void TestProperties()
+               [Test]
+                public void Properties()
                 {
                         SqlDouble Test5443 = new SqlDouble (5443e12);
                         SqlDouble Test1 = new SqlDouble (1);
 
-                        Assert ("#C01", SqlDouble.Null.IsNull);
-                        AssertEquals ("#C02", 5443e12, Test5443.Value);
-                        AssertEquals ("#C03", (double)1, Test1.Value);
+                        Assertion.Assert ("#C01", SqlDouble.Null.IsNull);
+                        Assertion.AssertEquals ("#C02", 5443e12, Test5443.Value);
+                        Assertion.AssertEquals ("#C03", (double)1, Test1.Value);
                 }
 
                 // PUBLIC METHODS
 
-                public void TestArithmeticMethods()
+               [Test]
+                public void ArithmeticMethods()
                 {
                         SqlDouble Test0 = new SqlDouble (0);
                         SqlDouble Test1 = new SqlDouble (15E+108);
@@ -69,51 +64,52 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlDouble TestMax = new SqlDouble (SqlDouble.MaxValue.Value);
 
                         // Add()
-                        AssertEquals ("#D01A", 15E+108, SqlDouble.Add (Test1, Test0).Value);
-                        AssertEquals ("#D02A", 1.5E+109, SqlDouble.Add (Test1, Test2).Value);
+                        Assertion.AssertEquals ("#D01A", 15E+108, SqlDouble.Add (Test1, Test0).Value);
+                        Assertion.AssertEquals ("#D02A", 1.5E+109, SqlDouble.Add (Test1, Test2).Value);
 
                         try {
                                 SqlDouble test = SqlDouble.Add (SqlDouble.MaxValue, SqlDouble.MaxValue);
-                                Fail ("#D03A");
+                                Assertion.Fail ("#D03A");
                         } catch (Exception e) {
-                                AssertEquals ("#D04A", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D04A", typeof (OverflowException), e.GetType ());
                         }
                         
                         // Divide()
-                        AssertEquals ("#D01B", (SqlDouble)3, SqlDouble.Divide (Test1, Test4));
-                        AssertEquals ("#D02B", -13d, SqlDouble.Divide (Test2, Test3).Value);
+                        Assertion.AssertEquals ("#D01B", (SqlDouble)3, SqlDouble.Divide (Test1, Test4));
+                        Assertion.AssertEquals ("#D02B", -13d, SqlDouble.Divide (Test2, Test3).Value);
 
                         try {
                                 SqlDouble test = SqlDouble.Divide(Test1, Test0).Value;
-                                Fail ("#D03B");
+                                Assertion.Fail ("#D03B");
                         } catch(Exception e) {
-                                AssertEquals ("#D04B", typeof (DivideByZeroException), e.GetType ());
+                                Assertion.AssertEquals ("#D04B", typeof (DivideByZeroException), e.GetType ());
                         }
 
                         // Multiply()
-                        AssertEquals ("#D01D", (double)(75E+216), SqlDouble.Multiply (Test1, Test4).Value);
-                        AssertEquals ("#D02D", (double)0, SqlDouble.Multiply (Test1, Test0).Value);
+                        Assertion.AssertEquals ("#D01D", (double)(75E+216), SqlDouble.Multiply (Test1, Test4).Value);
+                        Assertion.AssertEquals ("#D02D", (double)0, SqlDouble.Multiply (Test1, Test0).Value);
 
                         try {
                                 SqlDouble test = SqlDouble.Multiply (TestMax, Test1);
-                                Fail ("#D03D");
+                                Assertion.Fail ("#D03D");
                         } catch (Exception e) {
-                                AssertEquals ("#D04D", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D04D", typeof (OverflowException), e.GetType ());
                         }
                                 
 
                         // Subtract()
-                        AssertEquals ("#D01F", (double)1.5E+109, SqlDouble.Subtract (Test1, Test3).Value);
+                        Assertion.AssertEquals ("#D01F", (double)1.5E+109, SqlDouble.Subtract (Test1, Test3).Value);
 
                         try {
                                 SqlDouble test = SqlDouble.Subtract(SqlDouble.MinValue, SqlDouble.MaxValue);
-                                Fail ("D02F");
+                                Assertion.Fail ("D02F");
                         } catch (Exception e) {
-                                AssertEquals ("#D03F", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D03F", typeof (OverflowException), e.GetType ());
                         }                                
                 }
 
-                public void TestCompareTo()
+               [Test]
+                public void CompareTo()
                 {
                         SqlDouble Test1 = new SqlDouble (4e64);
                         SqlDouble Test11 = new SqlDouble (4e64);
@@ -121,129 +117,137 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlDouble Test3 = new SqlDouble (10000);
                         SqlString TestString = new SqlString ("This is a test");
 
-                        Assert ("#E01", Test1.CompareTo (Test3) > 0);
-                        Assert ("#E02", Test2.CompareTo (Test3) < 0);
-                        Assert ("#E03", Test1.CompareTo (Test11) == 0);
-                        Assert ("#E04", Test11.CompareTo (SqlDouble.Null) > 0);
+                        Assertion.Assert ("#E01", Test1.CompareTo (Test3) > 0);
+                        Assertion.Assert ("#E02", Test2.CompareTo (Test3) < 0);
+                        Assertion.Assert ("#E03", Test1.CompareTo (Test11) == 0);
+                        Assertion.Assert ("#E04", Test11.CompareTo (SqlDouble.Null) > 0);
 
                         try {
                                 Test1.CompareTo (TestString);
-                                Fail("#E05");
+                                Assertion.Fail("#E05");
                         } catch(Exception e) {
-                                AssertEquals ("#E06", typeof (ArgumentException), e.GetType ());
+                                Assertion.AssertEquals ("#E06", typeof (ArgumentException), e.GetType ());
                         }
                 }
 
-                public void TestEqualsMethods()
+               [Test]
+                public void EqualsMethods()
                 {
                         SqlDouble Test0 = new SqlDouble (0);
                         SqlDouble Test1 = new SqlDouble (1.58e30);
                         SqlDouble Test2 = new SqlDouble (1.8e180);
                         SqlDouble Test22 = new SqlDouble (1.8e180);
 
-                        Assert ("#F01", !Test0.Equals (Test1));
-                        Assert ("#F02", !Test1.Equals (Test2));
-                        Assert ("#F03", !Test2.Equals (new SqlString ("TEST")));
-                        Assert ("#F04", Test2.Equals (Test22));
+                        Assertion.Assert ("#F01", !Test0.Equals (Test1));
+                        Assertion.Assert ("#F02", !Test1.Equals (Test2));
+                        Assertion.Assert ("#F03", !Test2.Equals (new SqlString ("TEST")));
+                        Assertion.Assert ("#F04", Test2.Equals (Test22));
 
                         // Static Equals()-method
-                        Assert ("#F05", SqlDouble.Equals (Test2, Test22).Value);
-                        Assert ("#F06", !SqlDouble.Equals (Test1, Test2).Value);
+                        Assertion.Assert ("#F05", SqlDouble.Equals (Test2, Test22).Value);
+                        Assertion.Assert ("#F06", !SqlDouble.Equals (Test1, Test2).Value);
                 }
 
-                public void TestGetHashCode()
+               [Test]
+                public void GetHashCodeTest()
                 {
                         SqlDouble Test15 = new SqlDouble (15);
 
                         // FIXME: Better way to test HashCode
-                        AssertEquals ("#G01", Test15.GetHashCode (), Test15.GetHashCode ());
+                        Assertion.AssertEquals ("#G01", Test15.GetHashCode (), Test15.GetHashCode ());
                 }
 
-                public void TestGetType()
+               [Test]
+                public void GetTypeTest()
                 {
                         SqlDouble Test = new SqlDouble (84);
-                        AssertEquals ("#H01", "System.Data.SqlTypes.SqlDouble", Test.GetType ().ToString ());
-                        AssertEquals ("#H02", "System.Double", Test.Value.GetType ().ToString ());
+                        Assertion.AssertEquals ("#H01", "System.Data.SqlTypes.SqlDouble", Test.GetType ().ToString ());
+                        Assertion.AssertEquals ("#H02", "System.Double", Test.Value.GetType ().ToString ());
                 }
 
-                public void TestGreaters()
+               [Test]
+                public void Greaters()
                 {
                         SqlDouble Test1 = new SqlDouble (1e100);
                         SqlDouble Test11 = new SqlDouble (1e100);
                         SqlDouble Test2 = new SqlDouble (64e164);
 
                         // GreateThan ()
-                        Assert ("#I01", !SqlDouble.GreaterThan (Test1, Test2).Value);
-                        Assert ("#I02", SqlDouble.GreaterThan (Test2, Test1).Value);
-                        Assert ("#I03", !SqlDouble.GreaterThan (Test1, Test11).Value);
+                        Assertion.Assert ("#I01", !SqlDouble.GreaterThan (Test1, Test2).Value);
+                        Assertion.Assert ("#I02", SqlDouble.GreaterThan (Test2, Test1).Value);
+                        Assertion.Assert ("#I03", !SqlDouble.GreaterThan (Test1, Test11).Value);
 
                         // GreaterTharOrEqual ()
-                        Assert ("#I04", !SqlDouble.GreaterThanOrEqual (Test1, Test2).Value);
-                        Assert ("#I05", SqlDouble.GreaterThanOrEqual (Test2, Test1).Value);
-                        Assert ("#I06", SqlDouble.GreaterThanOrEqual (Test1, Test11).Value);
+                        Assertion.Assert ("#I04", !SqlDouble.GreaterThanOrEqual (Test1, Test2).Value);
+                        Assertion.Assert ("#I05", SqlDouble.GreaterThanOrEqual (Test2, Test1).Value);
+                        Assertion.Assert ("#I06", SqlDouble.GreaterThanOrEqual (Test1, Test11).Value);
                 }
 
-                public void TestLessers()
+               [Test]
+                public void Lessers()
                 {
                         SqlDouble Test1 = new SqlDouble (1.8e100);
                         SqlDouble Test11 = new SqlDouble (1.8e100);
                         SqlDouble Test2 = new SqlDouble (64e164);
 
                         // LessThan()
-                        Assert ("#J01", !SqlDouble.LessThan (Test1, Test11).Value);
-                        Assert ("#J02", !SqlDouble.LessThan (Test2, Test1).Value);
-                        Assert ("#J03", SqlDouble.LessThan (Test11, Test2).Value);
+                        Assertion.Assert ("#J01", !SqlDouble.LessThan (Test1, Test11).Value);
+                        Assertion.Assert ("#J02", !SqlDouble.LessThan (Test2, Test1).Value);
+                        Assertion.Assert ("#J03", SqlDouble.LessThan (Test11, Test2).Value);
 
                         // LessThanOrEqual ()
-                        Assert ("#J04", SqlDouble.LessThanOrEqual (Test1, Test2).Value);
-                        Assert ("#J05", !SqlDouble.LessThanOrEqual (Test2, Test1).Value);
-                        Assert ("#J06", SqlDouble.LessThanOrEqual (Test11, Test1).Value);
-                        Assert ("#J07", SqlDouble.LessThanOrEqual (Test11, SqlDouble.Null).IsNull);
+                        Assertion.Assert ("#J04", SqlDouble.LessThanOrEqual (Test1, Test2).Value);
+                        Assertion.Assert ("#J05", !SqlDouble.LessThanOrEqual (Test2, Test1).Value);
+                        Assertion.Assert ("#J06", SqlDouble.LessThanOrEqual (Test11, Test1).Value);
+                        Assertion.Assert ("#J07", SqlDouble.LessThanOrEqual (Test11, SqlDouble.Null).IsNull);
                 }
 
-                public void TestNotEquals()
+               [Test]
+                public void NotEquals()
                 {
                         SqlDouble Test1 = new SqlDouble (1280000000001);
                         SqlDouble Test2 = new SqlDouble (128e10);
                         SqlDouble Test22 = new SqlDouble (128e10);
 
-                        Assert ("#K01", SqlDouble.NotEquals (Test1, Test2).Value);
-                        Assert ("#K02", SqlDouble.NotEquals (Test2, Test1).Value);
-                        Assert ("#K03", SqlDouble.NotEquals (Test22, Test1).Value);
-                        Assert ("#K04", !SqlDouble.NotEquals (Test22, Test2).Value);
-                        Assert ("#K05", !SqlDouble.NotEquals (Test2, Test22).Value);
-                        Assert ("#K06", SqlDouble.NotEquals (SqlDouble.Null, Test22).IsNull);
-                        Assert ("#K07", SqlDouble.NotEquals (SqlDouble.Null, Test22).IsNull);
+                        Assertion.Assert ("#K01", SqlDouble.NotEquals (Test1, Test2).Value);
+                        Assertion.Assert ("#K02", SqlDouble.NotEquals (Test2, Test1).Value);
+                        Assertion.Assert ("#K03", SqlDouble.NotEquals (Test22, Test1).Value);
+                        Assertion.Assert ("#K04", !SqlDouble.NotEquals (Test22, Test2).Value);
+                        Assertion.Assert ("#K05", !SqlDouble.NotEquals (Test2, Test22).Value);
+                        Assertion.Assert ("#K06", SqlDouble.NotEquals (SqlDouble.Null, Test22).IsNull);
+                        Assertion.Assert ("#K07", SqlDouble.NotEquals (SqlDouble.Null, Test22).IsNull);
                 }
 
-                public void TestParse()
+               [Test]
+                public void Parse()
                 {
                         try {
                                 SqlDouble.Parse (null);
-                                Fail ("#L01");
+                                Assertion.Fail ("#L01");
                         } catch (Exception e) {
-                                AssertEquals ("#L02", typeof (ArgumentNullException), e.GetType ());
+                                Assertion.AssertEquals ("#L02", typeof (ArgumentNullException), e.GetType ());
                         }
 
                         try {
                                 SqlDouble.Parse ("not-a-number");
-                                Fail ("#L03");
+                                Assertion.Fail ("#L03");
                         } catch (Exception e) {
 
-                                AssertEquals ("#L04", typeof (FormatException), e.GetType ());
+                                Assertion.AssertEquals ("#L04", typeof (FormatException), e.GetType ());
                         }
 
                          try {
                                 SqlDouble.Parse ("9e400");
-                                Fail ("#L05");
+                                Assertion.Fail ("#L05");
                         } catch (Exception e) {
-                                AssertEquals ("#L06", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#L06", typeof (OverflowException), e.GetType ());
                         }
 
-                        AssertEquals("#L07", (double)150, SqlDouble.Parse ("150").Value);
+                        Assertion.AssertEquals("#L07", (double)150, SqlDouble.Parse ("150").Value);
                 }
 
-                public void TestConversions()
+               [Test]
+                public void Conversions()
                 {
                         SqlDouble Test0 = new SqlDouble (0);
                         SqlDouble Test1 = new SqlDouble (250);
@@ -252,101 +256,102 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlDouble TestNull = SqlDouble.Null;
 
                         // ToSqlBoolean ()
-                        Assert ("#M01A", Test1.ToSqlBoolean ().Value);
-                        Assert ("#M02A", !Test0.ToSqlBoolean ().Value);
-                        Assert ("#M03A", TestNull.ToSqlBoolean ().IsNull);
+                        Assertion.Assert ("#M01A", Test1.ToSqlBoolean ().Value);
+                        Assertion.Assert ("#M02A", !Test0.ToSqlBoolean ().Value);
+                        Assertion.Assert ("#M03A", TestNull.ToSqlBoolean ().IsNull);
 
                         // ToSqlByte ()
-                        AssertEquals ("#M01B", (byte)250, Test1.ToSqlByte ().Value);
-                        AssertEquals ("#M02B", (byte)0, Test0.ToSqlByte ().Value);
+                        Assertion.AssertEquals ("#M01B", (byte)250, Test1.ToSqlByte ().Value);
+                        Assertion.AssertEquals ("#M02B", (byte)0, Test0.ToSqlByte ().Value);
 
                         try {
                                 SqlByte b = (byte)Test2.ToSqlByte ();
-                                Fail ("#M03B");
+                                Assertion.Fail ("#M03B");
                         } catch (Exception e) {
-                                AssertEquals ("#M04B", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04B", typeof (OverflowException), e.GetType ());
                         }
 
                         // ToSqlDecimal ()
-                        AssertEquals ("#M01C", (decimal)250, Test1.ToSqlDecimal ().Value);
-                        AssertEquals ("#M02C", (decimal)0, Test0.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("#M01C", (decimal)250, Test1.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("#M02C", (decimal)0, Test0.ToSqlDecimal ().Value);
 
                         try {
                                 SqlDecimal test = Test3.ToSqlDecimal ().Value;
-                                Fail ("#M03C");
+                                Assertion.Fail ("#M03C");
                         } catch (Exception e) {
-                                AssertEquals ("#M04C", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04C", typeof (OverflowException), e.GetType ());
                         }      
 
                         // ToSqlInt16 ()
-                        AssertEquals ("#M01D", (short)250, Test1.ToSqlInt16 ().Value);
-                        AssertEquals ("#M02D", (short)0, Test0.ToSqlInt16 ().Value);
+                        Assertion.AssertEquals ("#M01D", (short)250, Test1.ToSqlInt16 ().Value);
+                        Assertion.AssertEquals ("#M02D", (short)0, Test0.ToSqlInt16 ().Value);
 
                         try {
                                 SqlInt16 test = Test2.ToSqlInt16().Value;
-                                Fail ("#M03D");
+                                Assertion.Fail ("#M03D");
                         } catch (Exception e) {
-                                AssertEquals ("#M04D", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04D", typeof (OverflowException), e.GetType ());
                         }        
 
                         // ToSqlInt32 ()
-                        AssertEquals ("#M01E", (int)250, Test1.ToSqlInt32 ().Value);
-                        AssertEquals ("#M02E", (int)0, Test0.ToSqlInt32 ().Value);
+                        Assertion.AssertEquals ("#M01E", (int)250, Test1.ToSqlInt32 ().Value);
+                        Assertion.AssertEquals ("#M02E", (int)0, Test0.ToSqlInt32 ().Value);
 
                         try {
                                 SqlInt32 test = Test2.ToSqlInt32 ().Value;
-                                Fail ("#M03E");
+                                Assertion.Fail ("#M03E");
                         } catch (Exception e) { 
-                                AssertEquals ("#M04E", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04E", typeof (OverflowException), e.GetType ());
                         }
 
                         // ToSqlInt64 ()
-                        AssertEquals ("#M01F", (long)250, Test1.ToSqlInt64 ().Value);
-                        AssertEquals ("#M02F", (long)0, Test0.ToSqlInt64 ().Value);
+                        Assertion.AssertEquals ("#M01F", (long)250, Test1.ToSqlInt64 ().Value);
+                        Assertion.AssertEquals ("#M02F", (long)0, Test0.ToSqlInt64 ().Value);
 
                         try {        
                                 SqlInt64 test = Test2.ToSqlInt64 ().Value;
-                                Fail ("#M03F");
+                                Assertion.Fail ("#M03F");
                         } catch (Exception e) {
-                                AssertEquals ("#M04F", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04F", typeof (OverflowException), e.GetType ());
                         }        
 
                         // ToSqlMoney ()
-                        AssertEquals ("#M01G", (decimal)250, Test1.ToSqlMoney ().Value);
-                        AssertEquals ("#M02G", (decimal)0, Test0.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("#M01G", (decimal)250, Test1.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("#M02G", (decimal)0, Test0.ToSqlMoney ().Value);
 
                         try {
                                 SqlMoney test = Test2.ToSqlMoney ().Value;
-                                Fail ("#M03G");
+                                Assertion.Fail ("#M03G");
                         } catch (Exception e) {
-                                AssertEquals ("#M04G", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04G", typeof (OverflowException), e.GetType ());
                         }        
 
                         // ToSqlSingle ()
-                        AssertEquals ("#M01H", (float)250, Test1.ToSqlSingle ().Value);
-                        AssertEquals ("#M02H", (float)0, Test0.ToSqlSingle ().Value);
+                        Assertion.AssertEquals ("#M01H", (float)250, Test1.ToSqlSingle ().Value);
+                        Assertion.AssertEquals ("#M02H", (float)0, Test0.ToSqlSingle ().Value);
 
                         try {
                                 SqlSingle test = Test2.ToSqlSingle().Value;
-                                Fail ("#MO3H");
+                                Assertion.Fail ("#MO3H");
                         } catch (Exception e) {
-                                AssertEquals ("#M04H", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04H", typeof (OverflowException), e.GetType ());
                         }        
 
                         // ToSqlString ()
-                        AssertEquals ("#M01I", "250", Test1.ToSqlString ().Value);
-                        AssertEquals ("#M02I", "0", Test0.ToSqlString ().Value);
-                        AssertEquals ("#M03I", "6,4E+65", Test2.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#M01I", "250", Test1.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#M02I", "0", Test0.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#M03I", "6,4E+65", Test2.ToSqlString ().Value);
 
                         // ToString ()
-                        AssertEquals ("#M01J", "250", Test1.ToString ());
-                        AssertEquals ("#M02J", "0", Test0.ToString ());
-                        AssertEquals ("#M03J", "6,4E+65", Test2.ToString ());
+                        Assertion.AssertEquals ("#M01J", "250", Test1.ToString ());
+                        Assertion.AssertEquals ("#M02J", "0", Test0.ToString ());
+                        Assertion.AssertEquals ("#M03J", "6,4E+65", Test2.ToString ());
                 }
 
                 // OPERATORS
 
-                public void TestArithmeticOperators()
+               [Test]
+                public void ArithmeticOperators()
                 {
                         SqlDouble Test0 = new SqlDouble (0);
                         SqlDouble Test1 = new SqlDouble (24E+100);
@@ -356,47 +361,48 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlDouble Test5 = new SqlDouble (2E+10);
 
                         // "+"-operator
-                        AssertEquals ("#N01", (SqlDouble)3E+10, Test4 + Test5);
+                        Assertion.AssertEquals ("#N01", (SqlDouble)3E+10, Test4 + Test5);
      
                         try {
                                 SqlDouble test = SqlDouble.MaxValue + SqlDouble.MaxValue;
-                                Fail ("#N02");
+                                Assertion.Fail ("#N02");
                         } catch (Exception e) {
-                                AssertEquals ("#N03", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#N03", typeof (OverflowException), e.GetType ());
                         }
 
                         // "/"-operator
-                        AssertEquals ("#N04", (SqlDouble)2, Test1 / Test3);
+                        Assertion.AssertEquals ("#N04", (SqlDouble)2, Test1 / Test3);
 
                         try {
                                 SqlDouble test = Test3 / Test0;
-                                Fail ("#N05");
+                                Assertion.Fail ("#N05");
                         } catch (Exception e) {
-                                AssertEquals ("#N06", typeof (DivideByZeroException), e.GetType ());
+                                Assertion.AssertEquals ("#N06", typeof (DivideByZeroException), e.GetType ());
                         }
 
                         // "*"-operator
-                        AssertEquals ("#N07", (SqlDouble)2e20, Test4 * Test5);
+                        Assertion.AssertEquals ("#N07", (SqlDouble)2e20, Test4 * Test5);
 
                         try {
                                 SqlDouble test = SqlDouble.MaxValue * Test1;
-                                Fail ("#N08");
+                                Assertion.Fail ("#N08");
                         } catch (Exception e) {
-                                AssertEquals ("#N09", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#N09", typeof (OverflowException), e.GetType ());
                         }
 
                         // "-"-operator
-                        AssertEquals ("#N10", (SqlDouble)12e100, Test1 - Test3);
+                        Assertion.AssertEquals ("#N10", (SqlDouble)12e100, Test1 - Test3);
 
                         try {
                                 SqlDouble test = SqlDouble.MinValue - SqlDouble.MaxValue;
-                                Fail ("#N11");
+                                Assertion.Fail ("#N11");
                         } catch  (Exception e) {
-                                AssertEquals ("#N12", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#N12", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestThanOrEqualOperators()
+               [Test]
+                public void ThanOrEqualOperators()
                 {
                         SqlDouble Test1 = new SqlDouble (1E+164);
                         SqlDouble Test2 = new SqlDouble (9.7E+100);
@@ -404,130 +410,139 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlDouble Test3 = new SqlDouble (2E+200);
 
                         // == -operator
-                        Assert ("#O01", (Test2 == Test22).Value);
-                        Assert ("#O02", !(Test1 == Test2).Value);
-                        Assert ("#O03", (Test1 == SqlDouble.Null).IsNull);
+                        Assertion.Assert ("#O01", (Test2 == Test22).Value);
+                        Assertion.Assert ("#O02", !(Test1 == Test2).Value);
+                        Assertion.Assert ("#O03", (Test1 == SqlDouble.Null).IsNull);
                         
                         // != -operator
-                        Assert ("#O04", !(Test2 != Test22).Value);
-                        Assert ("#O05", (Test2 != Test3).Value);
-                        Assert ("#O06", (Test1 != Test3).Value);
-                        Assert ("#O07", (Test1 != SqlDouble.Null).IsNull);
+                        Assertion.Assert ("#O04", !(Test2 != Test22).Value);
+                        Assertion.Assert ("#O05", (Test2 != Test3).Value);
+                        Assertion.Assert ("#O06", (Test1 != Test3).Value);
+                        Assertion.Assert ("#O07", (Test1 != SqlDouble.Null).IsNull);
 
                         // > -operator
-                        Assert ("#O08", (Test1 > Test2).Value);
-                        Assert ("#O09", !(Test1 > Test3).Value);
-                        Assert ("#O10", !(Test2 > Test22).Value);
-                        Assert ("#O11", (Test1 > SqlDouble.Null).IsNull);
+                        Assertion.Assert ("#O08", (Test1 > Test2).Value);
+                        Assertion.Assert ("#O09", !(Test1 > Test3).Value);
+                        Assertion.Assert ("#O10", !(Test2 > Test22).Value);
+                        Assertion.Assert ("#O11", (Test1 > SqlDouble.Null).IsNull);
 
                         // >=  -operator
-                        Assert ("#O12", !(Test1 >= Test3).Value);
-                        Assert ("#O13", (Test3 >= Test1).Value);
-                        Assert ("#O14", (Test2 >= Test22).Value);
-                        Assert ("#O15", (Test1 >= SqlDouble.Null).IsNull);
+                        Assertion.Assert ("#O12", !(Test1 >= Test3).Value);
+                        Assertion.Assert ("#O13", (Test3 >= Test1).Value);
+                        Assertion.Assert ("#O14", (Test2 >= Test22).Value);
+                        Assertion.Assert ("#O15", (Test1 >= SqlDouble.Null).IsNull);
 
                         // < -operator
-                        Assert ("#O16", !(Test1 < Test2).Value);
-                        Assert ("#O17", (Test1 < Test3).Value);
-                        Assert ("#O18", !(Test2 < Test22).Value);
-                        Assert ("#O19", (Test1 < SqlDouble.Null).IsNull);
+                        Assertion.Assert ("#O16", !(Test1 < Test2).Value);
+                        Assertion.Assert ("#O17", (Test1 < Test3).Value);
+                        Assertion.Assert ("#O18", !(Test2 < Test22).Value);
+                        Assertion.Assert ("#O19", (Test1 < SqlDouble.Null).IsNull);
 
                         // <= -operator
-                        Assert ("#O20", (Test1 <= Test3).Value);
-                        Assert ("#O21", !(Test3 <= Test1).Value);
-                        Assert ("#O22", (Test2 <= Test22).Value);
-                        Assert ("#O23", (Test1 <= SqlDouble.Null).IsNull);
+                        Assertion.Assert ("#O20", (Test1 <= Test3).Value);
+                        Assertion.Assert ("#O21", !(Test3 <= Test1).Value);
+                        Assertion.Assert ("#O22", (Test2 <= Test22).Value);
+                        Assertion.Assert ("#O23", (Test1 <= SqlDouble.Null).IsNull);
                 }
 
-                public void TestUnaryNegation()
+               [Test]
+                public void UnaryNegation()
                 {
                         SqlDouble Test = new SqlDouble (2000000001);
                         SqlDouble TestNeg = new SqlDouble (-3000);
 
                         SqlDouble Result = -Test;
-                        AssertEquals ("#P01", (double)(-2000000001), Result.Value);
+                        Assertion.AssertEquals ("#P01", (double)(-2000000001), Result.Value);
 
                         Result = -TestNeg;
-                        AssertEquals ("#P02", (double)3000, Result.Value);
+                        Assertion.AssertEquals ("#P02", (double)3000, Result.Value);
                 }
 
-                public void TestSqlBooleanToSqlDouble()
+               [Test]
+                public void SqlBooleanToSqlDouble()
                 {
                         SqlBoolean TestBoolean = new SqlBoolean (true);
                         SqlDouble Result;
 
                         Result = (SqlDouble)TestBoolean;
 
-                        AssertEquals ("#Q01", (double)1, Result.Value);
+                        Assertion.AssertEquals ("#Q01", (double)1, Result.Value);
 
                         Result = (SqlDouble)SqlBoolean.Null;
-                        Assert ("#Q02", Result.IsNull);
+                        Assertion.Assert ("#Q02", Result.IsNull);
                 }
 
-                public void TestSqlDoubleToDouble()
+               [Test]
+                public void SqlDoubleToDouble()
                 {
                         SqlDouble Test = new SqlDouble (12e12);
                         Double Result = (double)Test;
-                        AssertEquals ("#R01", 12e12, Result);
+                        Assertion.AssertEquals ("#R01", 12e12, Result);
                 }
 
-                public void TestSqlStringToSqlDouble()
+               [Test]
+                public void SqlStringToSqlDouble()
                 {
                         SqlString TestString = new SqlString ("Test string");
                         SqlString TestString100 = new SqlString ("100");
 
-                        AssertEquals ("#S01", (double)100, ((SqlDouble)TestString100).Value);
+                        Assertion.AssertEquals ("#S01", (double)100, ((SqlDouble)TestString100).Value);
 
                         try {
                                 SqlDouble test = (SqlDouble)TestString;
-                                Fail ("#S02");
+                                Assertion.Fail ("#S02");
                         } catch(Exception e) {
-                                AssertEquals ("#S03", typeof (FormatException), e.GetType ());
+                                Assertion.AssertEquals ("#S03", typeof (FormatException), e.GetType ());
                         }
                 }
 
-                public void TestDoubleToSqlDouble()
+               [Test]
+                public void DoubleToSqlDouble()
                 {
                         double Test1 = 5e64;
                         SqlDouble Result = (SqlDouble)Test1;
-                        AssertEquals ("#T01", 5e64, Result.Value);
+                        Assertion.AssertEquals ("#T01", 5e64, Result.Value);
                 }
 
-                public void TestByteToSqlDouble()
+               [Test]
+                public void ByteToSqlDouble()
                 {
                         short TestShort = 14;
-                        AssertEquals ("#U01", (double)14, ((SqlDouble)TestShort).Value);
+                        Assertion.AssertEquals ("#U01", (double)14, ((SqlDouble)TestShort).Value);
                 }
                 
-                public void TestSqlDecimalToSqlDouble()
+               [Test]
+                public void SqlDecimalToSqlDouble()
                 {
                         SqlDecimal TestDecimal64 = new SqlDecimal (64);
 
-                        AssertEquals ("#V01", (double)64, ((SqlDouble)TestDecimal64).Value);
-                        AssertEquals ("#V02", SqlDouble.Null, ((SqlDouble)SqlDecimal.Null));
+                        Assertion.AssertEquals ("#V01", (double)64, ((SqlDouble)TestDecimal64).Value);
+                        Assertion.AssertEquals ("#V02", SqlDouble.Null, ((SqlDouble)SqlDecimal.Null));
                 }
 
-                public void TestSqlIntToSqlDouble()
+               [Test]
+                public void SqlIntToSqlDouble()
                 {
                         SqlInt16 Test64 = new SqlInt16 (64);
                         SqlInt32 Test640 = new SqlInt32 (640);
                         SqlInt64 Test64000 = new SqlInt64 (64000);
-                        AssertEquals ("#W01", (double)64, ((SqlDouble)Test64).Value);
-                        AssertEquals ("#W02", (double)640, ((SqlDouble)Test640).Value);
-                        AssertEquals ("#W03", (double)64000, ((SqlDouble)Test64000).Value);
+                        Assertion.AssertEquals ("#W01", (double)64, ((SqlDouble)Test64).Value);
+                        Assertion.AssertEquals ("#W02", (double)640, ((SqlDouble)Test640).Value);
+                        Assertion.AssertEquals ("#W03", (double)64000, ((SqlDouble)Test64000).Value);
                 }
 
-
-                public void TestSqlMoneyToSqlDouble()
+               [Test]
+                public void SqlMoneyToSqlDouble()
                 {
                         SqlMoney TestMoney64 = new SqlMoney(64);
-                        AssertEquals ("#X01", (double)64, ((SqlDouble)TestMoney64).Value);
+                        Assertion.AssertEquals ("#X01", (double)64, ((SqlDouble)TestMoney64).Value);
                 }
 
-                public void TestSqlSingleToSqlDouble()
+               [Test]
+                public void SqlSingleToSqlDouble()
                 {
                         SqlSingle TestSingle64 = new SqlSingle (64);
-                        AssertEquals ("#Y01", (double)64, ((SqlDouble)TestSingle64).Value);
+                        Assertion.AssertEquals ("#Y01", (double)64, ((SqlDouble)TestSingle64).Value);
                 }
         }
 }
index 26451ec99f210a0d8e862b9283da456fb3e33719..621e9a3ead5fd776a8087bb92c556f12c91bd602 100644 (file)
@@ -1,9 +1,12 @@
 //\r
 // SqlGuidTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlGuid\r
 //\r
-// Ville Palo (vi64pa@koti.soon.fi)\r
+// Authors:\r
+//   Ville Palo (vi64pa@koti.soon.fi)\r
+//   Martin Willemoes Hansen (mwh@sysrq.dk)\r
 //\r
-// (C) Ville Palo 2002           \r
+// (C) 2002 Ville Palo\r
+// (C) 2003 Martin Willemoes Hansen\r
 // \r
 \r
 using NUnit.Framework;\r
@@ -12,7 +15,8 @@ using System.Data.SqlTypes;
 \r
 namespace MonoTests.System.Data.SqlTypes\r
 {\r
-        public class SqlGuidTest : TestCase {\r
+       [TestFixture]\r
+        public class SqlGuidTest {\r
 \r
                // 00000a01-0000-0000-0000-000000000000\r
                private SqlGuid Test1;\r
@@ -24,12 +28,8 @@ namespace MonoTests.System.Data.SqlTypes
                // 0000fafa-0000-0000-0000-000000000000\r
                private SqlGuid Test4;\r
                \r
-                public SqlGuidTest() : base ("System.Data.SqlTypes.SqlGuid") {}\r
-                public SqlGuidTest(string name) : base(name) {}\r
-\r
-                protected override void TearDown() {}\r
-\r
-                protected override void SetUp() \r
+               [SetUp]\r
+                public void GetReady() \r
                 {\r
                        byte [] b1 = new byte [16];\r
                        byte [] b2 = new byte [16];\r
@@ -51,16 +51,9 @@ namespace MonoTests.System.Data.SqlTypes
                        Test4 = new SqlGuid (b4);\r
                 }\r
 \r
-\r
-\r
-                public static ITest Suite {\r
-                        get {\r
-                                return new TestSuite(typeof(SqlGuid));\r
-                        }\r
-                }\r
-\r
                 // Test constructor\r
-                public void TestCreate()\r
+               [Test]\r
+                public void Create()\r
                 {\r
                        // SqlGuid (Byte[])\r
                        byte [] b = new byte [16];\r
@@ -81,235 +74,249 @@ namespace MonoTests.System.Data.SqlTypes
                                Test = new SqlGuid (10, 1, 2, 13, 14, 15, 16, 17, 19, 20 ,21);\r
 \r
                        } catch (Exception e) {\r
-                               Fail ("#A01 " + e);\r
+                               Assertion.Fail ("#A01 " + e);\r
                        }\r
                 }\r
 \r
                 // Test public fields\r
-                public void TestPublicFields()\r
+               [Test]\r
+                public void PublicFields()\r
                 {\r
-                        Assert ("#B01", SqlGuid.Null.IsNull);\r
+                        Assertion.Assert ("#B01", SqlGuid.Null.IsNull);\r
                 }\r
 \r
                 // Test properties\r
-                public void TestProperties()\r
+               [Test]\r
+                public void Properties()\r
                 {\r
                        Guid ResultGuid = new Guid ("00000f64-0000-0000-0000-000000000000");                   \r
-                       Assert ("#C01", !Test1.IsNull);\r
-                       Assert ("#C02", SqlGuid.Null.IsNull);\r
-                       AssertEquals ("#C03", ResultGuid, Test2.Value);\r
+                       Assertion.Assert ("#C01", !Test1.IsNull);\r
+                       Assertion.Assert ("#C02", SqlGuid.Null.IsNull);\r
+                       Assertion.AssertEquals ("#C03", ResultGuid, Test2.Value);\r
                 }\r
 \r
                 // PUBLIC METHODS\r
-\r
-                public void TestCompareTo()\r
+               [Test]\r
+                public void CompareTo()\r
                 {\r
                        String TestString = "This is a test string";\r
-                        Assert ("#D01", Test1.CompareTo (Test3) < 0);\r
-                        Assert ("#D02", Test4.CompareTo (Test1) > 0);\r
-                        Assert ("#D03", Test3.CompareTo (Test2) == 0);\r
-                        Assert ("#D04", Test4.CompareTo (SqlGuid.Null) > 0);\r
+                        Assertion.Assert ("#D01", Test1.CompareTo (Test3) < 0);\r
+                        Assertion.Assert ("#D02", Test4.CompareTo (Test1) > 0);\r
+                        Assertion.Assert ("#D03", Test3.CompareTo (Test2) == 0);\r
+                        Assertion.Assert ("#D04", Test4.CompareTo (SqlGuid.Null) > 0);\r
 \r
                         try {\r
                                 Test1.CompareTo (TestString);\r
-                                Fail("#D05");\r
+                                Assertion.Fail("#D05");\r
                         } catch(Exception e) {\r
-                                AssertEquals ("#D06", typeof (ArgumentException), e.GetType ());\r
+                                Assertion.AssertEquals ("#D06", typeof (ArgumentException), e.GetType ());\r
                         }\r
                 }\r
 \r
-                public void TestEqualsMethods()\r
+               [Test]\r
+                public void EqualsMethods()\r
                 {\r
-                        Assert ("#E01", !Test1.Equals (Test2));\r
-                        Assert ("#E02", !Test2.Equals (Test4));\r
-                        Assert ("#E03", !Test2.Equals (new SqlString ("TEST")));\r
-                        Assert ("#E04", Test2.Equals (Test3));\r
+                        Assertion.Assert ("#E01", !Test1.Equals (Test2));\r
+                        Assertion.Assert ("#E02", !Test2.Equals (Test4));\r
+                        Assertion.Assert ("#E03", !Test2.Equals (new SqlString ("TEST")));\r
+                        Assertion.Assert ("#E04", Test2.Equals (Test3));\r
 \r
                         // Static Equals()-method\r
-                        Assert ("#E05", SqlGuid.Equals (Test2, Test3).Value);\r
-                        Assert ("#E06", !SqlGuid.Equals (Test1, Test2).Value);\r
+                        Assertion.Assert ("#E05", SqlGuid.Equals (Test2, Test3).Value);\r
+                        Assertion.Assert ("#E06", !SqlGuid.Equals (Test1, Test2).Value);\r
                 }\r
 \r
-                public void TestGetHashCode()\r
+               [Test]\r
+                public void GetHashCodeTest()\r
                 {\r
-                        AssertEquals ("#F01", Test1.GetHashCode (), Test1.GetHashCode ());\r
-                       Assert ("#F02", Test1.GetHashCode () != Test2.GetHashCode ());\r
-                        AssertEquals ("#F02", Test3.GetHashCode (), Test2.GetHashCode ());\r
+                        Assertion.AssertEquals ("#F01", Test1.GetHashCode (), Test1.GetHashCode ());\r
+                       Assertion.Assert ("#F02", Test1.GetHashCode () != Test2.GetHashCode ());\r
+                        Assertion.AssertEquals ("#F02", Test3.GetHashCode (), Test2.GetHashCode ());\r
                 }\r
 \r
-                public void TestGetType()\r
+               [Test]\r
+                public void GetTypeTest()\r
                 {\r
-                        AssertEquals ("#G01", "System.Data.SqlTypes.SqlGuid", Test1.GetType ().ToString ());\r
-                        AssertEquals ("#G02", "System.Guid", Test3.Value.GetType ().ToString ());\r
+                        Assertion.AssertEquals ("#G01", "System.Data.SqlTypes.SqlGuid", Test1.GetType ().ToString ());\r
+                        Assertion.AssertEquals ("#G02", "System.Guid", Test3.Value.GetType ().ToString ());\r
                 }\r
 \r
-                public void TestGreaters()\r
+               [Test]\r
+                public void Greaters()\r
                 {\r
                         // GreateThan ()\r
-                        Assert ("#H01", !SqlGuid.GreaterThan (Test1, Test2).Value);\r
-                        Assert ("#H02", SqlGuid.GreaterThan (Test2, Test1).Value);\r
-                        Assert ("#H03", !SqlGuid.GreaterThan (Test2, Test3).Value);\r
+                        Assertion.Assert ("#H01", !SqlGuid.GreaterThan (Test1, Test2).Value);\r
+                        Assertion.Assert ("#H02", SqlGuid.GreaterThan (Test2, Test1).Value);\r
+                        Assertion.Assert ("#H03", !SqlGuid.GreaterThan (Test2, Test3).Value);\r
                         // GreaterTharOrEqual ()\r
-                        Assert ("#H04", !SqlGuid.GreaterThanOrEqual (Test1, Test2).Value);\r
-                        Assert ("#H05", SqlGuid.GreaterThanOrEqual (Test2, Test1).Value);\r
-                        Assert ("#H06", SqlGuid.GreaterThanOrEqual (Test2, Test3).Value);\r
+                        Assertion.Assert ("#H04", !SqlGuid.GreaterThanOrEqual (Test1, Test2).Value);\r
+                        Assertion.Assert ("#H05", SqlGuid.GreaterThanOrEqual (Test2, Test1).Value);\r
+                        Assertion.Assert ("#H06", SqlGuid.GreaterThanOrEqual (Test2, Test3).Value);\r
                 }\r
 \r
-                public void TestLessers()\r
+               [Test]\r
+                public void Lessers()\r
                 {\r
                         // LessThan()\r
-                        Assert ("#I01", !SqlGuid.LessThan (Test2, Test3).Value);\r
-                        Assert ("#I02", !SqlGuid.LessThan (Test2, Test1).Value);\r
-                        Assert ("#I03", SqlGuid.LessThan (Test1, Test2).Value);\r
+                        Assertion.Assert ("#I01", !SqlGuid.LessThan (Test2, Test3).Value);\r
+                        Assertion.Assert ("#I02", !SqlGuid.LessThan (Test2, Test1).Value);\r
+                        Assertion.Assert ("#I03", SqlGuid.LessThan (Test1, Test2).Value);\r
 \r
                         // LessThanOrEqual ()\r
-                        Assert ("#I04", SqlGuid.LessThanOrEqual (Test1, Test2).Value);\r
-                        Assert ("#I05", !SqlGuid.LessThanOrEqual (Test2, Test1).Value);\r
-                        Assert ("#I06", SqlGuid.LessThanOrEqual (Test2, Test3).Value);\r
-                        Assert ("#I07", SqlGuid.LessThanOrEqual (Test4, SqlGuid.Null).IsNull);\r
+                        Assertion.Assert ("#I04", SqlGuid.LessThanOrEqual (Test1, Test2).Value);\r
+                        Assertion.Assert ("#I05", !SqlGuid.LessThanOrEqual (Test2, Test1).Value);\r
+                        Assertion.Assert ("#I06", SqlGuid.LessThanOrEqual (Test2, Test3).Value);\r
+                        Assertion.Assert ("#I07", SqlGuid.LessThanOrEqual (Test4, SqlGuid.Null).IsNull);\r
                 }\r
 \r
-                public void TestNotEquals()\r
+               [Test]\r
+                public void NotEquals()\r
                 {\r
-                        Assert ("#J01", SqlGuid.NotEquals (Test1, Test2).Value);\r
-                        Assert ("#J02", SqlGuid.NotEquals (Test2, Test1).Value);\r
-                        Assert ("#J03", SqlGuid.NotEquals (Test3, Test1).Value);\r
-                        Assert ("#J04", !SqlGuid.NotEquals (Test3, Test2).Value);                      \r
-                        Assert ("#J05", SqlGuid.NotEquals (SqlGuid.Null, Test2).IsNull);\r
+                        Assertion.Assert ("#J01", SqlGuid.NotEquals (Test1, Test2).Value);\r
+                        Assertion.Assert ("#J02", SqlGuid.NotEquals (Test2, Test1).Value);\r
+                        Assertion.Assert ("#J03", SqlGuid.NotEquals (Test3, Test1).Value);\r
+                        Assertion.Assert ("#J04", !SqlGuid.NotEquals (Test3, Test2).Value);                      \r
+                        Assertion.Assert ("#J05", SqlGuid.NotEquals (SqlGuid.Null, Test2).IsNull);\r
                 }\r
 \r
-                public void TestParse()\r
+               [Test]\r
+                public void Parse()\r
                 {\r
                         try {\r
                                 SqlGuid.Parse (null);\r
-                                Fail ("#K01");\r
+                                Assertion.Fail ("#K01");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#K02", typeof (ArgumentNullException), e.GetType ());\r
+                                Assertion.AssertEquals ("#K02", typeof (ArgumentNullException), e.GetType ());\r
                         }\r
 \r
                         try {\r
                                 SqlGuid.Parse ("not-a-number");\r
-                                Fail ("#K03");\r
+                                Assertion.Fail ("#K03");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#K04", typeof (FormatException), e.GetType ());\r
+                                Assertion.AssertEquals ("#K04", typeof (FormatException), e.GetType ());\r
                         }\r
 \r
                          try {\r
                                 SqlGuid.Parse ("9e400");\r
-                                Fail ("#K05");\r
+                                Assertion.Fail ("#K05");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#K06", typeof (FormatException), e.GetType ());\r
+                                Assertion.AssertEquals ("#K06", typeof (FormatException), e.GetType ());\r
                         }\r
 \r
-                        AssertEquals("#K07", new Guid("87654321-0000-0000-0000-000000000000"), \r
+                        Assertion.AssertEquals("#K07", new Guid("87654321-0000-0000-0000-000000000000"), \r
                                      SqlGuid.Parse ("87654321-0000-0000-0000-000000000000").Value);\r
                 }\r
 \r
-                public void TestConversions()\r
+               [Test]\r
+                public void Conversions()\r
                 {\r
                        // ToByteArray ()\r
-                       AssertEquals ("#L01", (byte)1, Test1.ToByteArray () [0]);\r
-                       AssertEquals ("#L02", (byte)15, Test2.ToByteArray () [1]);\r
+                       Assertion.AssertEquals ("#L01", (byte)1, Test1.ToByteArray () [0]);\r
+                       Assertion.AssertEquals ("#L02", (byte)15, Test2.ToByteArray () [1]);\r
 \r
                        // ToSqlBinary ()\r
                        byte [] b = new byte [2]; \r
                        b [0] = 100;\r
                        b [1] = 15;\r
                       \r
-                        AssertEquals ("#L03", new SqlBinary (b), Test3.ToSqlBinary ());\r
+                        Assertion.AssertEquals ("#L03", new SqlBinary (b), Test3.ToSqlBinary ());\r
 \r
                         // ToSqlString ()\r
-                        AssertEquals ("#L04", "00000a01-0000-0000-0000-000000000000",  \r
+                        Assertion.AssertEquals ("#L04", "00000a01-0000-0000-0000-000000000000",  \r
                                      Test1.ToSqlString ().Value);\r
-                        AssertEquals ("#L05", "0000fafa-0000-0000-0000-000000000000", \r
+                        Assertion.AssertEquals ("#L05", "0000fafa-0000-0000-0000-000000000000", \r
                                       Test4.ToSqlString ().Value);\r
 \r
                         // ToString ()\r
-                        AssertEquals ("#L06", "00000a01-0000-0000-0000-000000000000", \r
+                        Assertion.AssertEquals ("#L06", "00000a01-0000-0000-0000-000000000000", \r
                                       Test1.ToString ());\r
-                        AssertEquals ("#L07", "0000fafa-0000-0000-0000-000000000000", \r
+                        Assertion.AssertEquals ("#L07", "0000fafa-0000-0000-0000-000000000000", \r
                                       Test4.ToString ());\r
                 }\r
 \r
                 // OPERATORS\r
 \r
-                public void TestThanOrEqualOperators()\r
+               [Test]\r
+                public void ThanOrEqualOperators()\r
                 {\r
                         // == -operator\r
-                        Assert ("#M01", (Test3 == Test2).Value);\r
-                        Assert ("#M02", !(Test1 == Test2).Value);\r
-                        Assert ("#M03", (Test1 == SqlGuid.Null).IsNull);\r
+                        Assertion.Assert ("#M01", (Test3 == Test2).Value);\r
+                        Assertion.Assert ("#M02", !(Test1 == Test2).Value);\r
+                        Assertion.Assert ("#M03", (Test1 == SqlGuid.Null).IsNull);\r
                         \r
                         // != -operator\r
-                        Assert ("#M04", !(Test2 != Test3).Value);\r
-                        Assert ("#M05", (Test1 != Test3).Value);\r
-                        Assert ("#M06", (Test1 != SqlGuid.Null).IsNull);\r
+                        Assertion.Assert ("#M04", !(Test2 != Test3).Value);\r
+                        Assertion.Assert ("#M05", (Test1 != Test3).Value);\r
+                        Assertion.Assert ("#M06", (Test1 != SqlGuid.Null).IsNull);\r
 \r
                         // > -operator\r
-                        Assert ("#M07", (Test2 > Test1).Value);\r
-                        Assert ("#M08", !(Test1 > Test3).Value);\r
-                        Assert ("#M09", !(Test3 > Test2).Value);\r
-                        Assert ("#M10", (Test1 > SqlGuid.Null).IsNull);\r
+                        Assertion.Assert ("#M07", (Test2 > Test1).Value);\r
+                        Assertion.Assert ("#M08", !(Test1 > Test3).Value);\r
+                        Assertion.Assert ("#M09", !(Test3 > Test2).Value);\r
+                        Assertion.Assert ("#M10", (Test1 > SqlGuid.Null).IsNull);\r
 \r
                         // >=  -operator\r
-                        Assert ("#M12", !(Test1 >= Test3).Value);\r
-                        Assert ("#M13", (Test3 >= Test1).Value);\r
-                        Assert ("#M14", (Test3 >= Test2).Value);\r
-                        Assert ("#M15", (Test1 >= SqlGuid.Null).IsNull);\r
+                        Assertion.Assert ("#M12", !(Test1 >= Test3).Value);\r
+                        Assertion.Assert ("#M13", (Test3 >= Test1).Value);\r
+                        Assertion.Assert ("#M14", (Test3 >= Test2).Value);\r
+                        Assertion.Assert ("#M15", (Test1 >= SqlGuid.Null).IsNull);\r
 \r
                         // < -operator\r
-                        Assert ("#M16", !(Test2 < Test1).Value);\r
-                        Assert ("#M17", (Test1 < Test3).Value);\r
-                        Assert ("#M18", !(Test2 < Test3).Value);\r
-                        Assert ("#M19", (Test1 < SqlGuid.Null).IsNull);\r
+                        Assertion.Assert ("#M16", !(Test2 < Test1).Value);\r
+                        Assertion.Assert ("#M17", (Test1 < Test3).Value);\r
+                        Assertion.Assert ("#M18", !(Test2 < Test3).Value);\r
+                        Assertion.Assert ("#M19", (Test1 < SqlGuid.Null).IsNull);\r
 \r
                         // <= -operator\r
-                        Assert ("#M20", (Test1 <= Test3).Value);\r
-                        Assert ("#M21", !(Test3 <= Test1).Value);\r
-                        Assert ("#M22", (Test2 <= Test3).Value);\r
-                        Assert ("#M23", (Test1 <= SqlGuid.Null).IsNull);\r
+                        Assertion.Assert ("#M20", (Test1 <= Test3).Value);\r
+                        Assertion.Assert ("#M21", !(Test3 <= Test1).Value);\r
+                        Assertion.Assert ("#M22", (Test2 <= Test3).Value);\r
+                        Assertion.Assert ("#M23", (Test1 <= SqlGuid.Null).IsNull);\r
                 }\r
 \r
-               public void TestSqlBinaryToSqlGuid()\r
+               [Test]\r
+               public void SqlBinaryToSqlGuid()\r
                {\r
                        byte [] b = new byte [16];\r
                        b [0] = 100;\r
                        b [1] = 200;\r
                        SqlBinary TestBinary = new SqlBinary (b);\r
                        \r
-                       AssertEquals ("#N01", new Guid("0000c864-0000-0000-0000-000000000000"), \r
+                       Assertion.AssertEquals ("#N01", new Guid("0000c864-0000-0000-0000-000000000000"), \r
                                      ((SqlGuid)TestBinary).Value);\r
                }\r
 \r
-\r
-               public void TestSqlGuidToGuid()\r
+               [Test]\r
+               public void SqlGuidToGuid()\r
                {\r
-                       AssertEquals ("#O01", new Guid("00000a01-0000-0000-0000-000000000000"), \r
+                       Assertion.AssertEquals ("#O01", new Guid("00000a01-0000-0000-0000-000000000000"), \r
                                      (Guid)Test1);\r
-                       AssertEquals ("#O02", new Guid("00000f64-0000-0000-0000-000000000000"), \r
+                       Assertion.AssertEquals ("#O02", new Guid("00000f64-0000-0000-0000-000000000000"), \r
                                      (Guid)Test2);\r
                }               \r
 \r
-                public void TestSqlStringToSqlGuid()\r
+               [Test]\r
+                public void SqlStringToSqlGuid()\r
                 {\r
                         SqlString TestString = new SqlString ("Test string");\r
                         SqlString TestString100 = new SqlString ("0000c864-0000-0000-0000-000000000000");\r
 \r
-                        AssertEquals ("#P01", new Guid("0000c864-0000-0000-0000-000000000000"), \r
+                        Assertion.AssertEquals ("#P01", new Guid("0000c864-0000-0000-0000-000000000000"), \r
                                       ((SqlGuid)TestString100).Value);\r
 \r
                         try {\r
                                 SqlGuid test = (SqlGuid)TestString;\r
-                                Fail ("#P02");\r
+                                Assertion.Fail ("#P02");\r
                         } catch(Exception e) {\r
-                                AssertEquals ("#P03", typeof (FormatException), e.GetType ());\r
+                                Assertion.AssertEquals ("#P03", typeof (FormatException), e.GetType ());\r
                         }\r
                 }\r
                \r
-               public void TestGuidToSqlGuid()\r
+               [Test]\r
+               public void GuidToSqlGuid()\r
                {\r
                        Guid TestGuid = new Guid("0000c864-0000-0000-0000-000007650000");\r
-                       AssertEquals ("#Q01", new SqlGuid("0000c864-0000-0000-0000-000007650000"), \r
+                       Assertion.AssertEquals ("#Q01", new SqlGuid("0000c864-0000-0000-0000-000007650000"), \r
                                      (SqlGuid)TestGuid);\r
                }\r
         }\r
index e3b8c0cd7134cd6085fc4f25ef17d259b9514641..2d0562efeb3704dd4c80c9fedabf4e843adbaf11 100644 (file)
@@ -1,9 +1,12 @@
 //
 // SqlInt16Test.cs - NUnit Test Cases for System.Data.SqlTypes.SqlInt16
 //
-// Ville Palo (vi64pa@koti.soon.fi)
+// Authors:
+//   Ville Palo (vi64pa@koti.soon.fi)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
-// (C) Ville Palo 2002
+// (C) 2002 Ville Palo
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -12,53 +15,45 @@ using System.Data.SqlTypes;
 
 namespace MonoTests.System.Data.SqlTypes
 {
-        public class SqlInt16Test : TestCase {
-
-                public SqlInt16Test() : base ("System.Data.SqlTypes.SqlInt16") {}
-                public SqlInt16Test(string name) : base(name) {}
-
-                protected override void TearDown() {}
-
-                protected override void SetUp() {}
-
-                public static ITest Suite {
-                        get {
-                                return new TestSuite(typeof(SqlInt16));
-                        }
-                }
+       [TestFixture]
+        public class SqlInt16Test {
 
                 // Test constructor
-                public void TestCreate()
+               [Test]
+                public void Create()
                 {
                         SqlInt16 TestShort = new SqlInt16 (29);
-                        AssertEquals ("Test#1", (short)29, TestShort.Value);
+                        Assertion.AssertEquals ("Test#1", (short)29, TestShort.Value);
 
                         TestShort = new SqlInt16 (-9000);
-                        AssertEquals ("Test#2", (short)-9000, TestShort.Value);
+                        Assertion.AssertEquals ("Test#2", (short)-9000, TestShort.Value);
                 }
 
                 // Test public fields
-                public void TestPublicFields()
+               [Test]
+                public void PublicFields()
                 {
-                        AssertEquals ("Test#1", (SqlInt16)32767, SqlInt16.MaxValue);
-                        AssertEquals ("Test#2", (SqlInt16)(-32768), SqlInt16.MinValue);
-                        Assert ("Test#3", SqlInt16.Null.IsNull);
-                        AssertEquals ("Test#4", (short)0, SqlInt16.Zero.Value);
+                        Assertion.AssertEquals ("Test#1", (SqlInt16)32767, SqlInt16.MaxValue);
+                        Assertion.AssertEquals ("Test#2", (SqlInt16)(-32768), SqlInt16.MinValue);
+                        Assertion.Assert ("Test#3", SqlInt16.Null.IsNull);
+                        Assertion.AssertEquals ("Test#4", (short)0, SqlInt16.Zero.Value);
                 }
 
                 // Test properties
-                public void TestProperties()
+               [Test]
+                public void Properties()
                 {
                         SqlInt16 Test5443 = new SqlInt16 (5443);
                         SqlInt16 Test1 = new SqlInt16 (1);
-                        Assert ("Test#1", SqlInt16.Null.IsNull);
-                        AssertEquals ("Test#2", (short)5443, Test5443.Value);
-                        AssertEquals ("Test#3", (short)1, Test1.Value);
+                        Assertion.Assert ("Test#1", SqlInt16.Null.IsNull);
+                        Assertion.AssertEquals ("Test#2", (short)5443, Test5443.Value);
+                        Assertion.AssertEquals ("Test#3", (short)1, Test1.Value);
                 }
 
                 // PUBLIC METHODS
 
-                public void TestArithmeticMethods()
+               [Test]
+                public void ArithmeticMethods()
                 {
                         SqlInt16 Test64 = new SqlInt16 (64);
                         SqlInt16 Test0 = new SqlInt16 (0);
@@ -66,55 +61,56 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt16 TestMax = new SqlInt16 (SqlInt16.MaxValue.Value);
 
                         // Add()
-                        AssertEquals ("Test#1", (short)64, SqlInt16.Add (Test64, Test0).Value);
-                        AssertEquals ("Test#2", (short)228, SqlInt16.Add (Test64, Test164).Value);
-                        AssertEquals ("Test#3", (short)164, SqlInt16.Add (Test0, Test164).Value);
-                        AssertEquals ("Test#4", (short)SqlInt16.MaxValue, SqlInt16.Add (TestMax, Test0).Value);
+                        Assertion.AssertEquals ("Test#1", (short)64, SqlInt16.Add (Test64, Test0).Value);
+                        Assertion.AssertEquals ("Test#2", (short)228, SqlInt16.Add (Test64, Test164).Value);
+                        Assertion.AssertEquals ("Test#3", (short)164, SqlInt16.Add (Test0, Test164).Value);
+                        Assertion.AssertEquals ("Test#4", (short)SqlInt16.MaxValue, SqlInt16.Add (TestMax, Test0).Value);
 
                         try {
                                 SqlInt16.Add (TestMax, Test64);
-                                Fail ("Test#5");
+                                Assertion.Fail ("Test#5");
                         } catch (Exception e) {
-                                AssertEquals ("Test#6", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("Test#6", typeof (OverflowException), e.GetType ());
                         }
 
                         // Divide()
-                        AssertEquals ("Test#7", (short)2, SqlInt16.Divide (Test164, Test64).Value);
-                        AssertEquals ("Test#8", (short)0, SqlInt16.Divide (Test64, Test164).Value);
+                        Assertion.AssertEquals ("Test#7", (short)2, SqlInt16.Divide (Test164, Test64).Value);
+                        Assertion.AssertEquals ("Test#8", (short)0, SqlInt16.Divide (Test64, Test164).Value);
                         try {
                                 SqlInt16.Divide(Test64, Test0);
-                                Fail ("Test#9");
+                                Assertion.Fail ("Test#9");
                         } catch(Exception e) {
-                                AssertEquals ("Test#10", typeof (DivideByZeroException), e.GetType ());
+                                Assertion.AssertEquals ("Test#10", typeof (DivideByZeroException), e.GetType ());
                         }
 
                         // Mod()
-                        AssertEquals ("Test#11", (SqlInt16)36, SqlInt16.Mod (Test164, Test64));
-                        AssertEquals ("Test#12",  (SqlInt16)64, SqlInt16.Mod (Test64, Test164));
+                        Assertion.AssertEquals ("Test#11", (SqlInt16)36, SqlInt16.Mod (Test164, Test64));
+                        Assertion.AssertEquals ("Test#12",  (SqlInt16)64, SqlInt16.Mod (Test64, Test164));
 
                         // Multiply()
-                        AssertEquals ("Test#13", (short)10496, SqlInt16.Multiply (Test64, Test164).Value);
-                        AssertEquals ("Test#14", (short)0, SqlInt16.Multiply (Test64, Test0).Value);
+                        Assertion.AssertEquals ("Test#13", (short)10496, SqlInt16.Multiply (Test64, Test164).Value);
+                        Assertion.AssertEquals ("Test#14", (short)0, SqlInt16.Multiply (Test64, Test0).Value);
 
                         try {
                                 SqlInt16.Multiply (TestMax, Test64);
-                                Fail ("Test#15");
+                                Assertion.Fail ("Test#15");
                         } catch(Exception e) {
-                                AssertEquals ("Test#16", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("Test#16", typeof (OverflowException), e.GetType ());
                         }
 
                         // Subtract()
-                        AssertEquals ("Test#17", (short)100, SqlInt16.Subtract (Test164, Test64).Value);
+                        Assertion.AssertEquals ("Test#17", (short)100, SqlInt16.Subtract (Test164, Test64).Value);
 
                         try {
                                 SqlInt16.Subtract (SqlInt16.MinValue, Test164);
-                                Fail("Test#18");
+                                Assertion.Fail("Test#18");
                         } catch(Exception e) {
-                                AssertEquals ("Test#19", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("Test#19", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestBitwiseMethods()
+               [Test]
+                public void BitwiseMethods()
                 {
                         short MaxValue = SqlInt16.MaxValue.Value;
                         SqlInt16 TestInt = new SqlInt16 (0);
@@ -123,17 +119,18 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt16 TestInt3 = new SqlInt16 (21845);
 
                         // BitwiseAnd
-                        AssertEquals ("Test#1", (short)21845, SqlInt16.BitwiseAnd (TestInt3, TestIntMax).Value);
-                        AssertEquals ("Test#2", (short)0, SqlInt16.BitwiseAnd (TestInt2, TestInt3).Value);
-                        AssertEquals ("Test#3", (short)10922, SqlInt16.BitwiseAnd (TestInt2, TestIntMax).Value);
+                        Assertion.AssertEquals ("Test#1", (short)21845, SqlInt16.BitwiseAnd (TestInt3, TestIntMax).Value);
+                        Assertion.AssertEquals ("Test#2", (short)0, SqlInt16.BitwiseAnd (TestInt2, TestInt3).Value);
+                        Assertion.AssertEquals ("Test#3", (short)10922, SqlInt16.BitwiseAnd (TestInt2, TestIntMax).Value);
 
                         //BitwiseOr
-                        AssertEquals ("Test#4", (short)MaxValue, SqlInt16.BitwiseOr (TestInt2, TestInt3).Value);
-                        AssertEquals ("Test#5", (short)21845, SqlInt16.BitwiseOr (TestInt, TestInt3).Value);
-                        AssertEquals ("Test#6", (short)MaxValue, SqlInt16.BitwiseOr (TestIntMax, TestInt2).Value);
+                        Assertion.AssertEquals ("Test#4", (short)MaxValue, SqlInt16.BitwiseOr (TestInt2, TestInt3).Value);
+                        Assertion.AssertEquals ("Test#5", (short)21845, SqlInt16.BitwiseOr (TestInt, TestInt3).Value);
+                        Assertion.AssertEquals ("Test#6", (short)MaxValue, SqlInt16.BitwiseOr (TestIntMax, TestInt2).Value);
                 }
 
-                public void TestCompareTo()
+               [Test]
+                public void CompareTo()
                 {
                         SqlInt16 TestInt4000 = new SqlInt16 (4000);
                         SqlInt16 TestInt4000II = new SqlInt16 (4000);
@@ -141,144 +138,154 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt16 TestInt10000 = new SqlInt16 (10000);
                         SqlString TestString = new SqlString ("This is a test");
 
-                        Assert ("Test#1", TestInt4000.CompareTo (TestInt10) > 0);
-                        Assert ("Test#2", TestInt10.CompareTo (TestInt4000) < 0);
-                        Assert ("Test#3", TestInt4000II.CompareTo (TestInt4000) == 0);
-                        Assert ("Test#4", TestInt4000II.CompareTo (SqlInt16.Null) > 0);
+                        Assertion.Assert ("Test#1", TestInt4000.CompareTo (TestInt10) > 0);
+                        Assertion.Assert ("Test#2", TestInt10.CompareTo (TestInt4000) < 0);
+                        Assertion.Assert ("Test#3", TestInt4000II.CompareTo (TestInt4000) == 0);
+                        Assertion.Assert ("Test#4", TestInt4000II.CompareTo (SqlInt16.Null) > 0);
 
                         try {
                                 TestInt10.CompareTo (TestString);
-                                Fail ("Test#5");
+                                Assertion.Fail ("Test#5");
                         } catch(Exception e) {
-                                AssertEquals ("Test#6", typeof (ArgumentException), e.GetType ());
+                                Assertion.AssertEquals ("Test#6", typeof (ArgumentException), e.GetType ());
                         }
                 }
 
-                public void TestEqualsMethod()
+               [Test]
+                public void EqualsMethod()
                 {
                         SqlInt16 Test0 = new SqlInt16 (0);
                         SqlInt16 Test158 = new SqlInt16 (158);
                         SqlInt16 Test180 = new SqlInt16 (180);
                         SqlInt16 Test180II = new SqlInt16 (180);
 
-                        Assert ("Test#1", !Test0.Equals (Test158));
-                        Assert ("Test#2", !Test158.Equals (Test180));
-                        Assert ("Test#3", !Test180.Equals (new SqlString ("TEST")));
-                        Assert ("Test#4", Test180.Equals (Test180II));
+                        Assertion.Assert ("Test#1", !Test0.Equals (Test158));
+                        Assertion.Assert ("Test#2", !Test158.Equals (Test180));
+                        Assertion.Assert ("Test#3", !Test180.Equals (new SqlString ("TEST")));
+                        Assertion.Assert ("Test#4", Test180.Equals (Test180II));
                 }
 
-                public void TestStaticEqualsMethod()
+               [Test]
+                public void StaticEqualsMethod()
                 {
                         SqlInt16 Test34 = new SqlInt16 (34);
                         SqlInt16 Test34II = new SqlInt16 (34);
                         SqlInt16 Test15 = new SqlInt16 (15);
 
-                        Assert ("Test#1", SqlInt16.Equals (Test34, Test34II).Value);
-                        Assert ("Test#2", !SqlInt16.Equals (Test34, Test15).Value);
-                        Assert ("Test#3", !SqlInt16.Equals (Test15, Test34II).Value);
+                        Assertion.Assert ("Test#1", SqlInt16.Equals (Test34, Test34II).Value);
+                        Assertion.Assert ("Test#2", !SqlInt16.Equals (Test34, Test15).Value);
+                        Assertion.Assert ("Test#3", !SqlInt16.Equals (Test15, Test34II).Value);
                 }
 
-                public void TestGetHashCode()
+               [Test]
+                public void GetHashCodeTest()
                 {
                         SqlInt16 Test15 = new SqlInt16 (15);
 
                         // FIXME: Better way to test GetHashCode()-methods
-                        AssertEquals ("Test#1", Test15.GetHashCode (), Test15.GetHashCode ());
+                        Assertion.AssertEquals ("Test#1", Test15.GetHashCode (), Test15.GetHashCode ());
                 }
 
-                public void TestGetType()
+               [Test]
+                public void GetTypeTest()
                 {
                         SqlInt16 Test = new SqlInt16 (84);
-                        AssertEquals ("Test#1", "System.Data.SqlTypes.SqlInt16", Test.GetType ().ToString ());
+                        Assertion.AssertEquals ("Test#1", "System.Data.SqlTypes.SqlInt16", Test.GetType ().ToString ());
                 }
 
-                public void TestGreaters()
+               [Test]
+                public void Greaters()
                 {
                         SqlInt16 Test10 = new SqlInt16 (10);
                         SqlInt16 Test10II = new SqlInt16 (10);
                         SqlInt16 Test110 = new SqlInt16 (110);
 
                         // GreateThan ()
-                        Assert ("Test#1", !SqlInt16.GreaterThan (Test10, Test110).Value);
-                        Assert ("Test#2", SqlInt16.GreaterThan (Test110, Test10).Value);
-                        Assert ("Test#3", !SqlInt16.GreaterThan (Test10II, Test10).Value);
+                        Assertion.Assert ("Test#1", !SqlInt16.GreaterThan (Test10, Test110).Value);
+                        Assertion.Assert ("Test#2", SqlInt16.GreaterThan (Test110, Test10).Value);
+                        Assertion.Assert ("Test#3", !SqlInt16.GreaterThan (Test10II, Test10).Value);
 
                         // GreaterTharOrEqual ()
-                        Assert ("Test#4", !SqlInt16.GreaterThanOrEqual (Test10, Test110).Value);
-                        Assert ("Test#5", SqlInt16.GreaterThanOrEqual (Test110, Test10).Value);
-                        Assert ("Test#6", SqlInt16.GreaterThanOrEqual (Test10II, Test10).Value);
+                        Assertion.Assert ("Test#4", !SqlInt16.GreaterThanOrEqual (Test10, Test110).Value);
+                        Assertion.Assert ("Test#5", SqlInt16.GreaterThanOrEqual (Test110, Test10).Value);
+                        Assertion.Assert ("Test#6", SqlInt16.GreaterThanOrEqual (Test10II, Test10).Value);
                 }
 
-                public void TestLessers()
+               [Test]
+                public void Lessers()
                 {
                         SqlInt16 Test10 = new SqlInt16 (10);
                         SqlInt16 Test10II = new SqlInt16 (10);
                         SqlInt16 Test110 = new SqlInt16 (110);
 
                         // LessThan()
-                        Assert ("Test#1", SqlInt16.LessThan (Test10, Test110).Value);
-                        Assert ("Test#2", !SqlInt16.LessThan (Test110, Test10).Value);
-                        Assert ("Test#3", !SqlInt16.LessThan (Test10II, Test10).Value);
+                        Assertion.Assert ("Test#1", SqlInt16.LessThan (Test10, Test110).Value);
+                        Assertion.Assert ("Test#2", !SqlInt16.LessThan (Test110, Test10).Value);
+                        Assertion.Assert ("Test#3", !SqlInt16.LessThan (Test10II, Test10).Value);
 
                         // LessThanOrEqual ()
-                        Assert ("Test#4", SqlInt16.LessThanOrEqual (Test10, Test110).Value);
-                        Assert ("Test#5", !SqlInt16.LessThanOrEqual (Test110, Test10).Value);
-                        Assert ("Test#6", SqlInt16.LessThanOrEqual (Test10II, Test10).Value);
-                        Assert ("Test#7", SqlInt16.LessThanOrEqual (Test10II, SqlInt16.Null).IsNull);
+                        Assertion.Assert ("Test#4", SqlInt16.LessThanOrEqual (Test10, Test110).Value);
+                        Assertion.Assert ("Test#5", !SqlInt16.LessThanOrEqual (Test110, Test10).Value);
+                        Assertion.Assert ("Test#6", SqlInt16.LessThanOrEqual (Test10II, Test10).Value);
+                        Assertion.Assert ("Test#7", SqlInt16.LessThanOrEqual (Test10II, SqlInt16.Null).IsNull);
                 }
 
-                public void TestNotEquals()
+               [Test]
+                public void NotEquals()
                 {
                         SqlInt16 Test12 = new SqlInt16 (12);
                         SqlInt16 Test128 = new SqlInt16 (128);
                         SqlInt16 Test128II = new SqlInt16 (128);
 
-                        Assert ("Test#1", SqlInt16.NotEquals (Test12, Test128).Value);
-                        Assert ("Test#2", SqlInt16.NotEquals (Test128, Test12).Value);
-                        Assert ("Test#3", SqlInt16.NotEquals (Test128II, Test12).Value);
-                        Assert ("Test#4", !SqlInt16.NotEquals (Test128II, Test128).Value);
-                        Assert ("Test#5", !SqlInt16.NotEquals (Test128, Test128II).Value);
-                        Assert ("Test#6", SqlInt16.NotEquals (SqlInt16.Null, Test128II).IsNull);
-                        Assert ("Test#7", SqlInt16.NotEquals (SqlInt16.Null, Test128II).IsNull);
+                        Assertion.Assert ("Test#1", SqlInt16.NotEquals (Test12, Test128).Value);
+                        Assertion.Assert ("Test#2", SqlInt16.NotEquals (Test128, Test12).Value);
+                        Assertion.Assert ("Test#3", SqlInt16.NotEquals (Test128II, Test12).Value);
+                        Assertion.Assert ("Test#4", !SqlInt16.NotEquals (Test128II, Test128).Value);
+                        Assertion.Assert ("Test#5", !SqlInt16.NotEquals (Test128, Test128II).Value);
+                        Assertion.Assert ("Test#6", SqlInt16.NotEquals (SqlInt16.Null, Test128II).IsNull);
+                        Assertion.Assert ("Test#7", SqlInt16.NotEquals (SqlInt16.Null, Test128II).IsNull);
                 }
 
-                public void TestOnesComplement()
+               [Test]
+                public void OnesComplement()
                 {
                         SqlInt16 Test12 = new SqlInt16(12);
                         SqlInt16 Test128 = new SqlInt16(128);
 
-                        AssertEquals ("Test#1", (SqlInt16)(-13), SqlInt16.OnesComplement (Test12));
-                        AssertEquals ("Test#2", (SqlInt16)(-129), SqlInt16.OnesComplement (Test128));
+                        Assertion.AssertEquals ("Test#1", (SqlInt16)(-13), SqlInt16.OnesComplement (Test12));
+                        Assertion.AssertEquals ("Test#2", (SqlInt16)(-129), SqlInt16.OnesComplement (Test128));
                 }
 
-                public void TestParse()
+               [Test]
+                public void Parse()
                 {
                         try {
                                 SqlInt16.Parse (null);
-                                Fail ("Test#1");
+                                Assertion.Fail ("Test#1");
                         } catch (Exception e) {
-                                AssertEquals ("Test#2", typeof (ArgumentNullException), e.GetType ());
+                                Assertion.AssertEquals ("Test#2", typeof (ArgumentNullException), e.GetType ());
                         }
 
                         try {
                                 SqlInt16.Parse ("not-a-number");
-                                Fail ("Test#3");
+                                Assertion.Fail ("Test#3");
                         } catch (Exception e) {
-                                AssertEquals ("Test#4", typeof (FormatException), e.GetType ());
+                                Assertion.AssertEquals ("Test#4", typeof (FormatException), e.GetType ());
                         }
 
                         try {
                                 int OverInt = (int)SqlInt16.MaxValue + 1;
                                 SqlInt16.Parse (OverInt.ToString ());
-                                Fail ("Test#5");
+                                Assertion.Fail ("Test#5");
                         } catch (Exception e) {
-                                AssertEquals ("Test#6", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("Test#6", typeof (OverflowException), e.GetType ());
                         }
 
-                        AssertEquals("Test#7", (short)150, SqlInt16.Parse ("150").Value);
+                        Assertion.AssertEquals("Test#7", (short)150, SqlInt16.Parse ("150").Value);
                 }
 
-                public void TestConversions()
+               [Test]
+                public void Conversions()
                 {
                         SqlInt16 Test12 = new SqlInt16 (12);
                         SqlInt16 Test0 = new SqlInt16 (0);
@@ -287,64 +294,64 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt16 Test288 = new SqlInt16(288);
 
                         // ToSqlBoolean ()
-                        Assert ("TestA#1", Test12.ToSqlBoolean ().Value);
-                        Assert ("TestA#2", !Test0.ToSqlBoolean ().Value);
-                        Assert ("TestA#3", TestNull.ToSqlBoolean ().IsNull);
+                        Assertion.Assert ("TestA#1", Test12.ToSqlBoolean ().Value);
+                        Assertion.Assert ("TestA#2", !Test0.ToSqlBoolean ().Value);
+                        Assertion.Assert ("TestA#3", TestNull.ToSqlBoolean ().IsNull);
 
                         // ToSqlByte ()
-                        AssertEquals ("TestB#1", (byte)12, Test12.ToSqlByte ().Value);
-                        AssertEquals ("TestB#2", (byte)0, Test0.ToSqlByte ().Value);
+                        Assertion.AssertEquals ("TestB#1", (byte)12, Test12.ToSqlByte ().Value);
+                        Assertion.AssertEquals ("TestB#2", (byte)0, Test0.ToSqlByte ().Value);
 
                         try {
                                 SqlByte b = (byte)Test1000.ToSqlByte ();
-                                Fail ("TestB#4");
+                                Assertion.Fail ("TestB#4");
                         } catch (Exception e) {
-                                AssertEquals ("TestB#5", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("TestB#5", typeof (OverflowException), e.GetType ());
                         }
 
                         // ToSqlDecimal ()
-                        AssertEquals ("TestC#1", (decimal)12, Test12.ToSqlDecimal ().Value);
-                        AssertEquals ("TestC#2", (decimal)0, Test0.ToSqlDecimal ().Value);
-                        AssertEquals ("TestC#3", (decimal)288, Test288.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("TestC#1", (decimal)12, Test12.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("TestC#2", (decimal)0, Test0.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("TestC#3", (decimal)288, Test288.ToSqlDecimal ().Value);
 
                         // ToSqlDouble ()
-                        AssertEquals ("TestD#1", (double)12, Test12.ToSqlDouble ().Value);
-                        AssertEquals ("TestD#2", (double)0, Test0.ToSqlDouble ().Value);
-                        AssertEquals ("TestD#3", (double)1000, Test1000.ToSqlDouble ().Value);
+                        Assertion.AssertEquals ("TestD#1", (double)12, Test12.ToSqlDouble ().Value);
+                        Assertion.AssertEquals ("TestD#2", (double)0, Test0.ToSqlDouble ().Value);
+                        Assertion.AssertEquals ("TestD#3", (double)1000, Test1000.ToSqlDouble ().Value);
 
                         // ToSqlInt32 ()
-                        AssertEquals ("TestE#1", (int)12, Test12.ToSqlInt32 ().Value);
-                        AssertEquals ("TestE#2", (int)0, Test0.ToSqlInt32 ().Value);
-                        AssertEquals ("TestE#3", (int)288, Test288.ToSqlInt32().Value);
+                        Assertion.AssertEquals ("TestE#1", (int)12, Test12.ToSqlInt32 ().Value);
+                        Assertion.AssertEquals ("TestE#2", (int)0, Test0.ToSqlInt32 ().Value);
+                        Assertion.AssertEquals ("TestE#3", (int)288, Test288.ToSqlInt32().Value);
 
                         // ToSqlInt64 ()
-                        AssertEquals ("TestF#1", (long)12, Test12.ToSqlInt64 ().Value);
-                        AssertEquals ("TestF#2", (long)0, Test0.ToSqlInt64 ().Value);
-                        AssertEquals ("TestF#3", (long)288, Test288.ToSqlInt64 ().Value);
+                        Assertion.AssertEquals ("TestF#1", (long)12, Test12.ToSqlInt64 ().Value);
+                        Assertion.AssertEquals ("TestF#2", (long)0, Test0.ToSqlInt64 ().Value);
+                        Assertion.AssertEquals ("TestF#3", (long)288, Test288.ToSqlInt64 ().Value);
 
                         // ToSqlMoney ()
-                        AssertEquals ("TestG#1", (decimal)12, Test12.ToSqlMoney ().Value);
-                        AssertEquals ("TestG#2", (decimal)0, Test0.ToSqlMoney ().Value);
-                        AssertEquals ("TestG#3", (decimal)288, Test288.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("TestG#1", (decimal)12, Test12.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("TestG#2", (decimal)0, Test0.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("TestG#3", (decimal)288, Test288.ToSqlMoney ().Value);
 
                         // ToSqlSingle ()
-                        AssertEquals ("TestH#1", (float)12, Test12.ToSqlSingle ().Value);
-                        AssertEquals ("TestH#2", (float)0, Test0.ToSqlSingle ().Value);
-                        AssertEquals ("TestH#3", (float)288, Test288.ToSqlSingle().Value);
+                        Assertion.AssertEquals ("TestH#1", (float)12, Test12.ToSqlSingle ().Value);
+                        Assertion.AssertEquals ("TestH#2", (float)0, Test0.ToSqlSingle ().Value);
+                        Assertion.AssertEquals ("TestH#3", (float)288, Test288.ToSqlSingle().Value);
 
                         // ToSqlString ()
-                        AssertEquals ("TestI#1", "12", Test12.ToSqlString ().Value);
-                        AssertEquals ("TestI#2", "0", Test0.ToSqlString ().Value);
-                        AssertEquals ("TestI#3", "288", Test288.ToSqlString ().Value);
+                        Assertion.AssertEquals ("TestI#1", "12", Test12.ToSqlString ().Value);
+                        Assertion.AssertEquals ("TestI#2", "0", Test0.ToSqlString ().Value);
+                        Assertion.AssertEquals ("TestI#3", "288", Test288.ToSqlString ().Value);
 
                         // ToString ()
-                        AssertEquals ("TestJ#1", "12", Test12.ToString ());
-                        AssertEquals ("TestJ#2", "0", Test0.ToString ());
-                        AssertEquals ("TestJ#3", "288", Test288.ToString ());
+                        Assertion.AssertEquals ("TestJ#1", "12", Test12.ToString ());
+                        Assertion.AssertEquals ("TestJ#2", "0", Test0.ToString ());
+                        Assertion.AssertEquals ("TestJ#3", "288", Test288.ToString ());
                 }
 
-
-                public void TestXor()
+               [Test]
+                public void Xor()
                 {
                         SqlInt16 Test14 = new SqlInt16 (14);
                         SqlInt16 Test58 = new SqlInt16 (58);
@@ -352,16 +359,17 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt16 TestMax = new SqlInt16 (SqlInt16.MaxValue.Value);
                         SqlInt16 Test0 = new SqlInt16 (0);
 
-                        AssertEquals ("Test#1", (short)52, SqlInt16.Xor (Test14, Test58).Value);
-                        AssertEquals ("Test#2", (short)140, SqlInt16.Xor (Test14, Test130).Value);
-                        AssertEquals ("Test#3", (short)184, SqlInt16.Xor (Test58, Test130).Value);
-                        AssertEquals ("Test#4", (short)0, SqlInt16.Xor (TestMax, TestMax).Value);
-                        AssertEquals ("Test#5", TestMax.Value, SqlInt16.Xor (TestMax, Test0).Value);
+                        Assertion.AssertEquals ("Test#1", (short)52, SqlInt16.Xor (Test14, Test58).Value);
+                        Assertion.AssertEquals ("Test#2", (short)140, SqlInt16.Xor (Test14, Test130).Value);
+                        Assertion.AssertEquals ("Test#3", (short)184, SqlInt16.Xor (Test58, Test130).Value);
+                        Assertion.AssertEquals ("Test#4", (short)0, SqlInt16.Xor (TestMax, TestMax).Value);
+                        Assertion.AssertEquals ("Test#5", TestMax.Value, SqlInt16.Xor (TestMax, Test0).Value);
                 }
 
                 // OPERATORS
 
-                public void TestArithmeticOperators()
+               [Test]
+                public void ArithmeticOperators()
                 {
                         SqlInt16 Test24 = new SqlInt16 (24);
                         SqlInt16 Test64 = new SqlInt16 (64);
@@ -369,73 +377,75 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt16 Test0 = new SqlInt16 (0);
 
                         // "+"-operator
-                        AssertEquals ("TestA#1", (SqlInt16)2614,Test2550 + Test64);
+                        Assertion.AssertEquals ("TestA#1", (SqlInt16)2614,Test2550 + Test64);
                         try {
                                 SqlInt16 result = Test64 + SqlInt16.MaxValue;
-                                Fail ("TestA#2");
+                                Assertion.Fail ("TestA#2");
                         } catch (Exception e) {
-                                AssertEquals ("TestA#3", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("TestA#3", typeof (OverflowException), e.GetType ());
                         }
 
                         // "/"-operator
-                        AssertEquals ("TestB#1", (SqlInt16)39, Test2550 / Test64);
-                        AssertEquals ("TestB#2", (SqlInt16)0, Test24 / Test64);
+                        Assertion.AssertEquals ("TestB#1", (SqlInt16)39, Test2550 / Test64);
+                        Assertion.AssertEquals ("TestB#2", (SqlInt16)0, Test24 / Test64);
 
                         try {
                                 SqlInt16 result = Test2550 / Test0;
-                                Fail ("TestB#3");
+                                Assertion.Fail ("TestB#3");
                         } catch (Exception e) {
-                                AssertEquals ("TestB#4", typeof (DivideByZeroException), e.GetType ());
+                                Assertion.AssertEquals ("TestB#4", typeof (DivideByZeroException), e.GetType ());
                         }
 
                         // "*"-operator
-                        AssertEquals ("TestC#1", (SqlInt16)1536, Test64 * Test24);
+                        Assertion.AssertEquals ("TestC#1", (SqlInt16)1536, Test64 * Test24);
 
                         try {
                                 SqlInt16 test = (SqlInt16.MaxValue * Test64);
-                                Fail ("TestC#2");
+                                Assertion.Fail ("TestC#2");
                         } catch (Exception e) {
-                                AssertEquals ("TestC#3", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("TestC#3", typeof (OverflowException), e.GetType ());
                         }
 
                         // "-"-operator
-                        AssertEquals ("TestD#1", (SqlInt16)2526, Test2550 - Test24);
+                        Assertion.AssertEquals ("TestD#1", (SqlInt16)2526, Test2550 - Test24);
 
                         try {
                                 SqlInt16 test = SqlInt16.MinValue - Test64;
-                                Fail ("TestD#2");
+                                Assertion.Fail ("TestD#2");
                         } catch (Exception e) {
-                                AssertEquals ("OverflowException", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("OverflowException", typeof (OverflowException), e.GetType ());
                         }
 
                         // "%"-operator
-                        AssertEquals ("TestE#1", (SqlInt16)54, Test2550 % Test64);
-                        AssertEquals ("TestE#2", (SqlInt16)24, Test24 % Test64);
-                        AssertEquals ("TestE#1", (SqlInt16)0, new SqlInt16 (100) % new SqlInt16 (10));
+                        Assertion.AssertEquals ("TestE#1", (SqlInt16)54, Test2550 % Test64);
+                        Assertion.AssertEquals ("TestE#2", (SqlInt16)24, Test24 % Test64);
+                        Assertion.AssertEquals ("TestE#1", (SqlInt16)0, new SqlInt16 (100) % new SqlInt16 (10));
                 }
 
-                public void TestBitwiseOperators()
+               [Test]
+                public void BitwiseOperators()
                 {
                         SqlInt16 Test2 = new SqlInt16 (2);
                         SqlInt16 Test4 = new SqlInt16 (4);
                         SqlInt16 Test2550 = new SqlInt16 (2550);
 
                         // & -operator
-                        AssertEquals ("TestA#1", (SqlInt16)0, Test2 & Test4);
-                        AssertEquals ("TestA#2", (SqlInt16)2, Test2 & Test2550);
-                        AssertEquals ("TestA#3", (SqlInt16)0,  SqlInt16.MaxValue & SqlInt16.MinValue);
+                        Assertion.AssertEquals ("TestA#1", (SqlInt16)0, Test2 & Test4);
+                        Assertion.AssertEquals ("TestA#2", (SqlInt16)2, Test2 & Test2550);
+                        Assertion.AssertEquals ("TestA#3", (SqlInt16)0,  SqlInt16.MaxValue & SqlInt16.MinValue);
 
                         // | -operator
-                        AssertEquals ("TestB#1", (SqlInt16)6,Test2 | Test4);
-                        AssertEquals ("TestB#2", (SqlInt16)2550, Test2 | Test2550);
-                        AssertEquals ("TestB#3", (SqlInt16)(-1), SqlInt16.MinValue | SqlInt16.MaxValue);
+                        Assertion.AssertEquals ("TestB#1", (SqlInt16)6,Test2 | Test4);
+                        Assertion.AssertEquals ("TestB#2", (SqlInt16)2550, Test2 | Test2550);
+                        Assertion.AssertEquals ("TestB#3", (SqlInt16)(-1), SqlInt16.MinValue | SqlInt16.MaxValue);
 
                         //  ^ -operator
-                        AssertEquals("TestC#1", (SqlInt16)2546, (Test2550 ^ Test4));
-                        AssertEquals("TestC#2", (SqlInt16)6, (Test2 ^ Test4));
+                        Assertion.AssertEquals("TestC#1", (SqlInt16)2546, (Test2550 ^ Test4));
+                        Assertion.AssertEquals("TestC#2", (SqlInt16)6, (Test2 ^ Test4));
                 }
 
-                public void TestThanOrEqualOperators()
+               [Test]
+                public void ThanOrEqualOperators()
                 {
                         SqlInt16 Test165 = new SqlInt16 (165);
                         SqlInt16 Test100 = new SqlInt16 (100);
@@ -443,202 +453,214 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt16 Test255 = new SqlInt16 (2550);
 
                         // == -operator
-                        Assert ("TestA#1", (Test100 == Test100II).Value);
-                        Assert ("TestA#2", !(Test165 == Test100).Value);
-                        Assert ("TestA#3", (Test165 == SqlInt16.Null).IsNull);
+                        Assertion.Assert ("TestA#1", (Test100 == Test100II).Value);
+                        Assertion.Assert ("TestA#2", !(Test165 == Test100).Value);
+                        Assertion.Assert ("TestA#3", (Test165 == SqlInt16.Null).IsNull);
 
                         // != -operator
-                        Assert ("TestB#1", !(Test100 != Test100II).Value);
-                        Assert ("TestB#2", (Test100 != Test255).Value);
-                        Assert ("TestB#3", (Test165 != Test255).Value);
-                        Assert ("TestB#4", (Test165 != SqlInt16.Null).IsNull);
+                        Assertion.Assert ("TestB#1", !(Test100 != Test100II).Value);
+                        Assertion.Assert ("TestB#2", (Test100 != Test255).Value);
+                        Assertion.Assert ("TestB#3", (Test165 != Test255).Value);
+                        Assertion.Assert ("TestB#4", (Test165 != SqlInt16.Null).IsNull);
 
                         // > -operator
-                        Assert ("TestC#1", (Test165 > Test100).Value);
-                        Assert ("TestC#2", !(Test165 > Test255).Value);
-                        Assert ("TestC#3", !(Test100 > Test100II).Value);
-                        Assert ("TestC#4", (Test165 > SqlInt16.Null).IsNull);
+                        Assertion.Assert ("TestC#1", (Test165 > Test100).Value);
+                        Assertion.Assert ("TestC#2", !(Test165 > Test255).Value);
+                        Assertion.Assert ("TestC#3", !(Test100 > Test100II).Value);
+                        Assertion.Assert ("TestC#4", (Test165 > SqlInt16.Null).IsNull);
 
                         // >=  -operator
-                        Assert ("TestD#1", !(Test165 >= Test255).Value);
-                        Assert ("TestD#2", (Test255 >= Test165).Value);
-                        Assert ("TestD#3", (Test100 >= Test100II).Value);
-                        Assert ("TestD#4", (Test165 >= SqlInt16.Null).IsNull);
+                        Assertion.Assert ("TestD#1", !(Test165 >= Test255).Value);
+                        Assertion.Assert ("TestD#2", (Test255 >= Test165).Value);
+                        Assertion.Assert ("TestD#3", (Test100 >= Test100II).Value);
+                        Assertion.Assert ("TestD#4", (Test165 >= SqlInt16.Null).IsNull);
 
                         // < -operator
-                        Assert ("TestE#1", !(Test165 < Test100).Value);
-                        Assert ("TestE#2", (Test165 < Test255).Value);
-                        Assert ("TestE#3", !(Test100 < Test100II).Value);
-                        Assert ("TestE#4", (Test165 < SqlInt16.Null).IsNull);
+                        Assertion.Assert ("TestE#1", !(Test165 < Test100).Value);
+                        Assertion.Assert ("TestE#2", (Test165 < Test255).Value);
+                        Assertion.Assert ("TestE#3", !(Test100 < Test100II).Value);
+                        Assertion.Assert ("TestE#4", (Test165 < SqlInt16.Null).IsNull);
 
                         // <= -operator
-                        Assert ("TestF#1", (Test165 <= Test255).Value);
-                        Assert ("TestF#2", !(Test255 <= Test165).Value);
-                        Assert ("TestF#3", (Test100 <= Test100II).Value);
-                        Assert ("TestF#4", (Test165 <= SqlInt16.Null).IsNull);
+                        Assertion.Assert ("TestF#1", (Test165 <= Test255).Value);
+                        Assertion.Assert ("TestF#2", !(Test255 <= Test165).Value);
+                        Assertion.Assert ("TestF#3", (Test100 <= Test100II).Value);
+                        Assertion.Assert ("TestF#4", (Test165 <= SqlInt16.Null).IsNull);
                 }
 
-                public void TestOnesComplementOperator()
+               [Test]
+                public void OnesComplementOperator()
                 {
                         SqlInt16 Test12 = new SqlInt16 (12);
                         SqlInt16 Test128 = new SqlInt16 (128);
 
-                        AssertEquals ("Test#1", (SqlInt16)(-13), ~Test12);
-                        AssertEquals ("Test#2", (SqlInt16)(-129), ~Test128);
-                        AssertEquals ("Test#3", SqlInt16.Null, ~SqlInt16.Null);
+                        Assertion.AssertEquals ("Test#1", (SqlInt16)(-13), ~Test12);
+                        Assertion.AssertEquals ("Test#2", (SqlInt16)(-129), ~Test128);
+                        Assertion.AssertEquals ("Test#3", SqlInt16.Null, ~SqlInt16.Null);
                 }
 
-                public void TestUnaryNegation()
+               [Test]
+                public void UnaryNegation()
                 {
                         SqlInt16 Test = new SqlInt16 (2000);
                         SqlInt16 TestNeg = new SqlInt16 (-3000);
 
                         SqlInt16 Result = -Test;
-                        AssertEquals ("Test#1", (short)(-2000), Result.Value);
+                        Assertion.AssertEquals ("Test#1", (short)(-2000), Result.Value);
 
                         Result = -TestNeg;
-                        AssertEquals ("Test#2", (short)3000, Result.Value);
+                        Assertion.AssertEquals ("Test#2", (short)3000, Result.Value);
                 }
 
-                public void TestSqlBooleanToSqlInt16()
+               [Test]
+                public void SqlBooleanToSqlInt16()
                 {
                         SqlBoolean TestBoolean = new SqlBoolean (true);
                         SqlInt16 Result;
 
                         Result = (SqlInt16)TestBoolean;
 
-                        AssertEquals ("Test#1", (short)1, Result.Value);
+                        Assertion.AssertEquals ("Test#1", (short)1, Result.Value);
 
                         Result = (SqlInt16)SqlBoolean.Null;
-                        Assert ("Test#2", Result.IsNull);
+                        Assertion.Assert ("Test#2", Result.IsNull);
                 }
 
-                public void TestSqlDecimalToSqlInt16()
+               [Test]
+                public void SqlDecimalToSqlInt16()
                 {
                         SqlDecimal TestDecimal64 = new SqlDecimal (64);
                         SqlDecimal TestDecimal900 = new SqlDecimal (90000);
 
-                        AssertEquals ("Test#1", (short)64, ((SqlInt16)TestDecimal64).Value);
-                        AssertEquals ("Test#2", SqlInt16.Null, ((SqlInt16)SqlDecimal.Null));
+                        Assertion.AssertEquals ("Test#1", (short)64, ((SqlInt16)TestDecimal64).Value);
+                        Assertion.AssertEquals ("Test#2", SqlInt16.Null, ((SqlInt16)SqlDecimal.Null));
 
                         try {
                                 SqlInt16 test = (SqlInt16)TestDecimal900;
-                                Fail ("Test#3");
+                                Assertion.Fail ("Test#3");
                         } catch (Exception e) {
-                                AssertEquals("Test#4", typeof(OverflowException), e.GetType ());
+                                Assertion.AssertEquals("Test#4", typeof(OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestSqlDoubleToSqlInt16()
+               [Test]
+                public void SqlDoubleToSqlInt16()
                 {
                         SqlDouble TestDouble64 = new SqlDouble (64);
                         SqlDouble TestDouble900 = new SqlDouble (90000);
 
-                        AssertEquals ("Test#1", (short)64, ((SqlInt16)TestDouble64).Value);
-                        AssertEquals ("Test#2", SqlInt16.Null, ((SqlInt16)SqlDouble.Null));
+                        Assertion.AssertEquals ("Test#1", (short)64, ((SqlInt16)TestDouble64).Value);
+                        Assertion.AssertEquals ("Test#2", SqlInt16.Null, ((SqlInt16)SqlDouble.Null));
 
                         try {
                                 SqlInt16 test = (SqlInt16)TestDouble900;
-                                Fail ("Test#3");
+                                Assertion.Fail ("Test#3");
                         } catch (Exception e) {
-                                AssertEquals("Test#4", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals("Test#4", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestSqlIntToInt16()
+               [Test]
+                public void SqlIntToInt16()
                 {
                         SqlInt16 Test = new SqlInt16(12);
                         Int16 Result = (Int16)Test;
-                        AssertEquals("Test#1", (short)12, Result);
+                        Assertion.AssertEquals("Test#1", (short)12, Result);
                 }
 
-                public void TestSqlInt32ToSqlInt16()
+               [Test]
+                public void SqlInt32ToSqlInt16()
                 {
                         SqlInt32 Test64 = new SqlInt32 (64);
                         SqlInt32 Test900 = new SqlInt32 (90000);
 
-                        AssertEquals ("Test#1", (short)64, ((SqlInt16)Test64).Value);
+                        Assertion.AssertEquals ("Test#1", (short)64, ((SqlInt16)Test64).Value);
 
                         try {
                                 SqlInt16 test = (SqlInt16)Test900;
-                                Fail ("Test#2");
+                                Assertion.Fail ("Test#2");
                         } catch (Exception e) {
-                                AssertEquals ("Test#3", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("Test#3", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestSqlInt64ToSqlInt16()
+               [Test]
+                public void SqlInt64ToSqlInt16()
                 {
                         SqlInt64 Test64 = new SqlInt64 (64);
                         SqlInt64 Test900 = new SqlInt64 (90000);
 
-                        AssertEquals ("Test#1", (short)64, ((SqlInt16)Test64).Value);
+                        Assertion.AssertEquals ("Test#1", (short)64, ((SqlInt16)Test64).Value);
 
                         try {
                                 SqlInt16 test = (SqlInt16)Test900;
-                                Fail ("Test#2");
+                                Assertion.Fail ("Test#2");
                         } catch (Exception e) {
-                                AssertEquals("Test#3", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals("Test#3", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestSqlMoneyToSqlInt16()
+               [Test]
+                public void SqlMoneyToSqlInt16()
                 {
                         SqlMoney TestMoney64 = new SqlMoney(64);
                         SqlMoney TestMoney900 = new SqlMoney(90000);
 
-                        AssertEquals ("Test#1", (short)64, ((SqlInt16)TestMoney64).Value);
+                        Assertion.AssertEquals ("Test#1", (short)64, ((SqlInt16)TestMoney64).Value);
 
                         try {
                                 SqlInt16 test = (SqlInt16)TestMoney900;
-                                Fail ("Test#2");
+                                Assertion.Fail ("Test#2");
                         } catch (Exception e) {
-                                AssertEquals("test#3", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals("test#3", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestSqlSingleToSqlInt16()
+               [Test]
+                public void SqlSingleToSqlInt16()
                 {
                         SqlSingle TestSingle64 = new SqlSingle(64);
                         SqlSingle TestSingle900 = new SqlSingle(90000);
 
-                        AssertEquals("Test#1", (short)64, ((SqlInt16)TestSingle64).Value);
+                        Assertion.AssertEquals("Test#1", (short)64, ((SqlInt16)TestSingle64).Value);
 
                         try {
                                 SqlInt16 test = (SqlInt16)TestSingle900;
-                                Fail ("Test#2");
+                                Assertion.Fail ("Test#2");
                         } catch (Exception e) {
-                                AssertEquals ("Test#3", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("Test#3", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestSqlStringToSqlInt16()
+               [Test]
+                public void SqlStringToSqlInt16()
                 {
                         SqlString TestString = new SqlString("Test string");
                         SqlString TestString100 = new SqlString("100");
                         SqlString TestString1000 = new SqlString("100000");
 
-                        AssertEquals ("Test#1", (short)100, ((SqlInt16)TestString100).Value);
+                        Assertion.AssertEquals ("Test#1", (short)100, ((SqlInt16)TestString100).Value);
 
                         try {
                                 SqlInt16 test = (SqlInt16)TestString1000;
-                                Fail ("Test#2");
+                                Assertion.Fail ("Test#2");
                         } catch(Exception e) {
-                                AssertEquals ("Test#3", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("Test#3", typeof (OverflowException), e.GetType ());
                         }
 
                         try {
                                 SqlInt16 test = (SqlInt16)TestString;
-                                Fail ("Test#3");
+                                Assertion.Fail ("Test#3");
                         } catch(Exception e) {
-                                AssertEquals ("Test#4", typeof (FormatException), e.GetType ());
+                                Assertion.AssertEquals ("Test#4", typeof (FormatException), e.GetType ());
                         }
                 }
 
-                public void TestByteToSqlInt16()
+               [Test]
+                public void ByteToSqlInt16()
                 {
                         short TestShort = 14;
-                        AssertEquals ("Test#1", (short)14, ((SqlInt16)TestShort).Value);
+                        Assertion.AssertEquals ("Test#1", (short)14, ((SqlInt16)TestShort).Value);
                 }
         }
 }
index 4cd335ce17c70219736025a4a78d163884a36575..3e4b97f14034437489ab83e5d8f790ff9dd6d6ab 100644 (file)
@@ -1,8 +1,11 @@
 // SqlInt32Test.cs - NUnit Test Cases for System.Data.SqlTypes.SqlInt32\r
 //\r
-// Tim Coleman (tim@timcoleman.com)\r
+// Authors:\r
+//   Tim Coleman (tim@timcoleman.com)\r
+//   Martin Willemoes Hansen (mwh@sysrq.dk)\r
 //\r
 // (C) Tim Coleman\r
+// (C) 2003 Martin Willemoes Hansen\r
 // \r
 \r
 using NUnit.Framework;\r
@@ -12,29 +15,18 @@ using System.Data.SqlTypes;
 \r
 namespace MonoTests.System.Data.SqlTypes\r
 {\r
-       public class SqlInt32Test : TestCase \r
+       [TestFixture]\r
+       public class SqlInt32Test  \r
        {\r
-               \r
-               public SqlInt32Test() : base ("System.Data.SqlTypes.SqlInt32") {}\r
-               public SqlInt32Test(string name) : base(name) {}\r
-\r
-               protected override void SetUp() {}\r
-\r
-               protected override void TearDown() {}\r
-\r
-               public static ITest Suite {\r
-                       get { \r
-                               return new TestSuite(typeof(SqlInt32)); \r
-                       }\r
-               }\r
-\r
-               public void TestCreate ()  \r
+               [Test]\r
+               public void Create ()  \r
                {\r
                        SqlInt32 foo = new SqlInt32 (5);\r
-                       AssertEquals ("Test explicit cast to int", (int)foo, 5);\r
+                       Assertion.AssertEquals ("Test explicit cast to int", (int)foo, 5);\r
                }\r
 \r
-               public void TestAdd () \r
+               [Test]\r
+               public void Add () \r
                {\r
                        int a = 5;\r
                        int b = 7;\r
@@ -46,12 +38,13 @@ namespace MonoTests.System.Data.SqlTypes
                        x = new SqlInt32 (a);\r
                        y = new SqlInt32 (b);\r
                        z = x + y;\r
-                       AssertEquals ("Addition operator does not work correctly", z.Value, a + b);\r
+                       Assertion.AssertEquals ("Addition operator does not work correctly", z.Value, a + b);\r
                        z = SqlInt32.Add (x, y);\r
-                       AssertEquals ("Addition function does not work correctly", z.Value, a + b);\r
+                       Assertion.AssertEquals ("Addition function does not work correctly", z.Value, a + b);\r
                }\r
 \r
-               public void TestBitwiseAnd () \r
+               [Test]\r
+               public void BitwiseAnd () \r
                {\r
                        int a = 5;\r
                        int b = 7;\r
@@ -59,12 +52,13 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlInt32 x = new SqlInt32 (a);\r
                        SqlInt32 y = new SqlInt32 (b);\r
                        SqlInt32 z = x & y;\r
-                       AssertEquals ("Bitwise And operator does not work correctly", z.Value, a & b);\r
+                       Assertion.AssertEquals ("Bitwise And operator does not work correctly", z.Value, a & b);\r
                        z = SqlInt32.BitwiseAnd (x, y);\r
-                       AssertEquals ("Bitwise And function does not work correctly", z.Value, a & b);\r
+                       Assertion.AssertEquals ("Bitwise And function does not work correctly", z.Value, a & b);\r
                }\r
 \r
-               public void TestBitwiseOr () \r
+               [Test]\r
+               public void BitwiseOr () \r
                {\r
                        int a = 5;\r
                        int b = 7;\r
@@ -72,12 +66,13 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlInt32 x = new SqlInt32 (a);\r
                        SqlInt32 y = new SqlInt32 (b);\r
                        SqlInt32 z = x | y;\r
-                       AssertEquals ("Bitwise Or operator does not work correctly", z.Value, a | b);\r
+                       Assertion.AssertEquals ("Bitwise Or operator does not work correctly", z.Value, a | b);\r
                        z = SqlInt32.BitwiseOr (x, y);\r
-                       AssertEquals ("Bitwise Or function does not work correctly", z.Value, a | b);\r
+                       Assertion.AssertEquals ("Bitwise Or function does not work correctly", z.Value, a | b);\r
                }\r
 \r
-               public void TestDivide () \r
+               [Test]\r
+               public void Divide () \r
                {\r
                        int a = 5;\r
                        int b = 7;\r
@@ -85,12 +80,13 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlInt32 x = new SqlInt32 (a);\r
                        SqlInt32 y = new SqlInt32 (b);\r
                        SqlInt32 z = x / y;\r
-                       AssertEquals ("Division operator does not work correctly", z.Value, a / b);\r
+                       Assertion.AssertEquals ("Division operator does not work correctly", z.Value, a / b);\r
                        z = SqlInt32.Divide (x, y);\r
-                       AssertEquals ("Division function does not work correctly", z.Value, a / b);\r
+                       Assertion.AssertEquals ("Division function does not work correctly", z.Value, a / b);\r
                }\r
                \r
-               public void TestEquals ()\r
+               [Test]\r
+               public void Equals ()\r
                {\r
                        SqlInt32 x;\r
                        SqlInt32 y;\r
@@ -98,28 +94,29 @@ namespace MonoTests.System.Data.SqlTypes
                        // Case 1: either is SqlInt32.Null\r
                        x = SqlInt32.Null;\r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Equality operator didn't return Null when one was Null.", x == y, SqlBoolean.Null);\r
-                       AssertEquals ("Equality function didn't return Null when one was Null.", SqlInt32.Equals (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Equality operator didn't return Null when one was Null.", x == y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Equality function didn't return Null when one was Null.", SqlInt32.Equals (x, y), SqlBoolean.Null);\r
 \r
                        // Case 2: both are SqlInt32.Null\r
                        y = SqlInt32.Null;\r
-                       AssertEquals ("Equality operator didn't return Null when both were Null.", x == y, SqlBoolean.Null);\r
-                       AssertEquals ("Equality function didn't return Null when both were Null.", SqlInt32.Equals (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Equality operator didn't return Null when both were Null.", x == y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Equality function didn't return Null when both were Null.", SqlInt32.Equals (x, y), SqlBoolean.Null);\r
 \r
                        // Case 3: both are equal\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Equality operator didn't return true when they were equal.", x == y, SqlBoolean.True);\r
-                       AssertEquals ("Equality function didn't return true when they were equal.", SqlInt32.Equals (x, y), SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Equality operator didn't return true when they were equal.", x == y, SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Equality function didn't return true when they were equal.", SqlInt32.Equals (x, y), SqlBoolean.True);\r
 \r
                        // Case 4: inequality\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (6);\r
-                       AssertEquals ("Equality operator didn't return false when they were not equal.", x == y, SqlBoolean.False);\r
-                       AssertEquals ("Equality function didn't return false when they were not equal.", SqlInt32.Equals (x, y), SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Equality operator didn't return false when they were not equal.", x == y, SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Equality function didn't return false when they were not equal.", SqlInt32.Equals (x, y), SqlBoolean.False);\r
                }\r
 \r
-               public void TestGreaterThan ()\r
+               [Test]\r
+               public void GreaterThan ()\r
                {\r
                        SqlInt32 x;\r
                        SqlInt32 y;\r
@@ -127,28 +124,29 @@ namespace MonoTests.System.Data.SqlTypes
                        // Case 1: either is SqlInt32.Null\r
                        x = SqlInt32.Null;\r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Greater Than operator didn't return Null when one was Null.", x > y, SqlBoolean.Null);\r
-                       AssertEquals ("Greater Than function didn't return Null when one was Null.", SqlInt32.GreaterThan (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Greater Than operator didn't return Null when one was Null.", x > y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Greater Than function didn't return Null when one was Null.", SqlInt32.GreaterThan (x, y), SqlBoolean.Null);\r
 \r
                        // Case 2: both are SqlInt32.Null\r
                        y = SqlInt32.Null;\r
-                       AssertEquals ("Greater Than operator didn't return Null when both were Null.", x > y, SqlBoolean.Null);\r
-                       AssertEquals ("Greater Than function didn't return Null when both were Null.", SqlInt32.GreaterThan (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Greater Than operator didn't return Null when both were Null.", x > y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Greater Than function didn't return Null when both were Null.", SqlInt32.GreaterThan (x, y), SqlBoolean.Null);\r
 \r
                        // Case 3: x > y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (4);\r
-                       AssertEquals ("Greater than operator didn't return true when x > y.", x > y, SqlBoolean.True);\r
-                       AssertEquals ("Greater than function didn't return true when x > y.", SqlInt32.GreaterThan (x,y), SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Greater than operator didn't return true when x > y.", x > y, SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Greater than function didn't return true when x > y.", SqlInt32.GreaterThan (x,y), SqlBoolean.True);\r
 \r
                        // Case 4: x < y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (6);\r
-                       AssertEquals ("Greater than operator didn't return false when x < y.", x > y, SqlBoolean.False);\r
-                       AssertEquals ("Greater than function didn't return false when x < y.", SqlInt32.GreaterThan (x,y), SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Greater than operator didn't return false when x < y.", x > y, SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Greater than function didn't return false when x < y.", SqlInt32.GreaterThan (x,y), SqlBoolean.False);\r
                }\r
 \r
-               public void TestGreaterThanOrEqual ()\r
+               [Test]\r
+               public void GreaterThanOrEqual ()\r
                {\r
                        SqlInt32 x;\r
                        SqlInt32 y;\r
@@ -156,34 +154,35 @@ namespace MonoTests.System.Data.SqlTypes
                        // Case 1: either is SqlInt32.Null\r
                        x = SqlInt32.Null;\r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Greater Than Or Equal operator didn't return Null when one was Null.", x >= y, SqlBoolean.Null);\r
-                       AssertEquals ("Greater Than Or Equal function didn't return Null when one was Null.", SqlInt32.GreaterThanOrEqual (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Greater Than Or Equal operator didn't return Null when one was Null.", x >= y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Greater Than Or Equal function didn't return Null when one was Null.", SqlInt32.GreaterThanOrEqual (x, y), SqlBoolean.Null);\r
 \r
                        // Case 2: both are SqlInt32.Null\r
                        y = SqlInt32.Null;\r
-                       AssertEquals ("Greater Than Or Equal operator didn't return Null when both were Null.", x >= y, SqlBoolean.Null);\r
-                       AssertEquals ("Greater Than Or Equal function didn't return Null when both were Null.", SqlInt32.GreaterThanOrEqual (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Greater Than Or Equal operator didn't return Null when both were Null.", x >= y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Greater Than Or Equal function didn't return Null when both were Null.", SqlInt32.GreaterThanOrEqual (x, y), SqlBoolean.Null);\r
 \r
                        // Case 3: x > y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (4);\r
-                       AssertEquals ("Greater than or equal operator didn't return true when x > y.", x >= y, SqlBoolean.True);\r
-                       AssertEquals ("Greater than or equal function didn't return true when x > y.", SqlInt32.GreaterThanOrEqual (x,y), SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Greater than or equal operator didn't return true when x > y.", x >= y, SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Greater than or equal function didn't return true when x > y.", SqlInt32.GreaterThanOrEqual (x,y), SqlBoolean.True);\r
 \r
                        // Case 4: x < y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (6);\r
-                       AssertEquals ("Greater than or equal operator didn't return false when x < y.", x >= y, SqlBoolean.False);\r
-                       AssertEquals ("Greater than or equal function didn't return false when x < y.", SqlInt32.GreaterThanOrEqual (x,y), SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Greater than or equal operator didn't return false when x < y.", x >= y, SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Greater than or equal function didn't return false when x < y.", SqlInt32.GreaterThanOrEqual (x,y), SqlBoolean.False);\r
 \r
                        // Case 5: x == y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Greater than or equal operator didn't return true when x == y.", x >= y, SqlBoolean.True);\r
-                       AssertEquals ("Greater than or equal function didn't return true when x == y.", SqlInt32.GreaterThanOrEqual (x,y), SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Greater than or equal operator didn't return true when x == y.", x >= y, SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Greater than or equal function didn't return true when x == y.", SqlInt32.GreaterThanOrEqual (x,y), SqlBoolean.True);\r
                }\r
 \r
-               public void TestLessThan ()\r
+               [Test]\r
+               public void LessThan ()\r
                {\r
                        SqlInt32 x;\r
                        SqlInt32 y;\r
@@ -191,28 +190,29 @@ namespace MonoTests.System.Data.SqlTypes
                        // Case 1: either is SqlInt32.Null\r
                        x = SqlInt32.Null;\r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Less Than operator didn't return Null when one was Null.", x < y, SqlBoolean.Null);\r
-                       AssertEquals ("Less Than function didn't return Null when one was Null.", SqlInt32.LessThan (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Less Than operator didn't return Null when one was Null.", x < y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Less Than function didn't return Null when one was Null.", SqlInt32.LessThan (x, y), SqlBoolean.Null);\r
 \r
                        // Case 2: both are SqlInt32.Null\r
                        y = SqlInt32.Null;\r
-                       AssertEquals ("Less Than operator didn't return Null when both were Null.", x < y, SqlBoolean.Null);\r
-                       AssertEquals ("Less Than function didn't return Null when both were Null.", SqlInt32.LessThan (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Less Than operator didn't return Null when both were Null.", x < y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Less Than function didn't return Null when both were Null.", SqlInt32.LessThan (x, y), SqlBoolean.Null);\r
 \r
                        // Case 3: x > y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (4);\r
-                       AssertEquals ("Less than operator didn't return false when x > y.", x < y, SqlBoolean.False);\r
-                       AssertEquals ("Less than function didn't return false when x > y.", SqlInt32.LessThan (x,y), SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Less than operator didn't return false when x > y.", x < y, SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Less than function didn't return false when x > y.", SqlInt32.LessThan (x,y), SqlBoolean.False);\r
 \r
                        // Case 4: x < y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (6);\r
-                       AssertEquals ("Less than operator didn't return true when x < y.", x < y, SqlBoolean.True);\r
-                       AssertEquals ("Less than function didn't return true when x < y.", SqlInt32.LessThan (x,y), SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Less than operator didn't return true when x < y.", x < y, SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Less than function didn't return true when x < y.", SqlInt32.LessThan (x,y), SqlBoolean.True);\r
                }\r
 \r
-               public void TestLessThanOrEqual ()\r
+               [Test]\r
+               public void LessThanOrEqual ()\r
                {\r
                        SqlInt32 x;\r
                        SqlInt32 y;\r
@@ -220,34 +220,35 @@ namespace MonoTests.System.Data.SqlTypes
                        // Case 1: either is SqlInt32.Null\r
                        x = SqlInt32.Null;\r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Less Than Or Equal operator didn't return Null when one was Null.", x <= y, SqlBoolean.Null);\r
-                       AssertEquals ("Less Than Or Equal function didn't return Null when one was Null.", SqlInt32.LessThanOrEqual (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Less Than Or Equal operator didn't return Null when one was Null.", x <= y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Less Than Or Equal function didn't return Null when one was Null.", SqlInt32.LessThanOrEqual (x, y), SqlBoolean.Null);\r
 \r
                        // Case 2: both are SqlInt32.Null\r
                        y = SqlInt32.Null;\r
-                       AssertEquals ("Less Than Or Equal operator didn't return Null when both were Null.", x <= y, SqlBoolean.Null);\r
-                       AssertEquals ("Less Than Or Equal function didn't return Null when both were Null.", SqlInt32.LessThanOrEqual (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Less Than Or Equal operator didn't return Null when both were Null.", x <= y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Less Than Or Equal function didn't return Null when both were Null.", SqlInt32.LessThanOrEqual (x, y), SqlBoolean.Null);\r
 \r
                        // Case 3: x > y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (4);\r
-                       AssertEquals ("Less than or equal operator didn't return false when x > y.", x <= y, SqlBoolean.False);\r
-                       AssertEquals ("Less than or equal function didn't return false when x > y.", SqlInt32.LessThanOrEqual (x,y), SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Less than or equal operator didn't return false when x > y.", x <= y, SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Less than or equal function didn't return false when x > y.", SqlInt32.LessThanOrEqual (x,y), SqlBoolean.False);\r
 \r
                        // Case 4: x < y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (6);\r
-                       AssertEquals ("Less than or equal operator didn't return true when x < y.", x <= y, SqlBoolean.True);\r
-                       AssertEquals ("Less than or equal function didn't return true when x < y.", SqlInt32.LessThanOrEqual (x,y), SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Less than or equal operator didn't return true when x < y.", x <= y, SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Less than or equal function didn't return true when x < y.", SqlInt32.LessThanOrEqual (x,y), SqlBoolean.True);\r
 \r
                        // Case 5: x == y\r
                        x = new SqlInt32 (5);\r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Less than or equal operator didn't return true when x == y.", x <= y, SqlBoolean.True);\r
-                       AssertEquals ("Less than or equal function didn't return true when x == y.", SqlInt32.LessThanOrEqual (x,y), SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Less than or equal operator didn't return true when x == y.", x <= y, SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Less than or equal function didn't return true when x == y.", SqlInt32.LessThanOrEqual (x,y), SqlBoolean.True);\r
                }\r
 \r
-               public void TestMod () \r
+               [Test]\r
+               public void Mod () \r
                {\r
                        int a = 5;\r
                        int b = 7;\r
@@ -255,12 +256,13 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlInt32 x = new SqlInt32 (a);\r
                        SqlInt32 y = new SqlInt32 (b);\r
                        SqlInt32 z = x % y;\r
-                       AssertEquals ("Modulus operator does not work correctly", z.Value, a % b);\r
+                       Assertion.AssertEquals ("Modulus operator does not work correctly", z.Value, a % b);\r
                        z = SqlInt32.Mod (x, y);\r
-                       AssertEquals ("Modulus function does not work correctly", z.Value, a % b);\r
+                       Assertion.AssertEquals ("Modulus function does not work correctly", z.Value, a % b);\r
                }\r
 \r
-               public void TestMultiply () \r
+               [Test]\r
+               public void Multiply () \r
                {\r
                        int a = 5;\r
                        int b = 7;\r
@@ -268,12 +270,13 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlInt32 x = new SqlInt32 (a);\r
                        SqlInt32 y = new SqlInt32 (b);\r
                        SqlInt32 z = x * y;\r
-                       AssertEquals ("Multiplication operator does not work correctly", z.Value, a * b);\r
+                       Assertion.AssertEquals ("Multiplication operator does not work correctly", z.Value, a * b);\r
                        z = SqlInt32.Multiply (x, y);\r
-                       AssertEquals ("Multiplication function does not work correctly", z.Value, a * b);\r
+                       Assertion.AssertEquals ("Multiplication function does not work correctly", z.Value, a * b);\r
                }\r
 \r
-               public void TestNotEquals () \r
+               [Test]\r
+               public void NotEquals () \r
                {\r
                        SqlInt32 x;\r
                        SqlInt32 y;\r
@@ -281,36 +284,39 @@ namespace MonoTests.System.Data.SqlTypes
                        x = new SqlInt32 (5);\r
                        y = SqlInt32.Null;\r
 \r
-                       AssertEquals ("Not Equals operator does not return null when one or both of the parameters is Null.", x != y, SqlBoolean.Null);\r
-                       AssertEquals ("Not Equals function does not return null when one or both of the parameters is Null.", SqlInt32.NotEquals (x, y), SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Not Equals operator does not return null when one or both of the parameters is Null.", x != y, SqlBoolean.Null);\r
+                       Assertion.AssertEquals ("Not Equals function does not return null when one or both of the parameters is Null.", SqlInt32.NotEquals (x, y), SqlBoolean.Null);\r
 \r
                        y = new SqlInt32 (5);\r
-                       AssertEquals ("Not Equals operator does not return false when x == y.", x != y, SqlBoolean.False);\r
-                       AssertEquals ("Not Equals function does not return false when x == y.", SqlInt32.NotEquals (x, y), SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Not Equals operator does not return false when x == y.", x != y, SqlBoolean.False);\r
+                       Assertion.AssertEquals ("Not Equals function does not return false when x == y.", SqlInt32.NotEquals (x, y), SqlBoolean.False);\r
 \r
                        y = new SqlInt32 (6);\r
-                       AssertEquals ("Not Equals operator does not return true when x != y.", x != y, SqlBoolean.True);\r
-                       AssertEquals ("Not Equals function does not return true when x != y.", SqlInt32.NotEquals (x, y), SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Not Equals operator does not return true when x != y.", x != y, SqlBoolean.True);\r
+                       Assertion.AssertEquals ("Not Equals function does not return true when x != y.", SqlInt32.NotEquals (x, y), SqlBoolean.True);\r
                }\r
        \r
-               public void TestOnesComplement () \r
+               [Test]\r
+               public void OnesComplement () \r
                {\r
                        int a = 5;\r
                        \r
                        SqlInt32 x = new SqlInt32 (a);\r
                        SqlInt32 z = ~x;\r
-                       AssertEquals ("Ones Complement operator does not work correctly", z.Value, ~a);\r
+                       Assertion.AssertEquals ("Ones Complement operator does not work correctly", z.Value, ~a);\r
                        z = SqlInt32.OnesComplement (x);\r
-                       AssertEquals ("Ones Complement function does not work correctly", z.Value, ~a);\r
+                       Assertion.AssertEquals ("Ones Complement function does not work correctly", z.Value, ~a);\r
                }\r
                \r
-               public void TestIsNullProperty ()\r
+               [Test]\r
+               public void IsNullProperty ()\r
                {\r
                        SqlInt32 n = SqlInt32.Null;\r
-                       Assert ("Null is not defined correctly", n.IsNull);\r
+                       Assertion.Assert ("Null is not defined correctly", n.IsNull);\r
                }\r
        \r
-               public void TestSubtract () \r
+               [Test]\r
+               public void Subtract () \r
                {\r
                        int a = 7;\r
                        int b = 5;\r
@@ -318,85 +324,87 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlInt32 x = new SqlInt32 (a);\r
                        SqlInt32 y = new SqlInt32 (b);\r
                        SqlInt32 z = x - y;\r
-                       AssertEquals ("Subtraction operator does not work correctly", z.Value, a - b);\r
+                       Assertion.AssertEquals ("Subtraction operator does not work correctly", z.Value, a - b);\r
                        z = SqlInt32.Subtract (x, y);\r
-                       AssertEquals ("Subtraction function does not work correctly", z.Value, a - b);\r
+                       Assertion.AssertEquals ("Subtraction function does not work correctly", z.Value, a - b);\r
                }\r
 \r
-               public void TestConversionMethods ()\r
+               [Test]\r
+               public void ConversionMethods ()\r
                {\r
                        SqlInt32 x;\r
 \r
                        // Case 1: SqlInt32.Null -> SqlBoolean == SqlBoolean.Null\r
                        x = SqlInt32.Null;\r
-                       AssertEquals ("SqlInt32.Null -> SqlBoolean does not yield SqlBoolean.Null.", x.ToSqlBoolean (), SqlBoolean.Null );\r
+                       Assertion.AssertEquals ("SqlInt32.Null -> SqlBoolean does not yield SqlBoolean.Null.", x.ToSqlBoolean (), SqlBoolean.Null );\r
 \r
                        // Case 2: SqlInt32.Zero -> SqlBoolean == False\r
                        x = SqlInt32.Zero;\r
-                       AssertEquals ("SqlInt32.Zero -> SqlBoolean does not yield SqlBoolean.False.", x.ToSqlBoolean (), SqlBoolean.False );\r
+                       Assertion.AssertEquals ("SqlInt32.Zero -> SqlBoolean does not yield SqlBoolean.False.", x.ToSqlBoolean (), SqlBoolean.False );\r
                \r
                        // Case 3: SqlInt32(nonzero) -> SqlBoolean == True\r
                        x = new SqlInt32 (27);\r
-                       AssertEquals ("SqlInt32 (27) -> SqlBoolean does not yield SqlBoolean.True.", x.ToSqlBoolean (), SqlBoolean.True );\r
+                       Assertion.AssertEquals ("SqlInt32 (27) -> SqlBoolean does not yield SqlBoolean.True.", x.ToSqlBoolean (), SqlBoolean.True );\r
                \r
                        // Case 4: SqlInt32.Null -> SqlByte == SqlByte.Null\r
                        x = SqlInt32.Null;\r
-                       AssertEquals ("SqlInt32.Null -> SqlByte does not yield SqlByte.Null.", x.ToSqlByte (), SqlByte.Null );\r
+                       Assertion.AssertEquals ("SqlInt32.Null -> SqlByte does not yield SqlByte.Null.", x.ToSqlByte (), SqlByte.Null );\r
 \r
                        // Case 5: Test non-null conversion to SqlByte\r
                        x = new SqlInt32 (27);\r
-                       AssertEquals ("SqlInt32 (27) -> SqlByte does not yield a value of 27", x.ToSqlByte ().Value, (byte)27);\r
+                       Assertion.AssertEquals ("SqlInt32 (27) -> SqlByte does not yield a value of 27", x.ToSqlByte ().Value, (byte)27);\r
 \r
                        // Case 6: SqlInt32.Null -> SqlDecimal == SqlDecimal.Null\r
                        x = SqlInt32.Null;\r
-                       AssertEquals ("SqlInt32.Null -> SqlDecimal does not yield SqlDecimal.Null.", x.ToSqlDecimal (), SqlDecimal.Null );\r
+                       Assertion.AssertEquals ("SqlInt32.Null -> SqlDecimal does not yield SqlDecimal.Null.", x.ToSqlDecimal (), SqlDecimal.Null );\r
 \r
                        // Case 7: Test non-null conversion to SqlDecimal\r
                        x = new SqlInt32 (27);\r
-                       AssertEquals ("SqlInt32 (27) -> SqlDecimal does not yield a value of 27", x.ToSqlDecimal ().Value, (decimal)27);\r
+                       Assertion.AssertEquals ("SqlInt32 (27) -> SqlDecimal does not yield a value of 27", x.ToSqlDecimal ().Value, (decimal)27);\r
 \r
                        // Case 8: SqlInt32.Null -> SqlDouble == SqlDouble.Null\r
                        x = SqlInt32.Null;\r
-                       AssertEquals ("SqlInt32.Null -> SqlDouble does not yield SqlDouble.Null.", x.ToSqlDouble (), SqlDouble.Null );\r
+                       Assertion.AssertEquals ("SqlInt32.Null -> SqlDouble does not yield SqlDouble.Null.", x.ToSqlDouble (), SqlDouble.Null );\r
 \r
                        // Case 9: Test non-null conversion to SqlDouble\r
                        x = new SqlInt32 (27);\r
-                       AssertEquals ("SqlInt32 (27) -> SqlDouble does not yield a value of 27", x.ToSqlDouble ().Value, (double)27);\r
+                       Assertion.AssertEquals ("SqlInt32 (27) -> SqlDouble does not yield a value of 27", x.ToSqlDouble ().Value, (double)27);\r
 \r
                        // Case 10: SqlInt32.Null -> SqlInt16 == SqlInt16.Null\r
                        x = SqlInt32.Null;\r
-                       AssertEquals ("SqlInt32.Null -> SqlInt16 does not yield SqlInt16.Null.", x.ToSqlInt16 (), SqlInt16.Null );\r
+                       Assertion.AssertEquals ("SqlInt32.Null -> SqlInt16 does not yield SqlInt16.Null.", x.ToSqlInt16 (), SqlInt16.Null );\r
 \r
                        // Case 11: Test non-null conversion to SqlInt16\r
                        x = new SqlInt32 (27);\r
-                       AssertEquals ("SqlInt32 (27) -> SqlInt16 does not yield a value of 27", x.ToSqlInt16 ().Value, (short)27);\r
+                       Assertion.AssertEquals ("SqlInt32 (27) -> SqlInt16 does not yield a value of 27", x.ToSqlInt16 ().Value, (short)27);\r
 \r
                        // Case 12: SqlInt32.Null -> SqlInt64 == SqlInt64.Null\r
                        x = SqlInt32.Null;\r
-                       AssertEquals ("SqlInt32.Null -> SqlInt64 does not yield SqlInt64.Null.", x.ToSqlInt64 (), SqlInt64.Null );\r
+                       Assertion.AssertEquals ("SqlInt32.Null -> SqlInt64 does not yield SqlInt64.Null.", x.ToSqlInt64 (), SqlInt64.Null );\r
 \r
                        // Case 13: Test non-null conversion to SqlInt64\r
                        x = new SqlInt32 (27);\r
-                       AssertEquals ("SqlInt32 (27) -> SqlInt64 does not yield a value of 27", x.ToSqlInt64 ().Value, (long)27);\r
+                       Assertion.AssertEquals ("SqlInt32 (27) -> SqlInt64 does not yield a value of 27", x.ToSqlInt64 ().Value, (long)27);\r
 \r
                        // Case 14: SqlInt32.Null -> SqlMoney == SqlMoney.Null\r
                        x = SqlInt32.Null;\r
-                       AssertEquals ("SqlInt32.Null -> SqlMoney does not yield SqlMoney.Null.", x.ToSqlMoney (), SqlMoney.Null );\r
+                       Assertion.AssertEquals ("SqlInt32.Null -> SqlMoney does not yield SqlMoney.Null.", x.ToSqlMoney (), SqlMoney.Null );\r
 \r
                        // Case 15: Test non-null conversion to SqlMoney\r
                        x = new SqlInt32 (27);\r
-                       AssertEquals ("SqlInt32 (27) -> SqlMoney does not yield a value of 27", x.ToSqlMoney ().Value, (decimal)27);\r
+                       Assertion.AssertEquals ("SqlInt32 (27) -> SqlMoney does not yield a value of 27", x.ToSqlMoney ().Value, (decimal)27);\r
 \r
                        // Case 16: SqlInt32.Null -> SqlSingle == SqlSingle.Null\r
                        x = SqlInt32.Null;\r
-                       AssertEquals ("SqlInt32.Null -> SqlSingle does not yield SqlSingle.Null.", x.ToSqlSingle (), SqlSingle.Null );\r
+                       Assertion.AssertEquals ("SqlInt32.Null -> SqlSingle does not yield SqlSingle.Null.", x.ToSqlSingle (), SqlSingle.Null );\r
 \r
                        // Case 17: Test non-null conversion to SqlSingle\r
                        x = new SqlInt32 (27);\r
-                       AssertEquals ("SqlInt32 (27) -> SqlSingle does not yield a value of 27", x.ToSqlSingle ().Value, (float)27);\r
+                       Assertion.AssertEquals ("SqlInt32 (27) -> SqlSingle does not yield a value of 27", x.ToSqlSingle ().Value, (float)27);\r
                }\r
        \r
-               public void TestXor () \r
+               [Test]\r
+               public void Xor () \r
                {\r
                        int a = 5;\r
                        int b = 7;\r
@@ -404,9 +412,9 @@ namespace MonoTests.System.Data.SqlTypes
                        SqlInt32 x = new SqlInt32 (a);\r
                        SqlInt32 y = new SqlInt32 (b);\r
                        SqlInt32 z = x ^ y;\r
-                       AssertEquals ("Xor operator does not work correctly", z.Value, a ^ b);\r
+                       Assertion.AssertEquals ("Xor operator does not work correctly", z.Value, a ^ b);\r
                        z = SqlInt32.Xor (x, y);\r
-                       AssertEquals ("Xor function does not work correctly", z.Value, a ^ b);\r
+                       Assertion.AssertEquals ("Xor function does not work correctly", z.Value, a ^ b);\r
                }\r
                        \r
        }\r
index 9f7a28b0fb1fc46ed211b85f0e99d54c3c74ac60..1dcb12cb2154c0b04d1abbe01da783e91a703a27 100644 (file)
@@ -1,10 +1,12 @@
 //
 // SqlInt64Test.cs - NUnit Test Cases for System.Data.SqlTypes.SqlInt64
 //
-// Ville Palo (vi64pa@koti.soon.fi)
+// Authors:
+//   Ville Palo (vi64pa@koti.soon.fi)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
-// (C) Ville Palo 2002
-// 
+// (C) 2002 Ville Palo
+// (C) 2003 Martin Willemoes Hansen
 
 using NUnit.Framework;
 using System;
@@ -12,54 +14,46 @@ using System.Data.SqlTypes;
 
 namespace MonoTests.System.Data.SqlTypes
 {
-        public class SqlInt64Test : TestCase {
-
-                public SqlInt64Test() : base ("System.Data.SqlTypes.SqlInt64") {}
-                public SqlInt64Test(string name) : base(name) {}
-
-                protected override void TearDown() {}
-
-                protected override void SetUp() {}
-
-                public static ITest Suite {
-                        get {
-                                return new TestSuite(typeof(SqlInt64));
-                        }
-                }
+       [TestFixture]
+        public class SqlInt64Test {
 
                 // Test constructor
-                public void TestCreate()
+               [Test]
+                public void Create()
                 {
                         SqlInt64 TestLong = new SqlInt64 (29);
-                        AssertEquals ("#A01", (long)29, TestLong.Value);
+                        Assertion.AssertEquals ("#A01", (long)29, TestLong.Value);
 
                         TestLong = new SqlInt64 (-9000);
-                        AssertEquals ("#A02", (long)-9000, TestLong.Value);
+                        Assertion.AssertEquals ("#A02", (long)-9000, TestLong.Value);
                  }
 
                 // Test public fields
-                public void TestPublicFields()
+               [Test]
+                public void PublicFields()
                 {
-                        AssertEquals ("#B01", (long)9223372036854775807, SqlInt64.MaxValue.Value);
-                        AssertEquals ("#B02", (long)(-9223372036854775808), SqlInt64.MinValue.Value);
-                        Assert ("#B03", SqlInt64.Null.IsNull);
-                        AssertEquals ("#B04", (long)0, SqlInt64.Zero.Value);
+                        Assertion.AssertEquals ("#B01", (long)9223372036854775807, SqlInt64.MaxValue.Value);
+                        Assertion.AssertEquals ("#B02", (long)(-9223372036854775808), SqlInt64.MinValue.Value);
+                        Assertion.Assert ("#B03", SqlInt64.Null.IsNull);
+                        Assertion.AssertEquals ("#B04", (long)0, SqlInt64.Zero.Value);
                 }
 
                 // Test properties
-                public void TestProperties()
+               [Test]
+                public void Properties()
                 {
                         SqlInt64 Test5443 = new SqlInt64 (5443);
                         SqlInt64 Test1 = new SqlInt64 (1);
 
-                        Assert ("#C01", SqlInt64.Null.IsNull);
-                        AssertEquals ("#C02", (long)5443, Test5443.Value);
-                        AssertEquals ("#C03", (long)1, Test1.Value);
+                        Assertion.Assert ("#C01", SqlInt64.Null.IsNull);
+                        Assertion.AssertEquals ("#C02", (long)5443, Test5443.Value);
+                        Assertion.AssertEquals ("#C03", (long)1, Test1.Value);
                 }
 
                 // PUBLIC METHODS
 
-                public void TestArithmeticMethods()
+               [Test]
+                public void ArithmeticMethods()
                 {
                         SqlInt64 Test64 = new SqlInt64 (64);
                         SqlInt64 Test0 = new SqlInt64 (0);
@@ -67,56 +61,57 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt64 TestMax = new SqlInt64 (SqlInt64.MaxValue.Value);
 
                         // Add()
-                        AssertEquals ("#D01", (long)64, SqlInt64.Add (Test64, Test0).Value);
-                        AssertEquals ("#D02", (long)228, SqlInt64.Add (Test64, Test164).Value);
-                        AssertEquals ("#D03", (long)164, SqlInt64.Add (Test0, Test164).Value);
-                        AssertEquals ("#D04", (long)SqlInt64.MaxValue, SqlInt64.Add (TestMax, Test0).Value);
+                        Assertion.AssertEquals ("#D01", (long)64, SqlInt64.Add (Test64, Test0).Value);
+                        Assertion.AssertEquals ("#D02", (long)228, SqlInt64.Add (Test64, Test164).Value);
+                        Assertion.AssertEquals ("#D03", (long)164, SqlInt64.Add (Test0, Test164).Value);
+                        Assertion.AssertEquals ("#D04", (long)SqlInt64.MaxValue, SqlInt64.Add (TestMax, Test0).Value);
 
                         try {
                                 SqlInt64.Add (TestMax, Test64);
-                                Fail ("#D05");
+                                Assertion.Fail ("#D05");
                         } catch (Exception e) {
-                                AssertEquals ("#D06", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D06", typeof (OverflowException), e.GetType ());
                         }
 
                         // Divide()
-                        AssertEquals ("#D07", (long)2, SqlInt64.Divide (Test164, Test64).Value);
-                        AssertEquals ("#D08", (long)0, SqlInt64.Divide (Test64, Test164).Value);
+                        Assertion.AssertEquals ("#D07", (long)2, SqlInt64.Divide (Test164, Test64).Value);
+                        Assertion.AssertEquals ("#D08", (long)0, SqlInt64.Divide (Test64, Test164).Value);
 
                         try {
                                 SqlInt64.Divide(Test64, Test0);
-                                Fail ("#D09");
+                                Assertion.Fail ("#D09");
                         } catch(Exception e) {
-                                AssertEquals ("#D10", typeof (DivideByZeroException), e.GetType ());
+                                Assertion.AssertEquals ("#D10", typeof (DivideByZeroException), e.GetType ());
                         }
 
                         // Mod()
-                        AssertEquals ("#D11", (SqlInt64)36, SqlInt64.Mod (Test164, Test64));
-                        AssertEquals ("#D12",  (SqlInt64)64, SqlInt64.Mod (Test64, Test164));
+                        Assertion.AssertEquals ("#D11", (SqlInt64)36, SqlInt64.Mod (Test164, Test64));
+                        Assertion.AssertEquals ("#D12",  (SqlInt64)64, SqlInt64.Mod (Test64, Test164));
 
                         // Multiply()
-                        AssertEquals ("#D13", (long)10496, SqlInt64.Multiply (Test64, Test164).Value);
-                        AssertEquals ("#D14", (long)0, SqlInt64.Multiply (Test64, Test0).Value);
+                        Assertion.AssertEquals ("#D13", (long)10496, SqlInt64.Multiply (Test64, Test164).Value);
+                        Assertion.AssertEquals ("#D14", (long)0, SqlInt64.Multiply (Test64, Test0).Value);
 
                         try {
                                 SqlInt64.Multiply (TestMax, Test64);
-                                Fail ("#D15");
+                                Assertion.Fail ("#D15");
                         } catch(Exception e) {
-                                AssertEquals ("#D16", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D16", typeof (OverflowException), e.GetType ());
                         }
 
                         // Subtract()
-                        AssertEquals ("#D17", (long)100, SqlInt64.Subtract (Test164, Test64).Value);
+                        Assertion.AssertEquals ("#D17", (long)100, SqlInt64.Subtract (Test164, Test64).Value);
 
                         try {
                                 SqlInt64.Subtract (SqlInt64.MinValue, Test164);
-                                Fail ("#D18");
+                                Assertion.Fail ("#D18");
                         } catch(Exception e) {
-                                AssertEquals ("#D19", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D19", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestBitwiseMethods()
+               [Test]
+                public void BitwiseMethods()
                 {
                         long MaxValue = SqlInt64.MaxValue.Value;
                         SqlInt64 TestInt = new SqlInt64 (0);
@@ -125,16 +120,17 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt64 TestInt3 = new SqlInt64 (21845);
 
                         // BitwiseAnd
-                        AssertEquals ("#E01", (long)21845, SqlInt64.BitwiseAnd (TestInt3, TestIntMax).Value);
-                        AssertEquals ("#E02", (long)0, SqlInt64.BitwiseAnd (TestInt2, TestInt3).Value);
-                        AssertEquals ("#E03", (long)10922, SqlInt64.BitwiseAnd (TestInt2, TestIntMax).Value);
+                        Assertion.AssertEquals ("#E01", (long)21845, SqlInt64.BitwiseAnd (TestInt3, TestIntMax).Value);
+                        Assertion.AssertEquals ("#E02", (long)0, SqlInt64.BitwiseAnd (TestInt2, TestInt3).Value);
+                        Assertion.AssertEquals ("#E03", (long)10922, SqlInt64.BitwiseAnd (TestInt2, TestIntMax).Value);
 
                         //BitwiseOr
-                        AssertEquals ("#E04", (long)21845, SqlInt64.BitwiseOr (TestInt, TestInt3).Value);
-                        AssertEquals ("#E05", (long)MaxValue, SqlInt64.BitwiseOr (TestIntMax, TestInt2).Value);
+                        Assertion.AssertEquals ("#E04", (long)21845, SqlInt64.BitwiseOr (TestInt, TestInt3).Value);
+                        Assertion.AssertEquals ("#E05", (long)MaxValue, SqlInt64.BitwiseOr (TestIntMax, TestInt2).Value);
                 }
 
-                public void TestCompareTo()
+               [Test]
+                public void CompareTo()
                 {
                         SqlInt64 TestInt4000 = new SqlInt64 (4000);
                         SqlInt64 TestInt4000II = new SqlInt64 (4000);
@@ -142,143 +138,153 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt64 TestInt10000 = new SqlInt64 (10000);
                         SqlString TestString = new SqlString ("This is a test");
 
-                        Assert ("#F01", TestInt4000.CompareTo (TestInt10) > 0);
-                        Assert ("#F02", TestInt10.CompareTo (TestInt4000) < 0);
-                        Assert ("#F03", TestInt4000II.CompareTo (TestInt4000) == 0);
-                        Assert ("#F04", TestInt4000II.CompareTo (SqlInt64.Null) > 0);
+                        Assertion.Assert ("#F01", TestInt4000.CompareTo (TestInt10) > 0);
+                        Assertion.Assert ("#F02", TestInt10.CompareTo (TestInt4000) < 0);
+                        Assertion.Assert ("#F03", TestInt4000II.CompareTo (TestInt4000) == 0);
+                        Assertion.Assert ("#F04", TestInt4000II.CompareTo (SqlInt64.Null) > 0);
 
                         try {
                                 TestInt10.CompareTo (TestString);
-                                Fail("#F05");
+                                Assertion.Fail("#F05");
                         } catch(Exception e) {
-                                AssertEquals ("#F06", typeof (ArgumentException), e.GetType ());
+                                Assertion.AssertEquals ("#F06", typeof (ArgumentException), e.GetType ());
                         }
                 }
 
-                public void TestEqualsMethod()
+               [Test]
+                public void EqualsMethod()
                 {
                         SqlInt64 Test0 = new SqlInt64 (0);
                         SqlInt64 Test158 = new SqlInt64 (158);
                         SqlInt64 Test180 = new SqlInt64 (180);
                         SqlInt64 Test180II = new SqlInt64 (180);
 
-                        Assert ("#G01", !Test0.Equals (Test158));
-                        Assert ("#G01", !Test158.Equals (Test180));
-                        Assert ("#G03", !Test180.Equals (new SqlString ("TEST")));
-                        Assert ("#G04", Test180.Equals (Test180II));
+                        Assertion.Assert ("#G01", !Test0.Equals (Test158));
+                        Assertion.Assert ("#G01", !Test158.Equals (Test180));
+                        Assertion.Assert ("#G03", !Test180.Equals (new SqlString ("TEST")));
+                        Assertion.Assert ("#G04", Test180.Equals (Test180II));
                 }
 
-                public void TestStaticEqualsMethod()
+               [Test]
+                public void StaticEqualsMethod()
                 {
                         SqlInt64 Test34 = new SqlInt64 (34);
                         SqlInt64 Test34II = new SqlInt64 (34);
                         SqlInt64 Test15 = new SqlInt64 (15);
 
-                        Assert ("#H01", SqlInt64.Equals (Test34, Test34II).Value);
-                        Assert ("#H02", !SqlInt64.Equals (Test34, Test15).Value);
-                        Assert ("#H03", !SqlInt64.Equals (Test15, Test34II).Value);
+                        Assertion.Assert ("#H01", SqlInt64.Equals (Test34, Test34II).Value);
+                        Assertion.Assert ("#H02", !SqlInt64.Equals (Test34, Test15).Value);
+                        Assertion.Assert ("#H03", !SqlInt64.Equals (Test15, Test34II).Value);
                 }
 
-                public void TestGetHashCode()
+               [Test]
+                public void GetHashCodeTest()
                 {
                         SqlInt64 Test15 = new SqlInt64 (15);
 
                         // FIXME: Better way to test HashCode
-                        AssertEquals ("#I01", (int)15, Test15.GetHashCode ());
+                        Assertion.AssertEquals ("#I01", (int)15, Test15.GetHashCode ());
                 }
 
-                public void TestGetType()
+               [Test]
+                public void GetTypeTest()
                 {
                         SqlInt64 Test = new SqlInt64 (84);
-                        AssertEquals ("#J01", "System.Data.SqlTypes.SqlInt64", Test.GetType ().ToString ());
+                        Assertion.AssertEquals ("#J01", "System.Data.SqlTypes.SqlInt64", Test.GetType ().ToString ());
                 }
 
-                public void TestGreaters()
+               [Test]
+                public void Greaters()
                 {
                         SqlInt64 Test10 = new SqlInt64 (10);
                         SqlInt64 Test10II = new SqlInt64 (10);
                         SqlInt64 Test110 = new SqlInt64 (110);
 
                         // GreateThan ()
-                        Assert ("#K01", !SqlInt64.GreaterThan (Test10, Test110).Value);
-                        Assert ("#K02", SqlInt64.GreaterThan (Test110, Test10).Value);
-                        Assert ("#K03", !SqlInt64.GreaterThan (Test10II, Test10).Value);
+                        Assertion.Assert ("#K01", !SqlInt64.GreaterThan (Test10, Test110).Value);
+                        Assertion.Assert ("#K02", SqlInt64.GreaterThan (Test110, Test10).Value);
+                        Assertion.Assert ("#K03", !SqlInt64.GreaterThan (Test10II, Test10).Value);
 
                         // GreaterTharOrEqual ()
-                        Assert ("#K04", !SqlInt64.GreaterThanOrEqual (Test10, Test110).Value);
-                        Assert ("#K05", SqlInt64.GreaterThanOrEqual (Test110, Test10).Value);
-                        Assert ("#K06", SqlInt64.GreaterThanOrEqual (Test10II, Test10).Value);
+                        Assertion.Assert ("#K04", !SqlInt64.GreaterThanOrEqual (Test10, Test110).Value);
+                        Assertion.Assert ("#K05", SqlInt64.GreaterThanOrEqual (Test110, Test10).Value);
+                        Assertion.Assert ("#K06", SqlInt64.GreaterThanOrEqual (Test10II, Test10).Value);
                 }
 
-                public void TestLessers()
+               [Test]
+                public void Lessers()
                 {
                         SqlInt64 Test10 = new SqlInt64 (10);
                         SqlInt64 Test10II = new SqlInt64 (10);
                         SqlInt64 Test110 = new SqlInt64 (110);
 
                         // LessThan()
-                        Assert ("#L01", SqlInt64.LessThan (Test10, Test110).Value);
-                        Assert ("#L02", !SqlInt64.LessThan (Test110, Test10).Value);
-                        Assert ("#L03", !SqlInt64.LessThan (Test10II, Test10).Value);
+                        Assertion.Assert ("#L01", SqlInt64.LessThan (Test10, Test110).Value);
+                        Assertion.Assert ("#L02", !SqlInt64.LessThan (Test110, Test10).Value);
+                        Assertion.Assert ("#L03", !SqlInt64.LessThan (Test10II, Test10).Value);
 
                         // LessThanOrEqual ()
-                        Assert ("#L04", SqlInt64.LessThanOrEqual (Test10, Test110).Value);
-                        Assert ("#L05", !SqlInt64.LessThanOrEqual (Test110, Test10).Value);
-                        Assert ("#L06", SqlInt64.LessThanOrEqual (Test10II, Test10).Value);
-                        Assert ("#L07", SqlInt64.LessThanOrEqual (Test10II, SqlInt64.Null).IsNull);
+                        Assertion.Assert ("#L04", SqlInt64.LessThanOrEqual (Test10, Test110).Value);
+                        Assertion.Assert ("#L05", !SqlInt64.LessThanOrEqual (Test110, Test10).Value);
+                        Assertion.Assert ("#L06", SqlInt64.LessThanOrEqual (Test10II, Test10).Value);
+                        Assertion.Assert ("#L07", SqlInt64.LessThanOrEqual (Test10II, SqlInt64.Null).IsNull);
                 }
 
-                public void TestNotEquals()
+               [Test]
+                public void NotEquals()
                 {
                         SqlInt64 Test12 = new SqlInt64 (12);
                         SqlInt64 Test128 = new SqlInt64 (128);
                         SqlInt64 Test128II = new SqlInt64 (128);
 
-                        Assert ("#M01", SqlInt64.NotEquals (Test12, Test128).Value);
-                        Assert ("#M02", SqlInt64.NotEquals (Test128, Test12).Value);
-                        Assert ("#M03", SqlInt64.NotEquals (Test128II, Test12).Value);
-                        Assert ("#M04", !SqlInt64.NotEquals (Test128II, Test128).Value);
-                        Assert ("#M05", !SqlInt64.NotEquals (Test128, Test128II).Value);
-                        Assert ("#M06", SqlInt64.NotEquals (SqlInt64.Null, Test128II).IsNull);
-                        Assert ("#M07", SqlInt64.NotEquals (SqlInt64.Null, Test128II).IsNull);
+                        Assertion.Assert ("#M01", SqlInt64.NotEquals (Test12, Test128).Value);
+                        Assertion.Assert ("#M02", SqlInt64.NotEquals (Test128, Test12).Value);
+                        Assertion.Assert ("#M03", SqlInt64.NotEquals (Test128II, Test12).Value);
+                        Assertion.Assert ("#M04", !SqlInt64.NotEquals (Test128II, Test128).Value);
+                        Assertion.Assert ("#M05", !SqlInt64.NotEquals (Test128, Test128II).Value);
+                        Assertion.Assert ("#M06", SqlInt64.NotEquals (SqlInt64.Null, Test128II).IsNull);
+                        Assertion.Assert ("#M07", SqlInt64.NotEquals (SqlInt64.Null, Test128II).IsNull);
                 }
 
-                public void TestOnesComplement()
+               [Test]
+                public void OnesComplement()
                 {
                         SqlInt64 Test12 = new SqlInt64(12);
                         SqlInt64 Test128 = new SqlInt64(128);
 
-                        AssertEquals ("#N01", (SqlInt64)(-13), SqlInt64.OnesComplement (Test12));
-                        AssertEquals ("#N02", (SqlInt64)(-129), SqlInt64.OnesComplement (Test128));
+                        Assertion.AssertEquals ("#N01", (SqlInt64)(-13), SqlInt64.OnesComplement (Test12));
+                        Assertion.AssertEquals ("#N02", (SqlInt64)(-129), SqlInt64.OnesComplement (Test128));
                 }
 
-                public void TestParse()
+               [Test]
+                public void Parse()
                 {
                         try {
                                 SqlInt64.Parse (null);
-                                Fail ("#O01");
+                                Assertion.Fail ("#O01");
                         } catch (Exception e) {
-                                AssertEquals ("#O02", typeof (ArgumentNullException), e.GetType ());
+                                Assertion.AssertEquals ("#O02", typeof (ArgumentNullException), e.GetType ());
                         }
 
                         try {
                                 SqlInt64.Parse ("not-a-number");
-                                Fail ("#O03");
+                                Assertion.Fail ("#O03");
                         } catch (Exception e) {
-                                AssertEquals ("#O04", typeof (FormatException), e.GetType ());
+                                Assertion.AssertEquals ("#O04", typeof (FormatException), e.GetType ());
                         }
 
                         try {
                                 SqlInt64.Parse ("1000000000000000000000000000");
-                                Fail ("#O05");
+                                Assertion.Fail ("#O05");
                         } catch (Exception e) {
-                                AssertEquals ("#O06", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#O06", typeof (OverflowException), e.GetType ());
                         }
 
-                        AssertEquals("#O07", (long)150, SqlInt64.Parse ("150").Value);
+                        Assertion.AssertEquals("#O07", (long)150, SqlInt64.Parse ("150").Value);
                 }
 
-                public void TestConversions()
+               [Test]
+                public void Conversions()
                 {
                         SqlInt64 Test12 = new SqlInt64 (12);
                         SqlInt64 Test0 = new SqlInt64 (0);
@@ -287,63 +293,64 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt64 Test288 = new SqlInt64(288);
 
                         // ToSqlBoolean ()
-                        Assert ("#P01", Test12.ToSqlBoolean ().Value);
-                        Assert ("#P02", !Test0.ToSqlBoolean ().Value);
-                        Assert ("#P03", TestNull.ToSqlBoolean ().IsNull);
+                        Assertion.Assert ("#P01", Test12.ToSqlBoolean ().Value);
+                        Assertion.Assert ("#P02", !Test0.ToSqlBoolean ().Value);
+                        Assertion.Assert ("#P03", TestNull.ToSqlBoolean ().IsNull);
 
                         // ToSqlByte ()
-                        AssertEquals ("#P04", (byte)12, Test12.ToSqlByte ().Value);
-                        AssertEquals ("#P05", (byte)0, Test0.ToSqlByte ().Value);
+                        Assertion.AssertEquals ("#P04", (byte)12, Test12.ToSqlByte ().Value);
+                        Assertion.AssertEquals ("#P05", (byte)0, Test0.ToSqlByte ().Value);
 
                         try {
                                 SqlByte b = (byte)Test1000.ToSqlByte ();
-                                Fail ("#P06");
+                                Assertion.Fail ("#P06");
                         } catch (Exception e) {
-                                AssertEquals ("#P07", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#P07", typeof (OverflowException), e.GetType ());
                         }
 
                         // ToSqlDecimal ()
-                        AssertEquals ("#P08", (decimal)12, Test12.ToSqlDecimal ().Value);
-                        AssertEquals ("#P09", (decimal)0, Test0.ToSqlDecimal ().Value);
-                        AssertEquals ("#P10", (decimal)288, Test288.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("#P08", (decimal)12, Test12.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("#P09", (decimal)0, Test0.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("#P10", (decimal)288, Test288.ToSqlDecimal ().Value);
 
                         // ToSqlDouble ()
-                        AssertEquals ("#P11", (double)12, Test12.ToSqlDouble ().Value);
-                        AssertEquals ("#P12", (double)0, Test0.ToSqlDouble ().Value);
-                        AssertEquals ("#P13", (double)1000, Test1000.ToSqlDouble ().Value);
+                        Assertion.AssertEquals ("#P11", (double)12, Test12.ToSqlDouble ().Value);
+                        Assertion.AssertEquals ("#P12", (double)0, Test0.ToSqlDouble ().Value);
+                        Assertion.AssertEquals ("#P13", (double)1000, Test1000.ToSqlDouble ().Value);
 
                         // ToSqlInt32 ()
-                        AssertEquals ("#P14", (int)12, Test12.ToSqlInt32 ().Value);
-                        AssertEquals ("#P15", (int)0, Test0.ToSqlInt32 ().Value);
-                        AssertEquals ("#P16", (int)288, Test288.ToSqlInt32().Value);
+                        Assertion.AssertEquals ("#P14", (int)12, Test12.ToSqlInt32 ().Value);
+                        Assertion.AssertEquals ("#P15", (int)0, Test0.ToSqlInt32 ().Value);
+                        Assertion.AssertEquals ("#P16", (int)288, Test288.ToSqlInt32().Value);
 
                         // ToSqlInt16 ()
-                        AssertEquals ("#P17", (short)12, Test12.ToSqlInt16 ().Value);
-                        AssertEquals ("#P18", (short)0, Test0.ToSqlInt16 ().Value);
-                        AssertEquals ("#P19", (short)288, Test288.ToSqlInt16 ().Value);
+                        Assertion.AssertEquals ("#P17", (short)12, Test12.ToSqlInt16 ().Value);
+                        Assertion.AssertEquals ("#P18", (short)0, Test0.ToSqlInt16 ().Value);
+                        Assertion.AssertEquals ("#P19", (short)288, Test288.ToSqlInt16 ().Value);
 
                         // ToSqlMoney ()
-                        AssertEquals ("#P20", (decimal)12, Test12.ToSqlMoney ().Value);
-                        AssertEquals ("#P21", (decimal)0, Test0.ToSqlMoney ().Value);
-                        AssertEquals ("#P22", (decimal)288, Test288.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("#P20", (decimal)12, Test12.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("#P21", (decimal)0, Test0.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("#P22", (decimal)288, Test288.ToSqlMoney ().Value);
 
                         // ToSqlSingle ()
-                        AssertEquals ("#P23", (float)12, Test12.ToSqlSingle ().Value);
-                        AssertEquals ("#P24", (float)0, Test0.ToSqlSingle ().Value);
-                        AssertEquals ("#P25", (float)288, Test288.ToSqlSingle().Value);
+                        Assertion.AssertEquals ("#P23", (float)12, Test12.ToSqlSingle ().Value);
+                        Assertion.AssertEquals ("#P24", (float)0, Test0.ToSqlSingle ().Value);
+                        Assertion.AssertEquals ("#P25", (float)288, Test288.ToSqlSingle().Value);
 
                         // ToSqlString ()
-                        AssertEquals ("#P26", "12", Test12.ToSqlString ().Value);
-                        AssertEquals ("#P27", "0", Test0.ToSqlString ().Value);
-                        AssertEquals ("#P28", "288", Test288.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#P26", "12", Test12.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#P27", "0", Test0.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#P28", "288", Test288.ToSqlString ().Value);
 
                         // ToString ()
-                        AssertEquals ("#P29", "12", Test12.ToString ());
-                        AssertEquals ("#P30", "0", Test0.ToString ());
-                        AssertEquals ("#P31", "288", Test288.ToString ());
+                        Assertion.AssertEquals ("#P29", "12", Test12.ToString ());
+                        Assertion.AssertEquals ("#P30", "0", Test0.ToString ());
+                        Assertion.AssertEquals ("#P31", "288", Test288.ToString ());
                 }
 
-                public void TestXor()
+               [Test]
+                public void Xor()
                 {
                         SqlInt64 Test14 = new SqlInt64 (14);
                         SqlInt64 Test58 = new SqlInt64 (58);
@@ -351,16 +358,17 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt64 TestMax = new SqlInt64 (SqlInt64.MaxValue.Value);
                         SqlInt64 Test0 = new SqlInt64 (0);
 
-                        AssertEquals ("#Q01", (long)52, SqlInt64.Xor (Test14, Test58).Value);
-                        AssertEquals ("#Q02", (long)140, SqlInt64.Xor (Test14, Test130).Value);
-                        AssertEquals ("#Q03", (long)184, SqlInt64.Xor (Test58, Test130).Value);
-                        AssertEquals ("#Q04", (long)0, SqlInt64.Xor (TestMax, TestMax).Value);
-                        AssertEquals ("#Q05", TestMax.Value, SqlInt64.Xor (TestMax, Test0).Value);
+                        Assertion.AssertEquals ("#Q01", (long)52, SqlInt64.Xor (Test14, Test58).Value);
+                        Assertion.AssertEquals ("#Q02", (long)140, SqlInt64.Xor (Test14, Test130).Value);
+                        Assertion.AssertEquals ("#Q03", (long)184, SqlInt64.Xor (Test58, Test130).Value);
+                        Assertion.AssertEquals ("#Q04", (long)0, SqlInt64.Xor (TestMax, TestMax).Value);
+                        Assertion.AssertEquals ("#Q05", TestMax.Value, SqlInt64.Xor (TestMax, Test0).Value);
                 }
 
                 // OPERATORS
 
-                public void TestArithmeticOperators()
+               [Test]
+                public void ArithmeticOperators()
                 {
                         SqlInt64 Test24 = new SqlInt64 (24);
                         SqlInt64 Test64 = new SqlInt64 (64);
@@ -368,52 +376,53 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt64 Test0 = new SqlInt64 (0);
 
                         // "+"-operator
-                        AssertEquals ("#R01", (SqlInt64)2614,Test2550 + Test64);
+                        Assertion.AssertEquals ("#R01", (SqlInt64)2614,Test2550 + Test64);
                         try {
                                 SqlInt64 result = Test64 + SqlInt64.MaxValue;
-                                Fail ("#R02");
+                                Assertion.Fail ("#R02");
                         } catch (Exception e) {
-                                AssertEquals ("#R03", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#R03", typeof (OverflowException), e.GetType ());
                         }
 
                         // "/"-operator
-                        AssertEquals ("#R04", (SqlInt64)39, Test2550 / Test64);
-                        AssertEquals ("#R05", (SqlInt64)0, Test24 / Test64);
+                        Assertion.AssertEquals ("#R04", (SqlInt64)39, Test2550 / Test64);
+                        Assertion.AssertEquals ("#R05", (SqlInt64)0, Test24 / Test64);
 
                         try {
                                 SqlInt64 result = Test2550 / Test0;
-                                Fail ("#R06");
+                                Assertion.Fail ("#R06");
                         } catch (Exception e) {
-                                AssertEquals ("#R07", typeof (DivideByZeroException), e.GetType ());
+                                Assertion.AssertEquals ("#R07", typeof (DivideByZeroException), e.GetType ());
                         }
 
                         // "*"-operator
-                        AssertEquals ("#R08", (SqlInt64)1536, Test64 * Test24);
+                        Assertion.AssertEquals ("#R08", (SqlInt64)1536, Test64 * Test24);
 
                         try {
                                 SqlInt64 test = (SqlInt64.MaxValue * Test64);
-                                Fail ("TestC#2");
+                                Assertion.Fail ("TestC#2");
                         } catch (Exception e) {
-                                AssertEquals ("#R08", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#R08", typeof (OverflowException), e.GetType ());
                         }
 
                         // "-"-operator
-                        AssertEquals ("#R09", (SqlInt64)2526, Test2550 - Test24);
+                        Assertion.AssertEquals ("#R09", (SqlInt64)2526, Test2550 - Test24);
 
                         try {
                                 SqlInt64 test = SqlInt64.MinValue - Test64;
-                                Fail ("#R10");
+                                Assertion.Fail ("#R10");
                         } catch (Exception e) {
-                                AssertEquals ("#R11", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#R11", typeof (OverflowException), e.GetType ());
                         }
 
                         // "%"-operator
-                        AssertEquals ("#R12", (SqlInt64)54, Test2550 % Test64);
-                        AssertEquals ("#R13", (SqlInt64)24, Test24 % Test64);
-                        AssertEquals ("#R14", (SqlInt64)0, new SqlInt64 (100) % new SqlInt64 (10));
+                        Assertion.AssertEquals ("#R12", (SqlInt64)54, Test2550 % Test64);
+                        Assertion.AssertEquals ("#R13", (SqlInt64)24, Test24 % Test64);
+                        Assertion.AssertEquals ("#R14", (SqlInt64)0, new SqlInt64 (100) % new SqlInt64 (10));
                 }
 
-                public void TestBitwiseOperators()
+               [Test]
+                public void BitwiseOperators()
                 {
                         SqlInt64 Test2 = new SqlInt64 (2);
                         SqlInt64 Test4 = new SqlInt64 (4);
@@ -421,21 +430,22 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt64 Test2550 = new SqlInt64 (2550);
 
                         // & -operator
-                        AssertEquals ("#S01", (SqlInt64)0, Test2 & Test4);
-                        AssertEquals ("#S02", (SqlInt64)2, Test2 & Test2550);
-                        AssertEquals ("#S03", (SqlInt64)0,  SqlInt64.MaxValue & SqlInt64.MinValue);
+                        Assertion.AssertEquals ("#S01", (SqlInt64)0, Test2 & Test4);
+                        Assertion.AssertEquals ("#S02", (SqlInt64)2, Test2 & Test2550);
+                        Assertion.AssertEquals ("#S03", (SqlInt64)0,  SqlInt64.MaxValue & SqlInt64.MinValue);
 
                         // | -operator
-                        AssertEquals ("#S04", (SqlInt64)6,Test2 | Test4);
-                        AssertEquals ("#S05", (SqlInt64)2550, Test2 | Test2550);
-                        AssertEquals ("#S06", (SqlInt64)(-1), SqlInt64.MinValue | SqlInt64.MaxValue);
+                        Assertion.AssertEquals ("#S04", (SqlInt64)6,Test2 | Test4);
+                        Assertion.AssertEquals ("#S05", (SqlInt64)2550, Test2 | Test2550);
+                        Assertion.AssertEquals ("#S06", (SqlInt64)(-1), SqlInt64.MinValue | SqlInt64.MaxValue);
 
                         //  ^ -operator
-                        AssertEquals("#S07", (SqlInt64)2546, (Test2550 ^ Test4));
-                        AssertEquals("#S08", (SqlInt64)6, (Test2 ^ Test4));
+                        Assertion.AssertEquals("#S07", (SqlInt64)2546, (Test2550 ^ Test4));
+                        Assertion.AssertEquals("#S08", (SqlInt64)6, (Test2 ^ Test4));
                 }
 
-                public void TestThanOrEqualOperators()
+               [Test]
+                public void ThanOrEqualOperators()
                 {
                         SqlInt64 Test165 = new SqlInt64 (165);
                         SqlInt64 Test100 = new SqlInt64 (100);
@@ -443,166 +453,178 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlInt64 Test255 = new SqlInt64 (2550);
 
                         // == -operator
-                        Assert ("#T01", (Test100 == Test100II).Value);
-                        Assert ("#T02", !(Test165 == Test100).Value);
-                        Assert ("#T03", (Test165 == SqlInt64.Null).IsNull);
+                        Assertion.Assert ("#T01", (Test100 == Test100II).Value);
+                        Assertion.Assert ("#T02", !(Test165 == Test100).Value);
+                        Assertion.Assert ("#T03", (Test165 == SqlInt64.Null).IsNull);
 
                         // != -operator
-                        Assert ("#T04", !(Test100 != Test100II).Value);
-                        Assert ("#T05", (Test100 != Test255).Value);
-                        Assert ("#T06", (Test165 != Test255).Value);
-                        Assert ("#T07", (Test165 != SqlInt64.Null).IsNull);
+                        Assertion.Assert ("#T04", !(Test100 != Test100II).Value);
+                        Assertion.Assert ("#T05", (Test100 != Test255).Value);
+                        Assertion.Assert ("#T06", (Test165 != Test255).Value);
+                        Assertion.Assert ("#T07", (Test165 != SqlInt64.Null).IsNull);
 
                         // > -operator
-                        Assert ("#T08", (Test165 > Test100).Value);
-                        Assert ("#T09", !(Test165 > Test255).Value);
-                        Assert ("#T10", !(Test100 > Test100II).Value);
-                        Assert ("#T11", (Test165 > SqlInt64.Null).IsNull);
+                        Assertion.Assert ("#T08", (Test165 > Test100).Value);
+                        Assertion.Assert ("#T09", !(Test165 > Test255).Value);
+                        Assertion.Assert ("#T10", !(Test100 > Test100II).Value);
+                        Assertion.Assert ("#T11", (Test165 > SqlInt64.Null).IsNull);
 
                         // >=  -operator
-                        Assert ("#T12", !(Test165 >= Test255).Value);
-                        Assert ("#T13", (Test255 >= Test165).Value);
-                        Assert ("#T14", (Test100 >= Test100II).Value);
-                        Assert ("#T15", (Test165 >= SqlInt64.Null).IsNull);
+                        Assertion.Assert ("#T12", !(Test165 >= Test255).Value);
+                        Assertion.Assert ("#T13", (Test255 >= Test165).Value);
+                        Assertion.Assert ("#T14", (Test100 >= Test100II).Value);
+                        Assertion.Assert ("#T15", (Test165 >= SqlInt64.Null).IsNull);
 
                         // < -operator
-                        Assert ("#T16", !(Test165 < Test100).Value);
-                        Assert ("#T17", (Test165 < Test255).Value);
-                        Assert ("#T18", !(Test100 < Test100II).Value);
-                        Assert ("#T19", (Test165 < SqlInt64.Null).IsNull);
+                        Assertion.Assert ("#T16", !(Test165 < Test100).Value);
+                        Assertion.Assert ("#T17", (Test165 < Test255).Value);
+                        Assertion.Assert ("#T18", !(Test100 < Test100II).Value);
+                        Assertion.Assert ("#T19", (Test165 < SqlInt64.Null).IsNull);
 
                         // <= -operator
-                        Assert ("#T20", (Test165 <= Test255).Value);
-                        Assert ("#T21", !(Test255 <= Test165).Value);
-                        Assert ("#T22", (Test100 <= Test100II).Value);
-                        Assert ("#T23", (Test165 <= SqlInt64.Null).IsNull);
+                        Assertion.Assert ("#T20", (Test165 <= Test255).Value);
+                        Assertion.Assert ("#T21", !(Test255 <= Test165).Value);
+                        Assertion.Assert ("#T22", (Test100 <= Test100II).Value);
+                        Assertion.Assert ("#T23", (Test165 <= SqlInt64.Null).IsNull);
                 }
 
-                public void TestOnesComplementOperator()
+               [Test]
+                public void OnesComplementOperator()
                 {
                         SqlInt64 Test12 = new SqlInt64 (12);
                         SqlInt64 Test128 = new SqlInt64 (128);
 
-                        AssertEquals ("#V01", (SqlInt64)(-13), ~Test12);
-                        AssertEquals ("#V02", (SqlInt64)(-129), ~Test128);
-                        AssertEquals ("#V03", SqlInt64.Null, ~SqlInt64.Null);
+                        Assertion.AssertEquals ("#V01", (SqlInt64)(-13), ~Test12);
+                        Assertion.AssertEquals ("#V02", (SqlInt64)(-129), ~Test128);
+                        Assertion.AssertEquals ("#V03", SqlInt64.Null, ~SqlInt64.Null);
                 }
 
-                public void TestUnaryNegation()
+               [Test]
+                public void UnaryNegation()
                 {
                         SqlInt64 Test = new SqlInt64 (2000);
                         SqlInt64 TestNeg = new SqlInt64 (-3000);
 
                         SqlInt64 Result = -Test;
-                        AssertEquals ("#W01", (long)(-2000), Result.Value);
+                        Assertion.AssertEquals ("#W01", (long)(-2000), Result.Value);
 
                         Result = -TestNeg;
-                        AssertEquals ("#W02", (long)3000, Result.Value);
+                        Assertion.AssertEquals ("#W02", (long)3000, Result.Value);
                 }
 
-                public void TestSqlBooleanToSqlInt64()
+               [Test]
+                public void SqlBooleanToSqlInt64()
                 {
                         SqlBoolean TestBoolean = new SqlBoolean (true);
                         SqlInt64 Result;
 
                         Result = (SqlInt64)TestBoolean;
 
-                        AssertEquals ("#X01", (long)1, Result.Value);
+                        Assertion.AssertEquals ("#X01", (long)1, Result.Value);
 
                         Result = (SqlInt64)SqlBoolean.Null;
-                        Assert ("#X02", Result.IsNull);
+                        Assertion.Assert ("#X02", Result.IsNull);
                 }
 
-                public void TestSqlDecimalToSqlInt64()
+               [Test]
+                public void SqlDecimalToSqlInt64()
                 {
                         SqlDecimal TestDecimal64 = new SqlDecimal (64);
                         SqlDecimal TestDecimal900 = new SqlDecimal (90000);
 
-                        AssertEquals("#Y01", (long)64, ((SqlInt64)TestDecimal64).Value);
-                        AssertEquals("#Y02", SqlInt64.Null, ((SqlInt64)SqlDecimal.Null));
+                        Assertion.AssertEquals("#Y01", (long)64, ((SqlInt64)TestDecimal64).Value);
+                        Assertion.AssertEquals("#Y02", SqlInt64.Null, ((SqlInt64)SqlDecimal.Null));
 
                         try {
                                 SqlInt64 test = (SqlInt64)SqlDecimal.MaxValue;
-                                Fail("#Y03");
+                                Assertion.Fail("#Y03");
                         } catch (Exception e) {
-                                AssertEquals("#Y04", typeof(OverflowException), e.GetType());
+                                Assertion.AssertEquals("#Y04", typeof(OverflowException), e.GetType());
                         }
                 }
 
-                public void TestSqlDoubleToSqlInt64()
+               [Test]
+                public void SqlDoubleToSqlInt64()
                 {
                         SqlDouble TestDouble64 = new SqlDouble (64);
                         SqlDouble TestDouble900 = new SqlDouble (90000);
 
-                        AssertEquals ("#Z01", (long)64, ((SqlInt64)TestDouble64).Value);
-                        AssertEquals ("#Z02", SqlInt64.Null, ((SqlInt64)SqlDouble.Null));
+                        Assertion.AssertEquals ("#Z01", (long)64, ((SqlInt64)TestDouble64).Value);
+                        Assertion.AssertEquals ("#Z02", SqlInt64.Null, ((SqlInt64)SqlDouble.Null));
 
                         try {
                                 SqlInt64 test = (SqlInt64)SqlDouble.MaxValue;
-                                Fail ("#Z03");
+                                Assertion.Fail ("#Z03");
                         } catch (Exception e) {
-                                AssertEquals("#Z04", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals("#Z04", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestSql64IntToInt64()
+               [Test]
+                public void Sql64IntToInt64()
                 {
                         SqlInt64 Test = new SqlInt64 (12);
                         Int64 Result = (Int64)Test;
-                        AssertEquals ("#AA01", (long)12, Result);
+                        Assertion.AssertEquals ("#AA01", (long)12, Result);
                 }
 
-                public void TestSqlInt32ToSqlInt64()
+               [Test]
+                public void SqlInt32ToSqlInt64()
                 {
                         SqlInt32 Test64 = new SqlInt32 (64);
-                        AssertEquals ("#AB01", (long)64, ((SqlInt64)Test64).Value);
+                        Assertion.AssertEquals ("#AB01", (long)64, ((SqlInt64)Test64).Value);
                 }
 
-                public void TestSqlInt16ToSqlInt64()
+               [Test]
+                public void SqlInt16ToSqlInt64()
                 {
                         SqlInt16 Test64 = new SqlInt16 (64);
-                        AssertEquals ("#AC01", (long)64, ((SqlInt64)Test64).Value);
+                        Assertion.AssertEquals ("#AC01", (long)64, ((SqlInt64)Test64).Value);
                 }
 
-                public void TestSqlMoneyToSqlInt64()
+               [Test]
+                public void SqlMoneyToSqlInt64()
                 {
                         SqlMoney TestMoney64 = new SqlMoney(64);
-                        AssertEquals ("#AD01", (long)64, ((SqlInt64)TestMoney64).Value);
+                        Assertion.AssertEquals ("#AD01", (long)64, ((SqlInt64)TestMoney64).Value);
                 }
 
-                public void TestSqlSingleToSqlInt64()
+               [Test]
+                public void SqlSingleToSqlInt64()
                 {
                         SqlSingle TestSingle64 = new SqlSingle (64);
-                        AssertEquals ("#AE01", (long)64, ((SqlInt64)TestSingle64).Value);
+                        Assertion.AssertEquals ("#AE01", (long)64, ((SqlInt64)TestSingle64).Value);
                 }
 
-                public void TestSqlStringToSqlInt64()
+               [Test]
+                public void SqlStringToSqlInt64()
                 {
                         SqlString TestString = new SqlString ("Test string");
                         SqlString TestString100 = new SqlString ("100");
                         SqlString TestString1000 = new SqlString ("1000000000000000000000");
 
-                        AssertEquals ("#AF01", (long)100, ((SqlInt64)TestString100).Value);
+                        Assertion.AssertEquals ("#AF01", (long)100, ((SqlInt64)TestString100).Value);
 
                         try {
                                 SqlInt64 test = (SqlInt64)TestString1000;
-                                Fail ("#AF02");
+                                Assertion.Fail ("#AF02");
                         } catch(Exception e) {
-                                AssertEquals ("#AF03", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#AF03", typeof (OverflowException), e.GetType ());
                         }
 
                         try {
                                 SqlInt64 test = (SqlInt64)TestString;
-                                Fail ("#AF03");
+                                Assertion.Fail ("#AF03");
                         } catch(Exception e) {
-                                AssertEquals ("#AF04", typeof (FormatException), e.GetType ());
+                                Assertion.AssertEquals ("#AF04", typeof (FormatException), e.GetType ());
                         }
                 }
 
-                public void TestByteToSqlInt64()
+               [Test]
+                public void ByteToSqlInt64()
                 {
                         short TestShort = 14;
-                        AssertEquals ("#G01", (long)14, ((SqlInt64)TestShort).Value);
+                        Assertion.AssertEquals ("#G01", (long)14, ((SqlInt64)TestShort).Value);
                 }
         }
 }
index 91a8e101bf46dec60a02af51b23879fc52a5d8e7..90eab5529518f02c4d53ac8894c536c5af3524f3 100755 (executable)
@@ -1,9 +1,12 @@
 //\r
 // SqlMoneyTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlMoney\r
 //\r
-// Ville Palo (vi64pa@koti.soon.fi)\r
+// Authors:\r
+//   Ville Palo (vi64pa@koti.soon.fi)\r
+//   Martin Willemoes Hansen (mwh@sysrq.dk)\r
 //\r
-// (C) Ville Palo 2002\r
+// (C) 2002 Ville Palo\r
+// (C) 2003 Martin Willemoes Hansen\r
 // \r
 \r
 using NUnit.Framework;\r
@@ -12,19 +15,16 @@ using System.Data.SqlTypes;
 \r
 namespace MonoTests.System.Data.SqlTypes\r
 {\r
-        public class SqlMoneyTest : TestCase {\r
+       [TestFixture]\r
+        public class SqlMoneyTest {\r
 \r
                private SqlMoney Test1;\r
                private SqlMoney Test2;\r
                private SqlMoney Test3;\r
                private SqlMoney Test4;\r
 \r
-                public SqlMoneyTest() : base ("System.Data.SqlTypes.SqlMoney") {}\r
-                public SqlMoneyTest(string name) : base(name) {}\r
-\r
-                protected override void TearDown() {}\r
-\r
-                protected override void SetUp() \r
+               [SetUp]\r
+                public void GetReady() \r
                {\r
                        Test1 = new SqlMoney (6464.6464d);\r
                        Test2 = new SqlMoney (90000.0m);\r
@@ -32,484 +32,503 @@ namespace MonoTests.System.Data.SqlTypes
                        Test4 = new SqlMoney (-45000.0m);\r
                }\r
 \r
-                public static ITest Suite {\r
-                        get {\r
-                                return new TestSuite(typeof(SqlMoney));\r
-                        }\r
-                }\r
-\r
                 // Test constructor\r
-                public void TestCreate()\r
+               [Test]\r
+                public void Create()\r
                 {\r
                        try {\r
                                SqlMoney Test = new SqlMoney (1000000000000000m);\r
-                               Fail ("#B01");\r
+                               Assertion.Fail ("#B01");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#A02", typeof (OverflowException),\r
+                               Assertion.AssertEquals ("#A02", typeof (OverflowException),\r
                                              e.GetType ());\r
                        }\r
 \r
                         SqlMoney CreationTest = new SqlMoney ((decimal)913.3);\r
-                       AssertEquals ("A03", 913.3m, CreationTest.Value);\r
+                       Assertion.AssertEquals ("A03", 913.3m, CreationTest.Value);\r
 \r
                        try {\r
                                SqlMoney Test = new SqlMoney (1e200);\r
-                               Fail ("#B04");\r
+                               Assertion.Fail ("#B04");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#A05", typeof (OverflowException),\r
+                               Assertion.AssertEquals ("#A05", typeof (OverflowException),\r
                                              e.GetType ());\r
                        }\r
                         \r
                         SqlMoney CreationTest2 = new SqlMoney ((double)913.3);\r
-                       AssertEquals ("A06", 913.3m, CreationTest2.Value);\r
+                       Assertion.AssertEquals ("A06", 913.3m, CreationTest2.Value);\r
 \r
                         SqlMoney CreationTest3 = new SqlMoney ((int)913);\r
-                       AssertEquals ("A07", 913m, CreationTest3.Value);\r
+                       Assertion.AssertEquals ("A07", 913m, CreationTest3.Value);\r
 \r
                         SqlMoney CreationTest4 = new SqlMoney ((long)913.3);\r
-                        AssertEquals ("A08", 913m, CreationTest4.Value);\r
+                        Assertion.AssertEquals ("A08", 913m, CreationTest4.Value);\r
                 }\r
 \r
                 // Test public fields\r
-                public void TestPublicFields()\r
+               [Test]\r
+                public void PublicFields()\r
                 {\r
                         // FIXME: There is a error in msdn docs, it says thath MaxValue\r
                         // is 922,337,203,685,475.5807 when the actual value is\r
                         //    922,337,203,685,477.5807\r
-                        AssertEquals ("#B01", 922337203685477.5807m, SqlMoney.MaxValue.Value);\r
-                        AssertEquals ("#B02", -922337203685477.5808m, SqlMoney.MinValue.Value);\r
-                        Assert ("#B03", SqlMoney.Null.IsNull);\r
-                        AssertEquals ("#B04", 0m, SqlMoney.Zero.Value);\r
+                        Assertion.AssertEquals ("#B01", 922337203685477.5807m, SqlMoney.MaxValue.Value);\r
+                        Assertion.AssertEquals ("#B02", -922337203685477.5808m, SqlMoney.MinValue.Value);\r
+                        Assertion.Assert ("#B03", SqlMoney.Null.IsNull);\r
+                        Assertion.AssertEquals ("#B04", 0m, SqlMoney.Zero.Value);\r
                 }\r
 \r
                 // Test properties\r
-                public void TestProperties()\r
+               [Test]\r
+                public void Properties()\r
                 {\r
-                       AssertEquals ("#C01", 90000m, Test2.Value);\r
-                        AssertEquals ("#C02", -45000m, Test4.Value);\r
-                       Assert ("#C03", SqlMoney.Null.IsNull);\r
+                       Assertion.AssertEquals ("#C01", 90000m, Test2.Value);\r
+                        Assertion.AssertEquals ("#C02", -45000m, Test4.Value);\r
+                       Assertion.Assert ("#C03", SqlMoney.Null.IsNull);\r
                 }\r
 \r
                 // PUBLIC METHODS\r
 \r
-                public void TestArithmeticMethods()\r
+               [Test]\r
+                public void ArithmeticMethods()\r
                 {\r
                        SqlMoney TestMoney2 = new SqlMoney (2);\r
 \r
                        // Add\r
-                        AssertEquals ("#D01", (SqlMoney)96464.6464m, SqlMoney.Add (Test1, Test2));\r
-                        AssertEquals ("#D02", (SqlMoney)180000m, SqlMoney.Add (Test2, Test2));\r
-                        AssertEquals ("#D03", (SqlMoney)45000m, SqlMoney.Add (Test2, Test4));\r
+                        Assertion.AssertEquals ("#D01", (SqlMoney)96464.6464m, SqlMoney.Add (Test1, Test2));\r
+                        Assertion.AssertEquals ("#D02", (SqlMoney)180000m, SqlMoney.Add (Test2, Test2));\r
+                        Assertion.AssertEquals ("#D03", (SqlMoney)45000m, SqlMoney.Add (Test2, Test4));\r
                        \r
                        try {\r
                                SqlMoney test = SqlMoney.Add(SqlMoney.MaxValue, Test2);\r
-                               Fail ("#D04");\r
+                               Assertion.Fail ("#D04");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#D05", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#D05", typeof (OverflowException), e.GetType ());\r
                        }\r
 \r
                        // Divide\r
-                        AssertEquals ("#D06", (SqlMoney)45000m, SqlMoney.Divide (Test2, TestMoney2));\r
+                        Assertion.AssertEquals ("#D06", (SqlMoney)45000m, SqlMoney.Divide (Test2, TestMoney2));\r
                        try {\r
                                SqlMoney test = SqlMoney.Divide (Test2, SqlMoney.Zero);\r
-                               Fail ("#D07");\r
+                               Assertion.Fail ("#D07");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#D08", typeof (DivideByZeroException), \r
+                               Assertion.AssertEquals ("#D08", typeof (DivideByZeroException), \r
                                              e.GetType());\r
                        }\r
                                                        \r
                        // Multiply\r
-                        AssertEquals ("#D09", (SqlMoney)581818176m, SqlMoney.Multiply (Test1, Test2));\r
-                        AssertEquals ("#D10", (SqlMoney)(-4050000000m), SqlMoney.Multiply (Test3, Test4));\r
+                        Assertion.AssertEquals ("#D09", (SqlMoney)581818176m, SqlMoney.Multiply (Test1, Test2));\r
+                        Assertion.AssertEquals ("#D10", (SqlMoney)(-4050000000m), SqlMoney.Multiply (Test3, Test4));\r
 \r
                        try {\r
                                SqlMoney test = SqlMoney.Multiply (SqlMoney.MaxValue, Test2);\r
-                               Fail ("#D11");\r
+                               Assertion.Fail ("#D11");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#D12", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#D12", typeof (OverflowException), e.GetType ());\r
                        }\r
                                      \r
                        // Subtract\r
-                        AssertEquals ("#D13", (SqlMoney)0m, SqlMoney.Subtract (Test2, Test3));\r
-                        AssertEquals ("#D14", (SqlMoney)83535.3536m, SqlMoney.Subtract (Test2, Test1));\r
+                        Assertion.AssertEquals ("#D13", (SqlMoney)0m, SqlMoney.Subtract (Test2, Test3));\r
+                        Assertion.AssertEquals ("#D14", (SqlMoney)83535.3536m, SqlMoney.Subtract (Test2, Test1));\r
                        \r
                        try {\r
                                SqlMoney test = SqlMoney.Subtract (SqlMoney.MinValue, Test2);\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#D15", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#D15", typeof (OverflowException), e.GetType ());\r
                        }\r
                 }\r
 \r
-                public void TestCompareTo()\r
+               [Test]\r
+                public void CompareTo()\r
                {\r
-                       Assert ("#E01", Test1.CompareTo (Test2) < 0);\r
-                       Assert ("#E02", Test3.CompareTo (Test1) > 0);\r
-                       Assert ("#E03", Test3.CompareTo (Test2) == 0);\r
-                        Assert ("#E04", Test3.CompareTo (SqlMoney.Null) > 0);\r
+                       Assertion.Assert ("#E01", Test1.CompareTo (Test2) < 0);\r
+                       Assertion.Assert ("#E02", Test3.CompareTo (Test1) > 0);\r
+                       Assertion.Assert ("#E03", Test3.CompareTo (Test2) == 0);\r
+                        Assertion.Assert ("#E04", Test3.CompareTo (SqlMoney.Null) > 0);\r
                 }\r
 \r
-                public void TestEqualsMethods()\r
+               [Test]\r
+                public void EqualsMethods()\r
                 {\r
-                       Assert ("#F01", !Test1.Equals (Test2));\r
-                       Assert ("#F02", Test2.Equals (Test3));\r
-                       Assert ("#F03", !SqlMoney.Equals (Test1, Test2).Value);\r
-                       Assert ("#F04", SqlMoney.Equals (Test3, Test2).Value);\r
+                       Assertion.Assert ("#F01", !Test1.Equals (Test2));\r
+                       Assertion.Assert ("#F02", Test2.Equals (Test3));\r
+                       Assertion.Assert ("#F03", !SqlMoney.Equals (Test1, Test2).Value);\r
+                       Assertion.Assert ("#F04", SqlMoney.Equals (Test3, Test2).Value);\r
                 }\r
 \r
-                public void TestGetHashCode()\r
+               [Test]\r
+                public void GetHashCodeTest()\r
                 {\r
                         // FIXME: Better way to test HashCode\r
-                        AssertEquals ("#G01", Test3.GetHashCode (), Test2.GetHashCode ());\r
-                        Assert ("#G02", Test2.GetHashCode () !=  Test1.GetHashCode ());\r
+                        Assertion.AssertEquals ("#G01", Test3.GetHashCode (), Test2.GetHashCode ());\r
+                        Assertion.Assert ("#G02", Test2.GetHashCode () !=  Test1.GetHashCode ());\r
                 }\r
 \r
-                public void TestGetType()\r
+               [Test]\r
+                public void GetTypeTest()\r
                 {\r
-                       AssertEquals ("#H01", "System.Data.SqlTypes.SqlMoney", \r
+                       Assertion.AssertEquals ("#H01", "System.Data.SqlTypes.SqlMoney", \r
                                      Test1.GetType ().ToString ());\r
                }\r
 \r
-                public void TestGreaters()\r
+               [Test]\r
+                public void Greaters()\r
                 {\r
                         // GreateThan ()\r
-                        Assert ("#I01", !SqlMoney.GreaterThan (Test1, Test2).Value);\r
-                        Assert ("#I02", SqlMoney.GreaterThan (Test2, Test1).Value);\r
-                        Assert ("#I03", !SqlMoney.GreaterThan (Test2, Test3).Value);\r
-                        Assert ("#I04", SqlMoney.GreaterThan (Test2, SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#I01", !SqlMoney.GreaterThan (Test1, Test2).Value);\r
+                        Assertion.Assert ("#I02", SqlMoney.GreaterThan (Test2, Test1).Value);\r
+                        Assertion.Assert ("#I03", !SqlMoney.GreaterThan (Test2, Test3).Value);\r
+                        Assertion.Assert ("#I04", SqlMoney.GreaterThan (Test2, SqlMoney.Null).IsNull);\r
 \r
                         // GreaterTharOrEqual ()\r
-                        Assert ("#I05", !SqlMoney.GreaterThanOrEqual (Test1, Test2).Value);\r
-                        Assert ("#I06", SqlMoney.GreaterThanOrEqual (Test2, Test1).Value);\r
-                        Assert ("#I07", SqlMoney.GreaterThanOrEqual (Test3, Test2).Value);\r
-                        Assert ("#I08", SqlMoney.GreaterThanOrEqual (Test3, SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#I05", !SqlMoney.GreaterThanOrEqual (Test1, Test2).Value);\r
+                        Assertion.Assert ("#I06", SqlMoney.GreaterThanOrEqual (Test2, Test1).Value);\r
+                        Assertion.Assert ("#I07", SqlMoney.GreaterThanOrEqual (Test3, Test2).Value);\r
+                        Assertion.Assert ("#I08", SqlMoney.GreaterThanOrEqual (Test3, SqlMoney.Null).IsNull);\r
                 }\r
 \r
-                public void TestLessers()\r
+               [Test]\r
+                public void Lessers()\r
                 {\r
                         // LessThan()\r
-                        Assert ("#J01", !SqlMoney.LessThan (Test2, Test3).Value);\r
-                        Assert ("#J02", !SqlMoney.LessThan (Test2, Test1).Value);\r
-                        Assert ("#J03", SqlMoney.LessThan (Test1, Test2).Value);\r
-                        Assert ("#J04", SqlMoney.LessThan (SqlMoney.Null, Test2).IsNull);\r
+                        Assertion.Assert ("#J01", !SqlMoney.LessThan (Test2, Test3).Value);\r
+                        Assertion.Assert ("#J02", !SqlMoney.LessThan (Test2, Test1).Value);\r
+                        Assertion.Assert ("#J03", SqlMoney.LessThan (Test1, Test2).Value);\r
+                        Assertion.Assert ("#J04", SqlMoney.LessThan (SqlMoney.Null, Test2).IsNull);\r
 \r
                         // LessThanOrEqual ()\r
-                        Assert ("#J05", SqlMoney.LessThanOrEqual (Test1, Test2).Value);\r
-                        Assert ("#J06", !SqlMoney.LessThanOrEqual (Test2, Test1).Value);\r
-                        Assert ("#J07", SqlMoney.LessThanOrEqual (Test2, Test2).Value);\r
-                        Assert ("#J08", SqlMoney.LessThanOrEqual (Test2, SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#J05", SqlMoney.LessThanOrEqual (Test1, Test2).Value);\r
+                        Assertion.Assert ("#J06", !SqlMoney.LessThanOrEqual (Test2, Test1).Value);\r
+                        Assertion.Assert ("#J07", SqlMoney.LessThanOrEqual (Test2, Test2).Value);\r
+                        Assertion.Assert ("#J08", SqlMoney.LessThanOrEqual (Test2, SqlMoney.Null).IsNull);\r
                 }\r
 \r
-                public void TestNotEquals()\r
+               [Test]\r
+                public void NotEquals()\r
                 {\r
-                        Assert ("#K01", SqlMoney.NotEquals (Test1, Test2).Value);\r
-                        Assert ("#K02", SqlMoney.NotEquals (Test2, Test1).Value);\r
-                        Assert ("#K03", !SqlMoney.NotEquals (Test2, Test3).Value);\r
-                        Assert ("#K04", !SqlMoney.NotEquals (Test3, Test2).Value);\r
-                        Assert ("#K05", SqlMoney.NotEquals (SqlMoney.Null, Test2).IsNull);\r
+                        Assertion.Assert ("#K01", SqlMoney.NotEquals (Test1, Test2).Value);\r
+                        Assertion.Assert ("#K02", SqlMoney.NotEquals (Test2, Test1).Value);\r
+                        Assertion.Assert ("#K03", !SqlMoney.NotEquals (Test2, Test3).Value);\r
+                        Assertion.Assert ("#K04", !SqlMoney.NotEquals (Test3, Test2).Value);\r
+                        Assertion.Assert ("#K05", SqlMoney.NotEquals (SqlMoney.Null, Test2).IsNull);\r
                 }\r
 \r
-                public void TestParse()\r
+               [Test]\r
+                public void Parse()\r
                 {\r
                         try {\r
                                 SqlMoney.Parse (null);\r
-                                Fail ("#L01");\r
+                                Assertion.Fail ("#L01");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#L02", typeof (ArgumentNullException), e.GetType ());\r
+                                Assertion.AssertEquals ("#L02", typeof (ArgumentNullException), e.GetType ());\r
                         }\r
 \r
                         try {\r
                                 SqlMoney.Parse ("not-a-number");\r
-                                Fail ("#L03");\r
+                                Assertion.Fail ("#L03");\r
                         } catch (Exception e) {\r
 \r
-                                AssertEquals ("#L04", typeof (FormatException), e.GetType ());\r
+                                Assertion.AssertEquals ("#L04", typeof (FormatException), e.GetType ());\r
                         }\r
 \r
                          try {\r
                                 SqlMoney.Parse ("1000000000000000");\r
-                                Fail ("#L05");\r
+                                Assertion.Fail ("#L05");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#L06", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#L06", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
-                        AssertEquals("#L07", (decimal)150, SqlMoney.Parse ("150").Value);\r
+                        Assertion.AssertEquals("#L07", (decimal)150, SqlMoney.Parse ("150").Value);\r
                 }\r
 \r
-                public void TestConversions()\r
+               [Test]\r
+                public void Conversions()\r
                 {                    \r
                        SqlMoney TestMoney100 = new SqlMoney (100);\r
 \r
                        // ToDecimal\r
-                       AssertEquals ("#M01", (decimal)6464.6464, Test1.ToDecimal ());\r
+                       Assertion.AssertEquals ("#M01", (decimal)6464.6464, Test1.ToDecimal ());\r
 \r
                        // ToDouble\r
-                       AssertEquals ("#M02", (double)6464.6464, Test1.ToDouble ());\r
+                       Assertion.AssertEquals ("#M02", (double)6464.6464, Test1.ToDouble ());\r
 \r
                        // ToInt32\r
-                       AssertEquals ("#M03", (int)90000, Test2.ToInt32 ());\r
-                        AssertEquals ("#M04", (int)6465, Test1.ToInt32 ());\r
+                       Assertion.AssertEquals ("#M03", (int)90000, Test2.ToInt32 ());\r
+                        Assertion.AssertEquals ("#M04", (int)6465, Test1.ToInt32 ());\r
 \r
                        // ToInt64\r
-                        AssertEquals ("#M05", (long)90000, Test2.ToInt64 ());\r
-                        AssertEquals ("#M06", (long)6465, Test1.ToInt64 ());\r
+                        Assertion.AssertEquals ("#M05", (long)90000, Test2.ToInt64 ());\r
+                        Assertion.AssertEquals ("#M06", (long)6465, Test1.ToInt64 ());\r
 \r
                         // ToSqlBoolean ()\r
-                        Assert ("#M07", Test1.ToSqlBoolean ().Value);\r
-                        Assert ("#M08", !SqlMoney.Zero.ToSqlBoolean ().Value);\r
-                        Assert ("#M09", SqlMoney.Null.ToSqlBoolean ().IsNull);\r
+                        Assertion.Assert ("#M07", Test1.ToSqlBoolean ().Value);\r
+                        Assertion.Assert ("#M08", !SqlMoney.Zero.ToSqlBoolean ().Value);\r
+                        Assertion.Assert ("#M09", SqlMoney.Null.ToSqlBoolean ().IsNull);\r
 \r
                         // ToSqlByte ()\r
-                        AssertEquals ("#M10", (byte)100, TestMoney100.ToSqlByte ().Value);\r
+                        Assertion.AssertEquals ("#M10", (byte)100, TestMoney100.ToSqlByte ().Value);\r
 \r
                         try {\r
                                 SqlByte b = (byte)Test2.ToSqlByte ();\r
-                                Fail ("#M11");\r
+                                Assertion.Fail ("#M11");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#M12", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#M12", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
                         // ToSqlDecimal ()\r
-                        AssertEquals ("#M13", (decimal)6464.6464, Test1.ToSqlDecimal ().Value);\r
-                        AssertEquals ("#M14", (decimal)-45000, Test4.ToSqlDecimal ().Value);\r
+                        Assertion.AssertEquals ("#M13", (decimal)6464.6464, Test1.ToSqlDecimal ().Value);\r
+                        Assertion.AssertEquals ("#M14", (decimal)-45000, Test4.ToSqlDecimal ().Value);\r
 \r
                         // ToSqlInt16 ()\r
-                        AssertEquals ("#M15", (short)6465, Test1.ToSqlInt16 ().Value);\r
+                        Assertion.AssertEquals ("#M15", (short)6465, Test1.ToSqlInt16 ().Value);\r
 \r
                         try {\r
                                 SqlInt16 test = SqlMoney.MaxValue.ToSqlInt16().Value;\r
-                                Fail ("#M17");\r
+                                Assertion.Fail ("#M17");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#M18", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#M18", typeof (OverflowException), e.GetType ());\r
                         }        \r
 \r
                         // ToSqlInt32 ()\r
-                        AssertEquals ("#M19", (int)6465, Test1.ToSqlInt32 ().Value);\r
-                        AssertEquals ("#M20", (int)(-45000), Test4.ToSqlInt32 ().Value);\r
+                        Assertion.AssertEquals ("#M19", (int)6465, Test1.ToSqlInt32 ().Value);\r
+                        Assertion.AssertEquals ("#M20", (int)(-45000), Test4.ToSqlInt32 ().Value);\r
 \r
                         try {\r
                                 SqlInt32 test = SqlMoney.MaxValue.ToSqlInt32 ().Value;\r
-                                Fail ("#M21");\r
+                                Assertion.Fail ("#M21");\r
                         } catch (Exception e) { \r
-                                AssertEquals ("#M22", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#M22", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
                         // ToSqlInt64 ()\r
-                        AssertEquals ("#M23", (long)6465, Test1.ToSqlInt64 ().Value);\r
-                        AssertEquals ("#M24", (long)(-45000), Test4.ToSqlInt64 ().Value);\r
+                        Assertion.AssertEquals ("#M23", (long)6465, Test1.ToSqlInt64 ().Value);\r
+                        Assertion.AssertEquals ("#M24", (long)(-45000), Test4.ToSqlInt64 ().Value);\r
 \r
                         // ToSqlSingle ()\r
-                        AssertEquals ("#M25", (float)6464.6464, Test1.ToSqlSingle ().Value);\r
+                        Assertion.AssertEquals ("#M25", (float)6464.6464, Test1.ToSqlSingle ().Value);\r
 \r
                         // ToSqlString ()\r
-                        AssertEquals ("#M26", "6464,6464", Test1.ToSqlString ().Value);\r
-                        AssertEquals ("#M27", "90000", Test2.ToSqlString ().Value);\r
+                        Assertion.AssertEquals ("#M26", "6464,6464", Test1.ToSqlString ().Value);\r
+                        Assertion.AssertEquals ("#M27", "90000", Test2.ToSqlString ().Value);\r
 \r
                         // ToString ()\r
-                        AssertEquals ("#M28", "6464,6464", Test1.ToString ());\r
-                        AssertEquals ("#M29", "90000", Test2.ToString ());\r
+                        Assertion.AssertEquals ("#M28", "6464,6464", Test1.ToString ());\r
+                        Assertion.AssertEquals ("#M29", "90000", Test2.ToString ());\r
                 }\r
 \r
                 // OPERATORS\r
 \r
-                public void TestArithmeticOperators()\r
+               [Test]\r
+                public void ArithmeticOperators()\r
                 {\r
                         // "+"-operator\r
-                        AssertEquals ("#N01", (SqlMoney)96464.6464m, Test1 + Test2);\r
+                        Assertion.AssertEquals ("#N01", (SqlMoney)96464.6464m, Test1 + Test2);\r
      \r
                         try {\r
                                 SqlMoney test = SqlMoney.MaxValue + SqlMoney.MaxValue;\r
-                                Fail ("#N02");\r
+                                Assertion.Fail ("#N02");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#N03", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#N03", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
                         // "/"-operator\r
-                        AssertEquals ("#N04", (SqlMoney)13.9219m, Test2 / Test1);\r
+                        Assertion.AssertEquals ("#N04", (SqlMoney)13.9219m, Test2 / Test1);\r
 \r
                         try {\r
                                 SqlMoney test = Test3 / SqlMoney.Zero;\r
-                                Fail ("#N05");\r
+                                Assertion.Fail ("#N05");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#N06", typeof (DivideByZeroException), e.GetType ());\r
+                                Assertion.AssertEquals ("#N06", typeof (DivideByZeroException), e.GetType ());\r
                         }\r
 \r
                         // "*"-operator\r
-                        AssertEquals ("#N07", (SqlMoney)581818176m, Test1 * Test2);\r
+                        Assertion.AssertEquals ("#N07", (SqlMoney)581818176m, Test1 * Test2);\r
 \r
                         try {\r
                                 SqlMoney test = SqlMoney.MaxValue * Test1;\r
-                                Fail ("#N08");\r
+                                Assertion.Fail ("#N08");\r
                         } catch (Exception e) {\r
-                                AssertEquals ("#N09", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#N09", typeof (OverflowException), e.GetType ());\r
                         }\r
 \r
                         // "-"-operator\r
-                        AssertEquals ("#N10", (SqlMoney)83535.3536m, Test2 - Test1);\r
+                        Assertion.AssertEquals ("#N10", (SqlMoney)83535.3536m, Test2 - Test1);\r
 \r
                         try {\r
                                 SqlMoney test = SqlMoney.MinValue - SqlMoney.MaxValue;\r
-                                Fail ("#N11");\r
+                                Assertion.Fail ("#N11");\r
                         } catch  (Exception e) {\r
-                                AssertEquals ("#N12", typeof (OverflowException), e.GetType ());\r
+                                Assertion.AssertEquals ("#N12", typeof (OverflowException), e.GetType ());\r
                         }\r
                 }\r
 \r
-                public void TestThanOrEqualOperators()\r
+               [Test]\r
+                public void ThanOrEqualOperators()\r
                 {\r
                         // == -operator\r
-                        Assert ("#O01", (Test2 == Test2).Value);\r
-                        Assert ("#O02", !(Test1 == Test2).Value);\r
-                        Assert ("#O03", (Test1 == SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#O01", (Test2 == Test2).Value);\r
+                        Assertion.Assert ("#O02", !(Test1 == Test2).Value);\r
+                        Assertion.Assert ("#O03", (Test1 == SqlMoney.Null).IsNull);\r
                         \r
                         // != -operator\r
-                        Assert ("#O04", !(Test2 != Test3).Value);\r
-                        Assert ("#O05", (Test1 != Test3).Value);\r
-                        Assert ("#O06", (Test1 != Test4).Value);\r
-                        Assert ("#O07", (Test1 != SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#O04", !(Test2 != Test3).Value);\r
+                        Assertion.Assert ("#O05", (Test1 != Test3).Value);\r
+                        Assertion.Assert ("#O06", (Test1 != Test4).Value);\r
+                        Assertion.Assert ("#O07", (Test1 != SqlMoney.Null).IsNull);\r
 \r
                         // > -operator\r
-                        Assert ("#O08", (Test1 > Test4).Value);\r
-                        Assert ("#O09", (Test2 > Test1).Value);\r
-                        Assert ("#O10", !(Test2 > Test3).Value);\r
-                        Assert ("#O11", (Test1 > SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#O08", (Test1 > Test4).Value);\r
+                        Assertion.Assert ("#O09", (Test2 > Test1).Value);\r
+                        Assertion.Assert ("#O10", !(Test2 > Test3).Value);\r
+                        Assertion.Assert ("#O11", (Test1 > SqlMoney.Null).IsNull);\r
 \r
                         // >=  -operator\r
-                        Assert ("#O12", !(Test1 >= Test3).Value);\r
-                        Assert ("#O13", (Test3 >= Test1).Value);\r
-                        Assert ("#O14", (Test2 >= Test3).Value);\r
-                        Assert ("#O15", (Test1 >= SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#O12", !(Test1 >= Test3).Value);\r
+                        Assertion.Assert ("#O13", (Test3 >= Test1).Value);\r
+                        Assertion.Assert ("#O14", (Test2 >= Test3).Value);\r
+                        Assertion.Assert ("#O15", (Test1 >= SqlMoney.Null).IsNull);\r
 \r
                         // < -operator\r
-                        Assert ("#O16", !(Test2 < Test1).Value);\r
-                        Assert ("#O17", (Test1 < Test3).Value);\r
-                        Assert ("#O18", !(Test2 < Test3).Value);\r
-                        Assert ("#O19", (Test1 < SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#O16", !(Test2 < Test1).Value);\r
+                        Assertion.Assert ("#O17", (Test1 < Test3).Value);\r
+                        Assertion.Assert ("#O18", !(Test2 < Test3).Value);\r
+                        Assertion.Assert ("#O19", (Test1 < SqlMoney.Null).IsNull);\r
 \r
                         // <= -operator\r
-                        Assert ("#O20", (Test1 <= Test3).Value);\r
-                        Assert ("#O21", !(Test3 <= Test1).Value);\r
-                        Assert ("#O22", (Test2 <= Test3).Value);\r
-                        Assert ("#O23", (Test1 <= SqlMoney.Null).IsNull);\r
+                        Assertion.Assert ("#O20", (Test1 <= Test3).Value);\r
+                        Assertion.Assert ("#O21", !(Test3 <= Test1).Value);\r
+                        Assertion.Assert ("#O22", (Test2 <= Test3).Value);\r
+                        Assertion.Assert ("#O23", (Test1 <= SqlMoney.Null).IsNull);\r
                 }\r
 \r
-                public void TestUnaryNegation()\r
+               [Test]\r
+                public void UnaryNegation()\r
                 {\r
 \r
-                        AssertEquals ("#P01", (decimal)(-6464.6464), -(Test1).Value);\r
-                        AssertEquals ("#P02", (decimal)45000, -(Test4).Value);\r
+                        Assertion.AssertEquals ("#P01", (decimal)(-6464.6464), -(Test1).Value);\r
+                        Assertion.AssertEquals ("#P02", (decimal)45000, -(Test4).Value);\r
                 }\r
 \r
-                public void TestSqlBooleanToSqlMoney()\r
+               [Test]\r
+                public void SqlBooleanToSqlMoney()\r
                 {\r
                         SqlBoolean TestBoolean = new SqlBoolean (true);\r
 \r
-                        AssertEquals ("#Q01", (decimal)1, ((SqlMoney)TestBoolean).Value);\r
-                       Assert ("#Q02", ((SqlDecimal)SqlBoolean.Null).IsNull);\r
+                        Assertion.AssertEquals ("#Q01", (decimal)1, ((SqlMoney)TestBoolean).Value);\r
+                       Assertion.Assert ("#Q02", ((SqlDecimal)SqlBoolean.Null).IsNull);\r
                 }\r
                \r
-               public void TestSqlDecimalToSqlMoney()\r
+               [Test]\r
+               public void SqlDecimalToSqlMoney()\r
                {\r
                        SqlDecimal TestDecimal = new SqlDecimal (4000);\r
                        SqlDecimal TestDecimal2 = new SqlDecimal (1E+20);\r
 \r
                        SqlMoney TestMoney = (SqlMoney)TestDecimal;\r
-                       AssertEquals ("#R01", TestMoney.Value, TestDecimal.Value);\r
+                       Assertion.AssertEquals ("#R01", TestMoney.Value, TestDecimal.Value);\r
 \r
                        try {\r
                                SqlMoney test = (SqlMoney)TestDecimal2;\r
-                               Fail ("#R02");\r
+                               Assertion.Fail ("#R02");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#R03", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#R03", typeof (OverflowException), e.GetType ());\r
                        }\r
                }\r
             \r
-               public void TestSqlDoubleToSqlMoney()\r
+               [Test]\r
+               public void SqlDoubleToSqlMoney()\r
                {\r
                        SqlDouble TestDouble = new SqlDouble (1E+9);\r
                        SqlDouble TestDouble2 = new SqlDouble (1E+20);\r
                        \r
                        SqlMoney TestMoney = (SqlMoney)TestDouble;\r
-                       AssertEquals ("#S01", 1000000000m, TestMoney.Value);\r
+                       Assertion.AssertEquals ("#S01", 1000000000m, TestMoney.Value);\r
 \r
                        try {\r
                                SqlMoney test = (SqlMoney)TestDouble2;\r
-                               Fail ("#S02");\r
+                               Assertion.Fail ("#S02");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#S03", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#S03", typeof (OverflowException), e.GetType ());\r
                        }\r
                }\r
 \r
+               [Test]\r
                public void SqlMoneyToDecimal()\r
                {\r
-                        AssertEquals ("#T01", (decimal)6464.6464, (decimal)Test1);\r
-                        AssertEquals ("#T02", (decimal)(-45000), (decimal)Test4);\r
+                        Assertion.AssertEquals ("#T01", (decimal)6464.6464, (decimal)Test1);\r
+                        Assertion.AssertEquals ("#T02", (decimal)(-45000), (decimal)Test4);\r
                }\r
 \r
+               [Test]\r
                public void SqlSingleToSqlMoney()\r
                {\r
                        SqlSingle TestSingle = new SqlSingle (1e10);\r
                        SqlSingle TestSingle2 = new SqlSingle (1e20);\r
 \r
-                       AssertEquals ("#U01", 10000000000m, ((SqlMoney)TestSingle).Value);\r
+                       Assertion.AssertEquals ("#U01", 10000000000m, ((SqlMoney)TestSingle).Value);\r
 \r
                        try {\r
                                SqlMoney test = (SqlMoney)TestSingle2;\r
-                               Fail ("#U02");\r
+                               Assertion.Fail ("#U02");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#U03", typeof (OverflowException), e.GetType());\r
+                               Assertion.AssertEquals ("#U03", typeof (OverflowException), e.GetType());\r
                        }\r
                }\r
 \r
-                public void TestSqlStringToSqlMoney()\r
+               [Test]\r
+                public void SqlStringToSqlMoney()\r
                 {\r
                         SqlString TestString = new SqlString ("Test string");\r
                         SqlString TestString100 = new SqlString ("100");\r
 \r
-                        AssertEquals ("#V01", (decimal)100, ((SqlMoney)TestString100).Value);\r
+                        Assertion.AssertEquals ("#V01", (decimal)100, ((SqlMoney)TestString100).Value);\r
 \r
                         try {\r
                                 SqlMoney test = (SqlMoney)TestString;\r
-                                Fail ("#V02");\r
+                                Assertion.Fail ("#V02");\r
                         } catch(Exception e) {\r
-                                AssertEquals ("#V03", typeof (FormatException), e.GetType ());\r
+                                Assertion.AssertEquals ("#V03", typeof (FormatException), e.GetType ());\r
                         }\r
                 }\r
 \r
+               [Test]\r
                public void DecimalToSqlMoney()\r
                {\r
                         decimal TestDecimal = 1e10m;\r
                         decimal TestDecimal2 = 1e20m;\r
-                       AssertEquals ("#W01", 10000000000, ((SqlMoney)TestDecimal).Value);\r
+                       Assertion.AssertEquals ("#W01", 10000000000, ((SqlMoney)TestDecimal).Value);\r
                        \r
                        try {\r
                                SqlMoney test = (SqlMoney)TestDecimal2;\r
-                               Fail ("#W02");\r
+                               Assertion.Fail ("#W02");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#W03", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#W03", typeof (OverflowException), e.GetType ());\r
                        }                       \r
                }\r
 \r
+               [Test]\r
                 public void SqlByteToSqlMoney() \r
                {\r
                         SqlByte TestByte = new SqlByte ((byte)200);               \r
-                       AssertEquals ("#X01", 200m, ((SqlMoney)TestByte).Value);\r
+                       Assertion.AssertEquals ("#X01", 200m, ((SqlMoney)TestByte).Value);\r
                }\r
 \r
+               [Test]\r
                public void IntsToSqlMoney()\r
                {\r
                        SqlInt16 TestInt16 = new SqlInt16 (5000);\r
                        SqlInt32 TestInt32 = new SqlInt32 (5000);\r
                        SqlInt64 TestInt64 = new SqlInt64 (5000);\r
                        \r
-                       AssertEquals ("#Y01", 5000m, ((SqlMoney)TestInt16).Value);\r
-                       AssertEquals ("#Y02", 5000m, ((SqlMoney)TestInt32).Value);\r
-                       AssertEquals ("#Y03", 5000m, ((SqlMoney)TestInt64).Value);\r
+                       Assertion.AssertEquals ("#Y01", 5000m, ((SqlMoney)TestInt16).Value);\r
+                       Assertion.AssertEquals ("#Y02", 5000m, ((SqlMoney)TestInt32).Value);\r
+                       Assertion.AssertEquals ("#Y03", 5000m, ((SqlMoney)TestInt64).Value);\r
 \r
                        try {\r
                                SqlMoney test = (SqlMoney)SqlInt64.MaxValue;\r
-                               Fail ("#Y04");\r
+                               Assertion.Fail ("#Y04");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("#Y05", typeof (OverflowException), e.GetType ());\r
+                               Assertion.AssertEquals ("#Y05", typeof (OverflowException), e.GetType ());\r
                        }\r
                }\r
         }\r
index f714e38d7a17537a3057532b17a9254ce748863f..a64f807f94a62a1a0fb55834840dccfecc0d53dc 100644 (file)
@@ -1,9 +1,12 @@
 //
 // SqlSingleTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlSingle
 //
-// Ville Palo (vi64pa@koti.soon.fi)
+// Authors:
+//   Ville Palo (vi64pa@koti.soon.fi)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
-// (C) Ville Palo 2002
+// (C) 2002 Ville Palo
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -12,59 +15,51 @@ using System.Data.SqlTypes;
 
 namespace MonoTests.System.Data.SqlTypes
 {
-        public class SqlSingleTest : TestCase {
-
-                public SqlSingleTest() : base ("System.Data.SqlTypes.SqlSingle") {}
-                public SqlSingleTest(string name) : base(name) {}
-
-                protected override void TearDown() {}
-
-                protected override void SetUp() {}
-
-                public static ITest Suite {
-                        get {
-                                return new TestSuite(typeof(SqlSingle));
-                        }
-                }
+       [TestFixture]
+        public class SqlSingleTest {
 
                 // Test constructor
-                public void TestCreate()
+               [Test]
+                public void Create()
                 {
                         SqlSingle Test= new SqlSingle ((float)34.87);
                         SqlSingle Test2 = 45.2f;
                         
-                        AssertEquals ("#A01", 34.87f, Test.Value);
-                        AssertEquals ("#A02", 45.2f, Test2.Value);
+                        Assertion.AssertEquals ("#A01", 34.87f, Test.Value);
+                        Assertion.AssertEquals ("#A02", 45.2f, Test2.Value);
 
                         Test = new SqlSingle (-9000.6543);
-                        AssertEquals ("#A03", -9000.6543f, Test.Value);
+                        Assertion.AssertEquals ("#A03", -9000.6543f, Test.Value);
                 }
 
                 // Test public fields
-                public void TestPublicFields()
+               [Test]
+                public void PublicFields()
                 {
-                        AssertEquals ("#B01", 3.40282346638528859E+38f, 
+                        Assertion.AssertEquals ("#B01", 3.40282346638528859E+38f, 
                                      SqlSingle.MaxValue.Value);
-                        AssertEquals ("#B02", -3.40282346638528859E+38f, 
+                        Assertion.AssertEquals ("#B02", -3.40282346638528859E+38f, 
                                      SqlSingle.MinValue.Value);
-                        Assert ("#B03", SqlSingle.Null.IsNull);
-                        AssertEquals ("#B04", 0f, SqlSingle.Zero.Value);
+                        Assertion.Assert ("#B03", SqlSingle.Null.IsNull);
+                        Assertion.AssertEquals ("#B04", 0f, SqlSingle.Zero.Value);
                 }
 
                 // Test properties
-                public void TestProperties()
+               [Test]
+                public void Properties()
                 {
                         SqlSingle Test = new SqlSingle (5443e12f);
                         SqlSingle Test1 = new SqlSingle (1);
 
-                        Assert ("#C01", SqlSingle.Null.IsNull);
-                        AssertEquals ("#C02", 5443e12f, Test.Value);
-                        AssertEquals ("#C03", (float)1, Test1.Value);
+                        Assertion.Assert ("#C01", SqlSingle.Null.IsNull);
+                        Assertion.AssertEquals ("#C02", 5443e12f, Test.Value);
+                        Assertion.AssertEquals ("#C03", (float)1, Test1.Value);
                 }
 
                 // PUBLIC METHODS
 
-                public void TestArithmeticMethods()
+               [Test]
+                public void ArithmeticMethods()
                 {
                         SqlSingle Test0 = new SqlSingle (0);
                         SqlSingle Test1 = new SqlSingle (15E+18);
@@ -74,56 +69,57 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlSingle TestMax = new SqlSingle (SqlSingle.MaxValue.Value);
 
                         // Add()
-                        AssertEquals ("#D01A", 15E+18f, SqlSingle.Add (Test1, Test0).Value);
-                        AssertEquals ("#D02A", 1.5E+19f, SqlSingle.Add (Test1, Test2).Value);
+                        Assertion.AssertEquals ("#D01A", 15E+18f, SqlSingle.Add (Test1, Test0).Value);
+                        Assertion.AssertEquals ("#D02A", 1.5E+19f, SqlSingle.Add (Test1, Test2).Value);
 
                         try {                    
                                 SqlSingle test = SqlSingle.Add (SqlSingle.MaxValue, 
                                                         SqlSingle.MaxValue);
-                                Fail ("#D03A");
+                                Assertion.Fail ("#D03A");
                         } catch (Exception e) {
-                                AssertEquals ("#D04A", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D04A", typeof (OverflowException), e.GetType ());
                         }
                         
                         // Divide()
-                        AssertEquals ("#D01B", (SqlSingle)3, SqlSingle.Divide (Test1, Test4));
-                        AssertEquals ("#D02B", -1.3E-23f, SqlSingle.Divide (Test2, Test3).Value);
+                        Assertion.AssertEquals ("#D01B", (SqlSingle)3, SqlSingle.Divide (Test1, Test4));
+                        Assertion.AssertEquals ("#D02B", -1.3E-23f, SqlSingle.Divide (Test2, Test3).Value);
 
                         try {
                                 SqlSingle test = SqlSingle.Divide(Test1, Test0).Value;
-                                Fail ("#D03B");
+                                Assertion.Fail ("#D03B");
                         } catch(Exception e) {
-                                AssertEquals ("#D04B", typeof (DivideByZeroException), 
+                                Assertion.AssertEquals ("#D04B", typeof (DivideByZeroException), 
                                              e.GetType ());
                         }
 
                        // Multiply()
-                        AssertEquals ("#D01D", (float)(7.5E+37), 
+                        Assertion.AssertEquals ("#D01D", (float)(7.5E+37), 
                                      SqlSingle.Multiply (Test1, Test4).Value);
-                        AssertEquals ("#D02D", (float)0, SqlSingle.Multiply (Test1, Test0).Value);
+                        Assertion.AssertEquals ("#D02D", (float)0, SqlSingle.Multiply (Test1, Test0).Value);
 
                         try {
                                 SqlSingle test = SqlSingle.Multiply (TestMax, Test1);
-                                Fail ("#D03D");
+                                Assertion.Fail ("#D03D");
                         } catch (Exception e) {
-                                AssertEquals ("#D04D", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D04D", typeof (OverflowException), e.GetType ());
                         }
                                 
 
                         // Subtract()
-                        AssertEquals ("#D01F", (float)(-5E+30), 
+                        Assertion.AssertEquals ("#D01F", (float)(-5E+30), 
                                      SqlSingle.Subtract (Test1, Test3).Value);
 
                         try {
                                 SqlSingle test = SqlSingle.Subtract(
                                        SqlSingle.MinValue, SqlSingle.MaxValue);
-                                Fail ("D02F");
+                                Assertion.Fail ("D02F");
                         } catch (Exception e) {                        
-                                AssertEquals ("#D03F", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#D03F", typeof (OverflowException), e.GetType ());
                         }                      
                 }
 
-                public void TestCompareTo()
+               [Test]
+                public void CompareTo()
                 {
                         SqlSingle Test1 = new SqlSingle (4E+30);
                         SqlSingle Test11 = new SqlSingle (4E+30);
@@ -131,129 +127,137 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlSingle Test3 = new SqlSingle (10000);
                         SqlString TestString = new SqlString ("This is a test");
 
-                        Assert ("#E01", Test1.CompareTo (Test3) > 0);
-                        Assert ("#E02", Test2.CompareTo (Test3) < 0);
-                        Assert ("#E03", Test1.CompareTo (Test11) == 0);
-                        Assert ("#E04", Test11.CompareTo (SqlSingle.Null) > 0);
+                        Assertion.Assert ("#E01", Test1.CompareTo (Test3) > 0);
+                        Assertion.Assert ("#E02", Test2.CompareTo (Test3) < 0);
+                        Assertion.Assert ("#E03", Test1.CompareTo (Test11) == 0);
+                        Assertion.Assert ("#E04", Test11.CompareTo (SqlSingle.Null) > 0);
 
                         try {
                                 Test1.CompareTo (TestString);
-                                Fail("#E05");
+                                Assertion.Fail("#E05");
                         } catch(Exception e) {
-                                AssertEquals ("#E06", typeof (ArgumentException), e.GetType ());
+                                Assertion.AssertEquals ("#E06", typeof (ArgumentException), e.GetType ());
                         }
                 }
 
-                public void TestEqualsMethods()
+               [Test]
+                public void EqualsMethods()
                 {
                         SqlSingle Test0 = new SqlSingle (0);
                         SqlSingle Test1 = new SqlSingle (1.58e30);
                         SqlSingle Test2 = new SqlSingle (1.8e32);
                         SqlSingle Test22 = new SqlSingle (1.8e32);
 
-                        Assert ("#F01", !Test0.Equals (Test1));
-                        Assert ("#F02", !Test1.Equals (Test2));
-                        Assert ("#F03", !Test2.Equals (new SqlString ("TEST")));
-                        Assert ("#F04", Test2.Equals (Test22));
+                        Assertion.Assert ("#F01", !Test0.Equals (Test1));
+                        Assertion.Assert ("#F02", !Test1.Equals (Test2));
+                        Assertion.Assert ("#F03", !Test2.Equals (new SqlString ("TEST")));
+                        Assertion.Assert ("#F04", Test2.Equals (Test22));
 
                         // Static Equals()-method
-                        Assert ("#F05", SqlSingle.Equals (Test2, Test22).Value);
-                        Assert ("#F06", !SqlSingle.Equals (Test1, Test2).Value);
+                        Assertion.Assert ("#F05", SqlSingle.Equals (Test2, Test22).Value);
+                        Assertion.Assert ("#F06", !SqlSingle.Equals (Test1, Test2).Value);
                 }
 
-                public void TestGetHashCode()
+               [Test]
+                public void GetHashCodeTest()
                 {
                         SqlSingle Test15 = new SqlSingle (15);
 
                         // FIXME: Better way to test HashCode
-                        AssertEquals ("#G01", Test15.GetHashCode (), Test15.GetHashCode ());
+                        Assertion.AssertEquals ("#G01", Test15.GetHashCode (), Test15.GetHashCode ());
                 }
 
-                public void TestGetType()
+               [Test]
+                public void GetTypeTest()
                 {
                         SqlSingle Test = new SqlSingle (84);
-                        AssertEquals ("#H01", "System.Data.SqlTypes.SqlSingle", 
+                        Assertion.AssertEquals ("#H01", "System.Data.SqlTypes.SqlSingle", 
                                      Test.GetType ().ToString ());
-                        AssertEquals ("#H02", "System.Single", Test.Value.GetType ().ToString ());
+                        Assertion.AssertEquals ("#H02", "System.Single", Test.Value.GetType ().ToString ());
                 }
 
-                public void TestGreaters()
+               [Test]
+                public void Greaters()
                 {
                         SqlSingle Test1 = new SqlSingle (1e10);
                         SqlSingle Test11 = new SqlSingle (1e10);
                         SqlSingle Test2 = new SqlSingle (64e14);
 
                         // GreateThan ()
-                        Assert ("#I01", !SqlSingle.GreaterThan (Test1, Test2).Value);
-                        Assert ("#I02", SqlSingle.GreaterThan (Test2, Test1).Value);
-                        Assert ("#I03", !SqlSingle.GreaterThan (Test1, Test11).Value);
+                        Assertion.Assert ("#I01", !SqlSingle.GreaterThan (Test1, Test2).Value);
+                        Assertion.Assert ("#I02", SqlSingle.GreaterThan (Test2, Test1).Value);
+                        Assertion.Assert ("#I03", !SqlSingle.GreaterThan (Test1, Test11).Value);
 
                         // GreaterTharOrEqual ()
-                        Assert ("#I04", !SqlSingle.GreaterThanOrEqual (Test1, Test2).Value);
-                        Assert ("#I05", SqlSingle.GreaterThanOrEqual (Test2, Test1).Value);
-                        Assert ("#I06", SqlSingle.GreaterThanOrEqual (Test1, Test11).Value);
+                        Assertion.Assert ("#I04", !SqlSingle.GreaterThanOrEqual (Test1, Test2).Value);
+                        Assertion.Assert ("#I05", SqlSingle.GreaterThanOrEqual (Test2, Test1).Value);
+                        Assertion.Assert ("#I06", SqlSingle.GreaterThanOrEqual (Test1, Test11).Value);
                 }
 
-                public void TestLessers()
+               [Test]
+                public void Lessers()
                 {
                         SqlSingle Test1 = new SqlSingle(1.8e10);
                         SqlSingle Test11 = new SqlSingle (1.8e10);
                         SqlSingle Test2 = new SqlSingle (64e14);
 
                         // LessThan()
-                        Assert ("#J01", !SqlSingle.LessThan (Test1, Test11).Value);
-                        Assert ("#J02", !SqlSingle.LessThan (Test2, Test1).Value);
-                        Assert ("#J03", SqlSingle.LessThan (Test11, Test2).Value);
+                        Assertion.Assert ("#J01", !SqlSingle.LessThan (Test1, Test11).Value);
+                        Assertion.Assert ("#J02", !SqlSingle.LessThan (Test2, Test1).Value);
+                        Assertion.Assert ("#J03", SqlSingle.LessThan (Test11, Test2).Value);
 
                         // LessThanOrEqual ()
-                        Assert ("#J04", SqlSingle.LessThanOrEqual (Test1, Test2).Value);
-                        Assert ("#J05", !SqlSingle.LessThanOrEqual (Test2, Test1).Value);
-                        Assert ("#J06", SqlSingle.LessThanOrEqual (Test11, Test1).Value);
-                        Assert ("#J07", SqlSingle.LessThanOrEqual (Test11, SqlSingle.Null).IsNull);
+                        Assertion.Assert ("#J04", SqlSingle.LessThanOrEqual (Test1, Test2).Value);
+                        Assertion.Assert ("#J05", !SqlSingle.LessThanOrEqual (Test2, Test1).Value);
+                        Assertion.Assert ("#J06", SqlSingle.LessThanOrEqual (Test11, Test1).Value);
+                        Assertion.Assert ("#J07", SqlSingle.LessThanOrEqual (Test11, SqlSingle.Null).IsNull);
                 }
 
-                public void TestNotEquals()
+               [Test]
+                public void NotEquals()
                 {
                         SqlSingle Test1 = new SqlSingle (12800000000001);
                         SqlSingle Test2 = new SqlSingle (128e10);
                         SqlSingle Test22 = new SqlSingle (128e10);
 
-                        Assert ("#K01", SqlSingle.NotEquals (Test1, Test2).Value);
-                        Assert ("#K02", SqlSingle.NotEquals (Test2, Test1).Value);
-                        Assert ("#K03", SqlSingle.NotEquals (Test22, Test1).Value);
-                        Assert ("#K04", !SqlSingle.NotEquals (Test22, Test2).Value);
-                        Assert ("#K05", !SqlSingle.NotEquals (Test2, Test22).Value);
-                        Assert ("#K06", SqlSingle.NotEquals (SqlSingle.Null, Test22).IsNull);
-                        Assert ("#K07", SqlSingle.NotEquals (SqlSingle.Null, Test22).IsNull);
+                        Assertion.Assert ("#K01", SqlSingle.NotEquals (Test1, Test2).Value);
+                        Assertion.Assert ("#K02", SqlSingle.NotEquals (Test2, Test1).Value);
+                        Assertion.Assert ("#K03", SqlSingle.NotEquals (Test22, Test1).Value);
+                        Assertion.Assert ("#K04", !SqlSingle.NotEquals (Test22, Test2).Value);
+                        Assertion.Assert ("#K05", !SqlSingle.NotEquals (Test2, Test22).Value);
+                        Assertion.Assert ("#K06", SqlSingle.NotEquals (SqlSingle.Null, Test22).IsNull);
+                        Assertion.Assert ("#K07", SqlSingle.NotEquals (SqlSingle.Null, Test22).IsNull);
                 }
 
-                public void TestParse()
+               [Test]
+                public void Parse()
                 {
                         try {
                                 SqlSingle.Parse (null);
-                                Fail ("#L01");
+                                Assertion.Fail ("#L01");
                         } catch (Exception e) {
-                                AssertEquals ("#L02", typeof (ArgumentNullException), e.GetType ());
+                                Assertion.AssertEquals ("#L02", typeof (ArgumentNullException), e.GetType ());
                         }
 
                         try {
                                 SqlSingle.Parse ("not-a-number");
-                                Fail ("#L03");
+                                Assertion.Fail ("#L03");
                         } catch (Exception e) {
-                                AssertEquals ("#L04", typeof (FormatException), e.GetType ());
+                                Assertion.AssertEquals ("#L04", typeof (FormatException), e.GetType ());
                         }
 
                          try {
                                 SqlSingle.Parse ("9e44");
-                                Fail ("#L05");
+                                Assertion.Fail ("#L05");
                         } catch (Exception e) {
-                                AssertEquals ("#L06", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#L06", typeof (OverflowException), e.GetType ());
                         }
 
-                        AssertEquals("#L07", (float)150, SqlSingle.Parse ("150").Value);
+                        Assertion.AssertEquals("#L07", (float)150, SqlSingle.Parse ("150").Value);
                 }
 
-                public void TestConversions()
+               [Test]
+                public void Conversions()
                 {
                         SqlSingle Test0 = new SqlSingle (0);
                         SqlSingle Test1 = new SqlSingle (250);
@@ -262,91 +266,92 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlSingle TestNull = SqlSingle.Null;
 
                         // ToSqlBoolean ()
-                        Assert ("#M01A", Test1.ToSqlBoolean ().Value);
-                        Assert ("#M02A", !Test0.ToSqlBoolean ().Value);
-                        Assert ("#M03A", TestNull.ToSqlBoolean ().IsNull);
+                        Assertion.Assert ("#M01A", Test1.ToSqlBoolean ().Value);
+                        Assertion.Assert ("#M02A", !Test0.ToSqlBoolean ().Value);
+                        Assertion.Assert ("#M03A", TestNull.ToSqlBoolean ().IsNull);
 
                         // ToSqlByte ()
-                        AssertEquals ("#M01B", (byte)250, Test1.ToSqlByte ().Value);
-                        AssertEquals ("#M02B", (byte)0, Test0.ToSqlByte ().Value);
+                        Assertion.AssertEquals ("#M01B", (byte)250, Test1.ToSqlByte ().Value);
+                        Assertion.AssertEquals ("#M02B", (byte)0, Test0.ToSqlByte ().Value);
 
                         try {
                                 SqlByte b = (byte)Test2.ToSqlByte ();
-                                Fail ("#M03B");
+                                Assertion.Fail ("#M03B");
                         } catch (Exception e) {
-                                AssertEquals ("#M04B", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04B", typeof (OverflowException), e.GetType ());
                         }
 
                         // ToSqlDecimal ()
-                        AssertEquals ("#M01C", (decimal)250, Test1.ToSqlDecimal ().Value);
-                        AssertEquals ("#M02C", (decimal)0, Test0.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("#M01C", (decimal)250, Test1.ToSqlDecimal ().Value);
+                        Assertion.AssertEquals ("#M02C", (decimal)0, Test0.ToSqlDecimal ().Value);
 
                         try {
                                 SqlDecimal test = Test3.ToSqlDecimal ().Value;
-                                Fail ("#M03C");
+                                Assertion.Fail ("#M03C");
                         } catch (Exception e) {
-                                AssertEquals ("#M04C", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04C", typeof (OverflowException), e.GetType ());
                         }      
 
                         // ToSqlInt16 ()
-                        AssertEquals ("#M01D", (short)250, Test1.ToSqlInt16 ().Value);
-                        AssertEquals ("#M02D", (short)0, Test0.ToSqlInt16 ().Value);
+                        Assertion.AssertEquals ("#M01D", (short)250, Test1.ToSqlInt16 ().Value);
+                        Assertion.AssertEquals ("#M02D", (short)0, Test0.ToSqlInt16 ().Value);
 
                         try {
                                 SqlInt16 test = Test2.ToSqlInt16().Value;
-                                Fail ("#M03D");
+                                Assertion.Fail ("#M03D");
                         } catch (Exception e) {
-                                AssertEquals ("#M04D", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04D", typeof (OverflowException), e.GetType ());
                         }        
 
                         // ToSqlInt32 ()
-                        AssertEquals ("#M01E", (int)250, Test1.ToSqlInt32 ().Value);
-                        AssertEquals ("#M02E", (int)0, Test0.ToSqlInt32 ().Value);
+                        Assertion.AssertEquals ("#M01E", (int)250, Test1.ToSqlInt32 ().Value);
+                        Assertion.AssertEquals ("#M02E", (int)0, Test0.ToSqlInt32 ().Value);
 
                         try {
                                 SqlInt32 test = Test2.ToSqlInt32 ().Value;
-                                Fail ("#M03E");
+                                Assertion.Fail ("#M03E");
                         } catch (Exception e) { 
-                                AssertEquals ("#M04E", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04E", typeof (OverflowException), e.GetType ());
                         }
 
                         // ToSqlInt64 ()
-                        AssertEquals ("#M01F", (long)250, Test1.ToSqlInt64 ().Value);
-                        AssertEquals ("#M02F", (long)0, Test0.ToSqlInt64 ().Value);
+                        Assertion.AssertEquals ("#M01F", (long)250, Test1.ToSqlInt64 ().Value);
+                        Assertion.AssertEquals ("#M02F", (long)0, Test0.ToSqlInt64 ().Value);
 
                         try {        
                                 SqlInt64 test = Test3.ToSqlInt64 ().Value;
-                                Fail ("#M03F");
+                                Assertion.Fail ("#M03F");
                         } catch (Exception e) {
-                                AssertEquals ("#M04F", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04F", typeof (OverflowException), e.GetType ());
                         }        
 
                         // ToSqlMoney ()
-                        AssertEquals ("#M01G", (decimal)250, Test1.ToSqlMoney ().Value);
-                        AssertEquals ("#M02G", (decimal)0, Test0.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("#M01G", (decimal)250, Test1.ToSqlMoney ().Value);
+                        Assertion.AssertEquals ("#M02G", (decimal)0, Test0.ToSqlMoney ().Value);
 
                         try {
                                 SqlMoney test = Test3.ToSqlMoney ().Value;
-                                Fail ("#M03G");
+                                Assertion.Fail ("#M03G");
                         } catch (Exception e) {
-                                AssertEquals ("#M04G", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#M04G", typeof (OverflowException), e.GetType ());
                         }        
 
 
                         // ToSqlString ()
-                        AssertEquals ("#M01H", "250", Test1.ToSqlString ().Value);
-                        AssertEquals ("#M02H", "0", Test0.ToSqlString ().Value);
-                        AssertEquals ("#M03H", "6,4E+17", Test2.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#M01H", "250", Test1.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#M02H", "0", Test0.ToSqlString ().Value);
+                        Assertion.AssertEquals ("#M03H", "6,4E+17", Test2.ToSqlString ().Value);
 
                         // ToString ()
-                        AssertEquals ("#M01I", "250", Test1.ToString ());
-                        AssertEquals ("#M02I", "0", Test0.ToString ());
-                        AssertEquals ("#M03I", "6,4E+17", Test2.ToString ());
+                        Assertion.AssertEquals ("#M01I", "250", Test1.ToString ());
+                        Assertion.AssertEquals ("#M02I", "0", Test0.ToString ());
+                        Assertion.AssertEquals ("#M03I", "6,4E+17", Test2.ToString ());
                 }
 
                 // OPERATORS
 
-                public void TestArithmeticOperators()
+               [Test]
+                public void ArithmeticOperators()
                 {
                         SqlSingle Test0 = new SqlSingle (0);
                         SqlSingle Test1 = new SqlSingle (24E+11);
@@ -356,53 +361,54 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlSingle Test5 = new SqlSingle (2E+10);
 
                         // "+"-operator
-                        AssertEquals ("#N01", (SqlSingle)3E+10, Test4 + Test5);
+                        Assertion.AssertEquals ("#N01", (SqlSingle)3E+10, Test4 + Test5);
      
                         try {
                                 SqlSingle test = SqlSingle.MaxValue + SqlSingle.MaxValue;
-                                Fail ("#N02");
+                                Assertion.Fail ("#N02");
                         } catch (Exception e) {
-                                AssertEquals ("#N03", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#N03", typeof (OverflowException), e.GetType ());
                         }
 
                         try {
                                 SqlSingle test = SqlSingle.MaxValue + SqlSingle.MaxValue;
                         } catch (Exception e) {
-                                AssertEquals ("#N03a", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#N03a", typeof (OverflowException), e.GetType ());
                         }
 
                         // "/"-operator
-                        AssertEquals ("#N04", (SqlSingle)2, Test1 / Test3);
+                        Assertion.AssertEquals ("#N04", (SqlSingle)2, Test1 / Test3);
 
                         try {
                                 SqlSingle test = Test3 / Test0;
-                                Fail ("#N05");
+                                Assertion.Fail ("#N05");
                         } catch (Exception e) {
-                                AssertEquals ("#N06", typeof (DivideByZeroException), e.GetType ());
+                                Assertion.AssertEquals ("#N06", typeof (DivideByZeroException), e.GetType ());
                         }
 
                         // "*"-operator
-                        AssertEquals ("#N07", (SqlSingle)2E+20, Test4 * Test5);
+                        Assertion.AssertEquals ("#N07", (SqlSingle)2E+20, Test4 * Test5);
 
                         try {
                                 SqlSingle test = SqlSingle.MaxValue * Test1;
-                                Fail ("#N08");
+                                Assertion.Fail ("#N08");
                         } catch (Exception e) {
-                                AssertEquals ("#N09", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#N09", typeof (OverflowException), e.GetType ());
                         }
 
                         // "-"-operator
-                        AssertEquals ("#N10", (SqlSingle)12e11, Test1 - Test3);
+                        Assertion.AssertEquals ("#N10", (SqlSingle)12e11, Test1 - Test3);
 
                         try {
                                 SqlSingle test = SqlSingle.MinValue - SqlSingle.MaxValue;
-                                Fail ("#N11");
+                                Assertion.Fail ("#N11");
                         } catch  (Exception e) {
-                                AssertEquals ("#N12", typeof (OverflowException), e.GetType ());
+                                Assertion.AssertEquals ("#N12", typeof (OverflowException), e.GetType ());
                         }
                 }
 
-                public void TestThanOrEqualOperators()
+               [Test]
+                public void ThanOrEqualOperators()
                 {
                         SqlSingle Test1 = new SqlSingle (1.0E+14f);
                         SqlSingle Test2 = new SqlSingle (9.7E+11);
@@ -410,130 +416,139 @@ namespace MonoTests.System.Data.SqlTypes
                         SqlSingle Test3 = new SqlSingle (2.0E+22f);
 
                         // == -operator
-                        Assert ("#O01", (Test2 == Test22).Value);
-                        Assert ("#O02", !(Test1 == Test2).Value);
-                        Assert ("#O03", (Test1 == SqlSingle.Null).IsNull);
+                        Assertion.Assert ("#O01", (Test2 == Test22).Value);
+                        Assertion.Assert ("#O02", !(Test1 == Test2).Value);
+                        Assertion.Assert ("#O03", (Test1 == SqlSingle.Null).IsNull);
                         
                         // != -operator
-                        Assert ("#O04", !(Test2 != Test22).Value);
-                        Assert ("#O05", (Test2 != Test3).Value);
-                        Assert ("#O06", (Test1 != Test3).Value);
-                        Assert ("#O07", (Test1 != SqlSingle.Null).IsNull);
+                        Assertion.Assert ("#O04", !(Test2 != Test22).Value);
+                        Assertion.Assert ("#O05", (Test2 != Test3).Value);
+                        Assertion.Assert ("#O06", (Test1 != Test3).Value);
+                        Assertion.Assert ("#O07", (Test1 != SqlSingle.Null).IsNull);
 
                         // > -operator
-                        Assert ("#O08", (Test1 > Test2).Value);
-                        Assert ("#O09", !(Test1 > Test3).Value);
-                        Assert ("#O10", !(Test2 > Test22).Value);
-                        Assert ("#O11", (Test1 > SqlSingle.Null).IsNull);
+                        Assertion.Assert ("#O08", (Test1 > Test2).Value);
+                        Assertion.Assert ("#O09", !(Test1 > Test3).Value);
+                        Assertion.Assert ("#O10", !(Test2 > Test22).Value);
+                        Assertion.Assert ("#O11", (Test1 > SqlSingle.Null).IsNull);
 
                         // >=  -operator
-                        Assert ("#O12", !(Test1 >= Test3).Value);
-                        Assert ("#O13", (Test3 >= Test1).Value);
-                        Assert ("#O14", (Test2 >= Test22).Value);
-                        Assert ("#O15", (Test1 >= SqlSingle.Null).IsNull);
+                        Assertion.Assert ("#O12", !(Test1 >= Test3).Value);
+                        Assertion.Assert ("#O13", (Test3 >= Test1).Value);
+                        Assertion.Assert ("#O14", (Test2 >= Test22).Value);
+                        Assertion.Assert ("#O15", (Test1 >= SqlSingle.Null).IsNull);
 
                         // < -operator
-                        Assert ("#O16", !(Test1 < Test2).Value);
-                        Assert ("#O17", (Test1 < Test3).Value);
-                        Assert ("#O18", !(Test2 < Test22).Value);
-                        Assert ("#O19", (Test1 < SqlSingle.Null).IsNull);
+                        Assertion.Assert ("#O16", !(Test1 < Test2).Value);
+                        Assertion.Assert ("#O17", (Test1 < Test3).Value);
+                        Assertion.Assert ("#O18", !(Test2 < Test22).Value);
+                        Assertion.Assert ("#O19", (Test1 < SqlSingle.Null).IsNull);
 
                         // <= -operator
-                        Assert ("#O20", (Test1 <= Test3).Value);
-                        Assert ("#O21", !(Test3 <= Test1).Value);
-                        Assert ("#O22", (Test2 <= Test22).Value);
-                        Assert ("#O23", (Test1 <= SqlSingle.Null).IsNull);
+                        Assertion.Assert ("#O20", (Test1 <= Test3).Value);
+                        Assertion.Assert ("#O21", !(Test3 <= Test1).Value);
+                        Assertion.Assert ("#O22", (Test2 <= Test22).Value);
+                        Assertion.Assert ("#O23", (Test1 <= SqlSingle.Null).IsNull);
                 }
 
-                public void TestUnaryNegation()
+               [Test]
+                public void UnaryNegation()
                 {
                         SqlSingle Test = new SqlSingle (2000000001);
                         SqlSingle TestNeg = new SqlSingle (-3000);
 
                         SqlSingle Result = -Test;
-                        AssertEquals ("#P01", (float)(-2000000001), Result.Value);
+                        Assertion.AssertEquals ("#P01", (float)(-2000000001), Result.Value);
 
                         Result = -TestNeg;
-                        AssertEquals ("#P02", (float)3000, Result.Value);
+                        Assertion.AssertEquals ("#P02", (float)3000, Result.Value);
                 }
 
-                public void TestSqlBooleanToSqlSingle()
+               [Test]
+                public void SqlBooleanToSqlSingle()
                 {
                         SqlBoolean TestBoolean = new SqlBoolean (true);
                         SqlSingle Result;
 
                         Result = (SqlSingle)TestBoolean;
 
-                        AssertEquals ("#Q01", (float)1, Result.Value);
+                        Assertion.AssertEquals ("#Q01", (float)1, Result.Value);
 
                         Result = (SqlSingle)SqlBoolean.Null;
-                        Assert ("#Q02", Result.IsNull);
+                        Assertion.Assert ("#Q02", Result.IsNull);
                 }
 
-               public void TestSqlDoubleToSqlSingle()
+               [Test]
+               public void SqlDoubleToSqlSingle()
                {
                         SqlDouble Test = new SqlDouble (12e12);
                        SqlSingle TestSqlSingle = (SqlSingle)Test;
-                       AssertEquals ("R01", 12e12f, TestSqlSingle.Value);
+                       Assertion.AssertEquals ("R01", 12e12f, TestSqlSingle.Value);
                }
 
-                public void TestSqlSingleToSingle()
+               [Test]
+                public void SqlSingleToSingle()
                 {
                         SqlSingle Test = new SqlSingle (12e12);
                         Single Result = (Single)Test;
-                        AssertEquals ("#S01", 12e12f, Result);
+                        Assertion.AssertEquals ("#S01", 12e12f, Result);
                 }
 
-                public void TestSqlStringToSqlSingle()
+               [Test]
+                public void SqlStringToSqlSingle()
                 {
                         SqlString TestString = new SqlString ("Test string");
                         SqlString TestString100 = new SqlString ("100");
 
-                        AssertEquals ("#T01", (float)100, ((SqlSingle)TestString100).Value);
+                        Assertion.AssertEquals ("#T01", (float)100, ((SqlSingle)TestString100).Value);
 
                         try {
                                 SqlSingle test = (SqlSingle)TestString;
-                                Fail ("#T02");
+                                Assertion.Fail ("#T02");
                         } catch(Exception e) {
-                                AssertEquals ("#T03", typeof (FormatException), e.GetType ());
+                                Assertion.AssertEquals ("#T03", typeof (FormatException), e.GetType ());
                         }
                 }
 
-                public void TestByteToSqlSingle()
+               [Test]
+                public void ByteToSqlSingle()
                 {
                         short TestShort = 14;
-                        AssertEquals ("#U01", (float)14, ((SqlSingle)TestShort).Value);
+                        Assertion.AssertEquals ("#U01", (float)14, ((SqlSingle)TestShort).Value);
                 }
                 
-                public void TestSqlDecimalToSqlSingle()
+               [Test]
+                public void SqlDecimalToSqlSingle()
                 {
                         SqlDecimal TestDecimal64 = new SqlDecimal (64);
 
-                        AssertEquals ("#V01", (float)64, ((SqlSingle)TestDecimal64).Value);
-                        AssertEquals ("#V02", SqlSingle.Null, ((SqlSingle)SqlDecimal.Null));
+                        Assertion.AssertEquals ("#V01", (float)64, ((SqlSingle)TestDecimal64).Value);
+                        Assertion.AssertEquals ("#V02", SqlSingle.Null, ((SqlSingle)SqlDecimal.Null));
                 }
 
-                public void TestSqlIntToSqlSingle()
+               [Test]
+                public void SqlIntToSqlSingle()
                 {
                         SqlInt16 Test64 = new SqlInt16 (64);
                         SqlInt32 Test640 = new SqlInt32 (640);
                         SqlInt64 Test64000 = new SqlInt64 (64000);
-                        AssertEquals ("#W01", (float)64, ((SqlSingle)Test64).Value);
-                        AssertEquals ("#W02", (float)640, ((SqlSingle)Test640).Value);
-                        AssertEquals ("#W03", (float)64000, ((SqlSingle)Test64000).Value);
+                        Assertion.AssertEquals ("#W01", (float)64, ((SqlSingle)Test64).Value);
+                        Assertion.AssertEquals ("#W02", (float)640, ((SqlSingle)Test640).Value);
+                        Assertion.AssertEquals ("#W03", (float)64000, ((SqlSingle)Test64000).Value);
                 }
 
-
-                public void TestSqlMoneyToSqlSingle()
+               [Test]
+                public void SqlMoneyToSqlSingle()
                 {
                         SqlMoney TestMoney64 = new SqlMoney(64);
-                        AssertEquals ("#X01", (float)64, ((SqlSingle)TestMoney64).Value);
+                        Assertion.AssertEquals ("#X01", (float)64, ((SqlSingle)TestMoney64).Value);
                 }
 
-                public void TestSingleToSqlSingle()
+               [Test]
+                public void SingleToSqlSingle()
                 {
                         Single TestSingle64 = 64;
-                        AssertEquals ("#Y01", (float)64, ((SqlSingle)TestSingle64).Value);
+                        Assertion.AssertEquals ("#Y01", (float)64, ((SqlSingle)TestSingle64).Value);
                 }
         }
 }
index 35206236bd78d8c1cdaec26fc4e3fbaa8542fe78..3bf6b51d2622179a83d5ec1e3c90809f37112816 100644 (file)
@@ -1,8 +1,11 @@
 // SqlStringTest.cs - NUnit Test Cases for System.Data.SqlTypes.SqlString
 //
-// Ville Palo (vi64pa@koti.soon.fi)
+// Authors:
+//   Ville Palo (vi64pa@koti.soon.fi)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
-// (C) Ville Palo 2002
+// (C) 2002 Ville Palo
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -13,628 +16,646 @@ using System.Threading;
 
 namespace MonoTests.System.Data.SqlTypes
 {
-        public class SqlStringTest : TestCase {
+       [TestFixture]
+        public class SqlStringTest {
 
                 private SqlString Test1 = null;
                 private SqlString Test2 = null;
                 private SqlString Test3 = null;
 
-                public SqlStringTest() : base ("System.Data.SqlTypes.SqlString") {}
-                public SqlStringTest(string name) : base(name) {}
+               [SetUp]
+                public void GetReady()
+                {
+                        Test1 = new SqlString ("First TestString");
+                        Test2 = new SqlString ("This is just a test SqlString");
+                        Test3 = new SqlString ("This is just a test SqlString");
+                        Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-AU");
+                }
+
+                // Test constructor
+               [Test]
+                public void Create()
+                {
+
+                        // SqlString (String)
+                        SqlString  TestString = new SqlString ("Test");
+                        Assertion.AssertEquals ("#A01", "Test", TestString.Value);
+
+                        // SqlString (String, int)
+                        TestString = new SqlString ("Test", 2057);
+                        Assertion.AssertEquals ("#A02", 2057, TestString.LCID);
+
+                        // SqlString (int, SqlCompareOptions, byte[])
+                        TestString = new SqlString (2057,
+                                                    SqlCompareOptions.BinarySort|SqlCompareOptions.IgnoreCase,
+                                                    new byte [2] {123, 221});
+                        Assertion.AssertEquals ("#A03", 2057, TestString.CompareInfo.LCID);
+                        
+                        // SqlString(string, int, SqlCompareOptions)
+                        TestString = new SqlString ("Test", 2057, SqlCompareOptions.IgnoreNonSpace);
+                        Assertion.Assert ("#A04", !TestString.IsNull);
+                        
+                        // SqlString (int, SqlCompareOptions, byte[], bool)
+                        TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [4] {100, 100, 200, 45}, true);
+                        Assertion.AssertEquals ("#A05", (byte)63, TestString.GetNonUnicodeBytes () [0]);
+                        TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [2] {113, 100}, false);
+                        Assertion.AssertEquals ("#A06", (String)"qd", TestString.Value);
+                        
+                        // SqlString (int, SqlCompareOptions, byte[], int, int)
+                        TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [2] {113, 100}, 0, 2);
+                        Assertion.Assert ("#A07", !TestString.IsNull);
+
+                        try {
+                                TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [2] {113, 100}, 2, 1);
+                                Assertion.Fail ("#A07b");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#A07c", typeof (ArgumentOutOfRangeException), e.GetType ());
+                        }
+
+                        try {
+                                TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [2] {113, 100}, 0, 4);
+                                Assertion.Fail ("#A07d");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#A07e", typeof (ArgumentOutOfRangeException), e.GetType ());
+                        }
+
+                        // SqlString (int, SqlCompareOptions, byte[], int, int, bool)
+                        TestString = new SqlString (2057, SqlCompareOptions.IgnoreCase, new byte [3] {100, 111, 50}, 1, 2, false);
+                        Assertion.AssertEquals ("#A08", "o2", TestString.Value);
+                        TestString = new SqlString (2057, SqlCompareOptions.IgnoreCase, new byte [3] {123, 111, 222}, 1, 2, true);
+                        Assertion.Assert ("#A09", !TestString.IsNull);                        
+                }
+
+                // Test public fields
+               [Test]
+                public void PublicFields()
+                {
+                        // BinarySort
+                        Assertion.AssertEquals ("#B01", 32768, SqlString.BinarySort);
+                        
+                        // IgnoreCase
+                        Assertion.AssertEquals ("#B02", 1, SqlString.IgnoreCase);
+                                      
+                        // IgnoreKanaType
+                        Assertion.AssertEquals ("#B03", 8, SqlString.IgnoreKanaType);
+
+                        // IgnoreNonSpace
+                        Assertion.AssertEquals ("#B04", 2, SqlString.IgnoreNonSpace);
+                        
+                        // IgnoreWidth
+                        Assertion.AssertEquals ("#B05", 16, SqlString.IgnoreWidth);
+                        
+                        // Null
+                        Assertion.Assert ("#B06", SqlString.Null.IsNull);
+                }
+
+                // Test properties
+               [Test]
+                public void Properties()
+                {
+                        // CompareInfo
+                        Assertion.AssertEquals ("#C01", 3081, Test1.CompareInfo.LCID);
+
+                        // CultureInfo
+                        Assertion.AssertEquals ("#C02", 3081, Test1.CultureInfo.LCID);                
+                        
+                        // IsNull
+                        Assertion.Assert ("#C03", !Test1.IsNull);
+                        Assertion.Assert ("#C04", SqlString.Null.IsNull);
+                        
+                        // LCID
+                        Assertion.AssertEquals ("#C05", 3081, Test1.LCID);
+                        
+                        // SqlCompareOptions
+                        Assertion.AssertEquals ("#C06", "IgnoreCase, IgnoreKanaType, IgnoreWidth", 
+                                      Test1.SqlCompareOptions.ToString ());
+
+                        // Value
+                        Assertion.AssertEquals ("#C07", "First TestString", Test1.Value);
+                }
+
+                // PUBLIC METHODS
+
+               [Test]
+                public void CompareTo()
+                {
+                        SqlByte Test = new SqlByte (1);
+
+                        Assertion.Assert ("#D01", Test1.CompareTo (Test3) < 0);
+                        Assertion.Assert ("#D02", Test2.CompareTo (Test1) > 0);
+                        Assertion.Assert ("#D03", Test2.CompareTo (Test3) == 0);
+                        Assertion.Assert ("#D04", Test3.CompareTo (SqlString.Null) > 0);
+
+                        try {
+                                Test1.CompareTo (Test);
+                                Assertion.Fail("#D05");
+                        } catch(Exception e) {                        
+                                Assertion.AssertEquals ("#D06", typeof (ArgumentException), e.GetType ());
+                        }
+                        
+                        SqlString T1 = new SqlString ("test", 2057, SqlCompareOptions.IgnoreCase);
+                       SqlString T2 = new SqlString ("TEST", 2057, SqlCompareOptions.None);
+                       
+                       try {
+                               T1.CompareTo (T2);
+                               Assertion.Fail ("#D07");
+                       } catch (Exception e) {
+                               Assertion.AssertEquals ("#D08", typeof (SqlTypeException), e.GetType ());
+                       }
+                       
+                       // IgnoreCase
+                       T1 = new SqlString ("test", 2057, SqlCompareOptions.IgnoreCase);
+                       T2 = new SqlString ("TEST", 2057, SqlCompareOptions.IgnoreCase);
+                       Assertion.Assert ("#D09", T2.CompareTo (T1) == 0);
+                
+                       T1 = new SqlString ("test", 2057);
+                       T2 = new SqlString ("TEST", 2057);
+                       Assertion.Assert ("#D10", T2.CompareTo (T1) == 0);
+
+                       T1 = new SqlString ("test", 2057, SqlCompareOptions.None);
+                       T2 = new SqlString ("TEST", 2057, SqlCompareOptions.None);
+                       Assertion.Assert ("#D11", T2.CompareTo (T1) != 0);
+
+                       // IgnoreNonSpace
+                        T1 = new SqlString ("TESTñ", 2057, SqlCompareOptions.IgnoreNonSpace);
+                       T2 = new SqlString ("TESTn", 2057, SqlCompareOptions.IgnoreNonSpace);
+                       Assertion.Assert ("#D12", T2.CompareTo (T1) == 0);
+                
+                       T1 = new SqlString ("TESTñ", 2057, SqlCompareOptions.None);
+                       T2 = new SqlString ("TESTn", 2057, SqlCompareOptions.None);
+                       Assertion.Assert ("#D13", T2.CompareTo (T1) != 0);
+
+                       // BinarySort
+                       T1 = new SqlString ("01_", 2057, SqlCompareOptions.BinarySort);
+                       T2 = new SqlString ("_01", 2057, SqlCompareOptions.BinarySort);
+                       Assertion.Assert ("#D14", T1.CompareTo (T2) < 0);
+                       
+                       T1 = new SqlString ("01_", 2057, SqlCompareOptions.None);
+                       T2 = new SqlString ("_01", 2057, SqlCompareOptions.None);
+                       Assertion.Assert ("#D15", T1.CompareTo (T2) > 0);                       
+                }
+
+               [Test]
+                public void EqualsMethods()
+                {
+                        Assertion.Assert ("#E01", !Test1.Equals (Test2));
+                        Assertion.Assert ("#E02", !Test3.Equals (Test1));
+                        Assertion.Assert ("#E03", !Test2.Equals (new SqlString ("TEST")));
+                        Assertion.Assert ("#E04", Test2.Equals (Test3));
+
+                        // Static Equals()-method
+                        Assertion.Assert ("#E05", SqlString.Equals (Test2, Test3).Value);
+                        Assertion.Assert ("#E06", !SqlString.Equals (Test1, Test2).Value);
+                }
+
+               [Test]
+                public void GetHashCodeTest()
+                {
+                        // FIXME: Better way to test HashCode
+                        Assertion.AssertEquals ("#F01", Test1.GetHashCode (), 
+                                      Test1.GetHashCode ());
+                        Assertion.Assert ("#F02", Test1.GetHashCode () != Test2.GetHashCode ());
+                        Assertion.Assert ("#F03", Test2.GetHashCode () == Test2.GetHashCode ());
+                }
+
+               [Test]
+                public void GetTypeTest()
+                {
+                        Assertion.AssertEquals ("#G01", "System.Data.SqlTypes.SqlString", 
+                                      Test1.GetType ().ToString ());
+                        Assertion.AssertEquals ("#G02", "System.String", 
+                                      Test1.Value.GetType ().ToString ());
+                }
+
+               [Test]
+                public void Greaters()
+                {
+
+                        // GreateThan ()
+                        Assertion.Assert ("#H01", !SqlString.GreaterThan (Test1, Test2).Value);
+                        Assertion.Assert ("#H02", SqlString.GreaterThan (Test2, Test1).Value);
+                        Assertion.Assert ("#H03", !SqlString.GreaterThan (Test2, Test3).Value);
+
+                        // GreaterTharOrEqual ()
+                        Assertion.Assert ("#H04", !SqlString.GreaterThanOrEqual (Test1, Test2).Value);
+                        Assertion.Assert ("#H05", SqlString.GreaterThanOrEqual (Test2, Test1).Value);
+                        Assertion.Assert ("#H06", SqlString.GreaterThanOrEqual (Test2, Test3).Value);
+                }
+
+               [Test]
+                public void Lessers()
+                {
+                        // LessThan()
+                        Assertion.Assert ("#I01", !SqlString.LessThan (Test2, Test3).Value);
+                        Assertion.Assert ("#I02", !SqlString.LessThan (Test2, Test1).Value);
+                        Assertion.Assert ("#I03", SqlString.LessThan (Test1, Test2).Value);
+
+                        // LessThanOrEqual ()
+                        Assertion.Assert ("#I04", SqlString.LessThanOrEqual (Test1, Test2).Value);
+                        Assertion.Assert ("#I05", !SqlString.LessThanOrEqual (Test2, Test1).Value);
+                        Assertion.Assert ("#I06", SqlString.LessThanOrEqual (Test3, Test2).Value);
+                        Assertion.Assert ("#I07", SqlString.LessThanOrEqual (Test2, SqlString.Null).IsNull);
+                }
 
-                protected override void TearDown() {}
+               [Test]
+                public void NotEquals()
+                {
+                        Assertion.Assert ("#J01", SqlString.NotEquals (Test1, Test2).Value);
+                        Assertion.Assert ("#J02", SqlString.NotEquals (Test2, Test1).Value);
+                        Assertion.Assert ("#J03", SqlString.NotEquals (Test3, Test1).Value);
+                        Assertion.Assert ("#J04", !SqlString.NotEquals (Test2, Test3).Value);
 
-                protected override void SetUp()
+                        Assertion.Assert ("#J05", SqlString.NotEquals (SqlString.Null, Test3).IsNull);
+                }
+
+               [Test]
+                public void Concat()
                 {
                         Test1 = new SqlString ("First TestString");
                         Test2 = new SqlString ("This is just a test SqlString");
                         Test3 = new SqlString ("This is just a test SqlString");
-                        Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-AU");
+
+                        Assertion.AssertEquals ("#K01", 
+                              (SqlString)"First TestStringThis is just a test SqlString", 
+                              SqlString.Concat (Test1, Test2));
+
+                        Assertion.AssertEquals ("#K02", SqlString.Null, 
+                                      SqlString.Concat (Test1, SqlString.Null));
                 }
 
-                public static ITest Suite {
-                        get {
+               [Test]
+                public void Clone()
+                {
+                        SqlString TestSqlString  = Test1.Clone ();
+                        Assertion.AssertEquals ("#L01", Test1, TestSqlString);
+                }
 
-                                return new TestSuite(typeof(SqlDateTime));
+               [Test]
+                public void CompareOptionsFromSqlCompareOptions()
+                {
+                        Assertion.AssertEquals ("#M01", CompareOptions.IgnoreCase,
+                                    SqlString.CompareOptionsFromSqlCompareOptions (
+                                    SqlCompareOptions.IgnoreCase));
+                        Assertion.AssertEquals ("#M02", CompareOptions.IgnoreCase,
+                                    SqlString.CompareOptionsFromSqlCompareOptions (
+                                    SqlCompareOptions.IgnoreCase));
+                        try {
+                                
+                                CompareOptions test = SqlString.CompareOptionsFromSqlCompareOptions (
+                                    SqlCompareOptions.BinarySort);
+                                Assertion.Fail ("#M03");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#M04", typeof (ArgumentOutOfRangeException), e.GetType ());
+                        }
+                }
+
+               [Test]
+                public void UnicodeBytes()
+                {
+                        Assertion.AssertEquals ("#N01", (byte)105, Test1.GetNonUnicodeBytes () [1]);
+                        Assertion.AssertEquals ("#N02", (byte)32, Test1.GetNonUnicodeBytes () [5]);
+
+                        Assertion.AssertEquals ("#N03", (byte)70, Test1.GetUnicodeBytes () [0]);
+                        Assertion.AssertEquals ("#N03b", (byte)70, Test1.GetNonUnicodeBytes () [0]);
+                        Assertion.AssertEquals ("#N03c", (byte)0, Test1.GetUnicodeBytes () [1]);
+                        Assertion.AssertEquals ("#N03d", (byte)105, Test1.GetNonUnicodeBytes () [1]);
+                        Assertion.AssertEquals ("#N03e", (byte)105, Test1.GetUnicodeBytes () [2]);
+                        Assertion.AssertEquals ("#N03f", (byte)114, Test1.GetNonUnicodeBytes () [2]);
+                        Assertion.AssertEquals ("#N03g", (byte)0, Test1.GetUnicodeBytes () [3]);
+                        Assertion.AssertEquals ("#N03h", (byte)115, Test1.GetNonUnicodeBytes () [3]);
+                        Assertion.AssertEquals ("#N03i", (byte)114, Test1.GetUnicodeBytes () [4]);
+                        Assertion.AssertEquals ("#N03j", (byte)116, Test1.GetNonUnicodeBytes () [4]);
 
+                        Assertion.AssertEquals ("#N04", (byte)105, Test1.GetUnicodeBytes () [2]);
+
+                        try {
+                                byte test = Test1.GetUnicodeBytes () [105];
+                                Assertion.Fail ("#N05");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#N06", typeof (IndexOutOfRangeException), e.GetType());                                
                         }
+                }
+                      
+               [Test]          
+                public void Conversions()
+                {
+
+                        SqlString String250 = new SqlString ("250");
+                        SqlString String9E300 = new SqlString ("9E+300");
 
+                        // ToSqlBoolean ()
+        
+                        try {
+                                bool test = Test1.ToSqlBoolean ().Value;                              
+                                Assertion.Fail ("#01");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#01.5", typeof (FormatException), e.GetType());                                                                
+                        }
+                        
+                        Assertion.Assert ("#O02", (new SqlString("1")).ToSqlBoolean ().Value);
+                        Assertion.Assert ("#O03", !(new SqlString("0")).ToSqlBoolean ().Value);
+                        Assertion.Assert ("#O04", (new SqlString("True")).ToSqlBoolean ().Value);
+                        Assertion.Assert ("#O05", !(new SqlString("FALSE")).ToSqlBoolean ().Value);
+                        Assertion.Assert ("#O06", SqlString.Null.ToSqlBoolean ().IsNull);
+
+                        // ToSqlByte ()
+                        try {
+                                byte test = Test1.ToSqlByte ().Value;
+                                Assertion.Fail ("#07");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O07.5", typeof (FormatException), e.GetType());    
+                        }
+
+                        Assertion.AssertEquals ("#O08", (byte)250, String250.ToSqlByte ().Value);    
+                        try {
+                                SqlByte b = (byte)(new SqlString ("2500")).ToSqlByte ();
+                                Assertion.Fail ("#O09");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O10", typeof (OverflowException), e.GetType ());
+                        }
+
+                        // ToSqlDateTime
+                        Assertion.AssertEquals ("#O11", 10, 
+                                      (new SqlString ("2002-10-10")).ToSqlDateTime ().Value.Day);
+                        
+                        // ToSqlDecimal ()
+                        try {
+                                Assertion.AssertEquals ("#O13", (decimal)250, Test1.ToSqlDecimal ().Value);
+                                Assertion.Fail ("#O14");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O15", typeof (FormatException), e.GetType ());
+                        }
+
+                        Assertion.AssertEquals ("#O16", (decimal)250, String250.ToSqlDecimal ().Value);
+
+                        try {
+                                SqlDecimal test = String9E300.ToSqlDecimal ().Value;
+                                Assertion.Fail ("#O17");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O18", typeof (FormatException), e.GetType ());
+                        }      
+
+                        // ToSqlDouble
+                        Assertion.AssertEquals ("#O19", (SqlDouble)9E+300, String9E300.ToSqlDouble ());
+
+                        try {
+                                SqlDouble test = (new SqlString ("4e400")).ToSqlDouble ();
+                                Assertion.Fail ("#O20");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O21", typeof (OverflowException), e.GetType ());
+                        }
+
+                        // ToSqlGuid
+                        SqlString TestGuid = new SqlString("11111111-1111-1111-1111-111111111111");
+                        Assertion.AssertEquals ("#O22", new SqlGuid("11111111-1111-1111-1111-111111111111"), TestGuid.ToSqlGuid ());
+
+                        try {
+                                SqlGuid test = String9E300.ToSqlGuid ();
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O23", typeof (FormatException), e.GetType ());
+                        }
+                        
+                        // ToSqlInt16 ()
+                        Assertion.AssertEquals ("#O24", (short)250, String250.ToSqlInt16 ().Value);
+
+                        try {
+                                SqlInt16 test = String9E300.ToSqlInt16().Value;
+                                Assertion.Fail ("#O25");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O26", typeof (FormatException), e.GetType ());
+                        }        
+
+                        // ToSqlInt32 ()
+                        Assertion.AssertEquals ("#O27", (int)250, String250.ToSqlInt32 ().Value);
+
+                        try {
+                                SqlInt32 test = String9E300.ToSqlInt32 ().Value;
+                                Assertion.Fail ("#O28");
+                        } catch (Exception e) { 
+                                Assertion.AssertEquals ("#O29", typeof (FormatException), e.GetType ());
+                        }
+
+                        try {
+                                SqlInt32 test = Test1.ToSqlInt32 ().Value;
+                                Assertion.Fail ("#O30");
+                        } catch (Exception e) { 
+                                Assertion.AssertEquals ("#O31", typeof (FormatException), e.GetType ());
+                        }
+
+                        // ToSqlInt64 ()
+                        Assertion.AssertEquals ("#O32", (long)250, String250.ToSqlInt64 ().Value);
+
+                        try {        
+                                SqlInt64 test = String9E300.ToSqlInt64 ().Value;
+                                Assertion.Fail ("#O33");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O34", typeof (FormatException), e.GetType ());
+                        }        
+
+                        // ToSqlMoney ()
+                        Assertion.AssertEquals ("#O35", (decimal)250, String250.ToSqlMoney ().Value);
+
+                        try {
+                                SqlMoney test = String9E300.ToSqlMoney ().Value;
+                                Assertion.Fail ("#O36");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O37", typeof (FormatException), e.GetType ());
+                        }        
+
+                        // ToSqlSingle ()
+                        Assertion.AssertEquals ("#O38", (float)250, String250.ToSqlSingle ().Value);
+
+                        try {
+                                SqlSingle test = String9E300.ToSqlSingle().Value;
+                                Assertion.Fail ("#O39");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#O40", typeof (OverflowException), e.GetType ());
+                        }        
+
+                        // ToString ()
+                        Assertion.AssertEquals ("#O41", "First TestString", Test1.ToString ());
                 }
 
-                // Test constructor
-                public void TestCreate()
+                // OPERATORS
+
+               [Test]
+                public void ArithmeticOperators()
                 {
+                        SqlString TestString = new SqlString ("...Testing...");
+                        Assertion.AssertEquals ("#P01", (SqlString)"First TestString...Testing...",
+                                      Test1 + TestString);
+                        Assertion.AssertEquals ("#P02", SqlString.Null,
+                                      Test1 + SqlString.Null);
+                }
+
+               [Test]
+                public void ThanOrEqualOperators()
+                {
+                        // == -operator
+                        Assertion.Assert ("#Q01", (Test2 == Test3).Value);
+                        Assertion.Assert ("#Q02", !(Test1 == Test2).Value);
+                        Assertion.Assert ("#Q03", (Test1 == SqlString.Null).IsNull);
+                        
+                        // != -operator
+                        Assertion.Assert ("#Q04", !(Test3 != Test2).Value);
+                        Assertion.Assert ("#Q05", !(Test2 != Test3).Value);
+                        Assertion.Assert ("#Q06", (Test1 != Test3).Value);
+                        Assertion.Assert ("#Q07", (Test1 != SqlString.Null).IsNull);
+
+                        // > -operator
+                        Assertion.Assert ("#Q08", (Test2 > Test1).Value);
+                        Assertion.Assert ("#Q09", !(Test1 > Test3).Value);
+                        Assertion.Assert ("#Q10", !(Test2 > Test3).Value);
+                        Assertion.Assert ("#Q11", (Test1 > SqlString.Null).IsNull);
+
+                        // >=  -operator
+                        Assertion.Assert ("#Q12", !(Test1 >= Test3).Value);
+                        Assertion.Assert ("#Q13", (Test3 >= Test1).Value);
+                        Assertion.Assert ("#Q14", (Test2 >= Test3).Value);
+                        Assertion.Assert ("#Q15", (Test1 >= SqlString.Null).IsNull);
+
+                        // < -operator
+                        Assertion.Assert ("#Q16", (Test1 < Test2).Value);
+                        Assertion.Assert ("#Q17", (Test1 < Test3).Value);
+                        Assertion.Assert ("#Q18", !(Test2 < Test3).Value);
+                        Assertion.Assert ("#Q19", (Test1 < SqlString.Null).IsNull);
+
+                        // <= -operator
+                        Assertion.Assert ("#Q20", (Test1 <= Test3).Value);
+                        Assertion.Assert ("#Q21", !(Test3 <= Test1).Value);
+                        Assertion.Assert ("#Q22", (Test2 <= Test3).Value);
+                        Assertion.Assert ("#Q23", (Test1 <= SqlString.Null).IsNull);
+                }
+
+               [Test]
+                public void SqlBooleanToSqlString()
+                {
+                        SqlBoolean TestBoolean = new SqlBoolean (true);
+                        SqlBoolean TestBoolean2 = new SqlBoolean (false);
+                        SqlString Result;
+
+                        Result = (SqlString)TestBoolean;
+                        Assertion.AssertEquals ("#R01", "True", Result.Value);
+                        
+                        Result = (SqlString)TestBoolean2;
+                        Assertion.AssertEquals ("#R02", "False", Result.Value);
+                        
+                        Result = (SqlString)SqlBoolean.Null;
+                        Assertion.Assert ("#R03", Result.IsNull);
+                }
+
+               [Test]
+                public void SqlByteToBoolean()
+                {
+                        SqlByte TestByte = new SqlByte (250);
+                        Assertion.AssertEquals ("#S01", "250", ((SqlString)TestByte).Value);
+                        try {
+                                SqlString test = ((SqlString)SqlByte.Null).Value;
+                                Assertion.Fail ("#S02");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#S03", typeof (SqlNullValueException), e.GetType ());
+                        }
+                }
+
+               [Test]
+                public void SqlDateTimeToSqlString()
+                {                        
+                        Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-AU");
+                        SqlDateTime TestTime = new SqlDateTime(2002, 10, 22, 9, 52, 30);
+                        Assertion.AssertEquals ("#T01", "22/10/2002 9:52:30 AM", ((SqlString)TestTime).Value);                        
+                }
+                
+               [Test]
+                public void SqlDecimalToSqlString()
+                {
+                        SqlDecimal TestDecimal = new SqlDecimal (1000.2345);
+                        Assertion.AssertEquals ("#U01", "1000.2345000000000", ((SqlString)TestDecimal).Value);
+                }
+                
+               [Test]
+                public void SqlDoubleToSqlString()
+                {
+                        SqlDouble TestDouble = new SqlDouble (64E+64);
+                        Assertion.AssertEquals ("#V01", "6.4E+65", ((SqlString)TestDouble).Value);
+                }
+
+               [Test]
+                public void SqlGuidToSqlString()
+                {
+                        byte [] b = new byte [16];
+                        b [0] = 100;
+                        b [1] = 64;
+                        SqlGuid TestGuid = new SqlGuid (b);
+                        
+                        Assertion.AssertEquals ("#W01", "00004064-0000-0000-0000-000000000000", 
+                                      ((SqlString)TestGuid).Value);
+                        try {
+                                SqlString test = ((SqlString)SqlGuid.Null).Value;
+                                Assertion.Fail ("#W02");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#W03", typeof (SqlNullValueException), e.GetType());
+                        }
+                }
+                
+               [Test]
+                public void SqlInt16ToSqlString()
+                {
+                        SqlInt16 TestInt = new SqlInt16(20012);
+                        Assertion.AssertEquals ("#X01", "20012", ((SqlString)TestInt).Value);
+                        try {
+                                SqlString test = ((SqlString)SqlInt16.Null).Value;
+                                Assertion.Fail ("#X02");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#X03", typeof (SqlNullValueException), e.GetType ());                                
+                        }
+                }
+                
+               [Test]
+                public void SqlInt32ToSqlString()
+                {
+                        SqlInt32 TestInt = new SqlInt32(-12456);
+                        Assertion.AssertEquals ("#Y01", "-12456", ((SqlString)TestInt).Value);
+                        try {
+                                SqlString test = ((SqlString)SqlInt32.Null).Value;
+                                Assertion.Fail ("#Y02");
+                        } catch (Exception e) {
+                                Assertion.AssertEquals ("#Y03", typeof (SqlNullValueException), e.GetType ());                                
+                        }
+                }
+                
+               [Test]
+                public void SqlInt64ToSqlString()
+                {
+                        SqlInt64 TestInt = new SqlInt64(10101010);
+                        Assertion.AssertEquals ("#Z01", "10101010", ((SqlString)TestInt).Value);
+                }
+                
+               [Test]
+                public void SqlMoneyToSqlString()
+                {
+                        SqlMoney TestMoney = new SqlMoney (646464.6464);
+                        Assertion.AssertEquals ("#AA01", "646464.6464", ((SqlString)TestMoney).Value);
+                }
+                
+               [Test]
+                public void SqlSingleToSqlString()
+                {
+                        SqlSingle TestSingle = new SqlSingle (3E+20);
+                        Assertion.AssertEquals ("#AB01", "3E+20", ((SqlString)TestSingle).Value);
+                }
+                      
+               [Test]                        
+                public void SqlStringToString()
+                {
+                        Assertion.AssertEquals ("#AC01", "First TestString",(String)Test1);                        
+                }
+
+               [Test]
+                public void StringToSqlString()
+                {
+                        String TestString = "Test String";
+                        Assertion.AssertEquals ("#AD01", "Test String", ((SqlString)TestString).Value);                        
+                }                
+        }
+}
 
-                        // SqlString (String)
-                        SqlString  TestString = new SqlString ("Test");
-                        AssertEquals ("#A01", "Test", TestString.Value);
-
-                        // SqlString (String, int)\r\r
-                        TestString = new SqlString ("Test", 2057);\r\r
-                        AssertEquals ("#A02", 2057, TestString.LCID);\r\r
-\r\r
-                        // SqlString (int, SqlCompareOptions, byte[])\r\r
-                        TestString = new SqlString (2057,\r\r
-                                                    SqlCompareOptions.BinarySort|SqlCompareOptions.IgnoreCase,\r\r
-                                                    new byte [2] {123, 221});\r\r
-                        AssertEquals ("#A03", 2057, TestString.CompareInfo.LCID);\r\r
-                        \r\r
-                        // SqlString(string, int, SqlCompareOptions)\r\r
-                        TestString = new SqlString ("Test", 2057, SqlCompareOptions.IgnoreNonSpace);\r\r
-                        Assert ("#A04", !TestString.IsNull);\r\r
-                        \r\r
-                        // SqlString (int, SqlCompareOptions, byte[], bool)\r\r
-                        TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [4] {100, 100, 200, 45}, true);\r\r
-                        AssertEquals ("#A05", (byte)63, TestString.GetNonUnicodeBytes () [0]);\r\r
-                        TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [2] {113, 100}, false);\r\r
-                        AssertEquals ("#A06", (String)"qd", TestString.Value);\r\r
-                        \r\r
-                        // SqlString (int, SqlCompareOptions, byte[], int, int)\r\r
-                        TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [2] {113, 100}, 0, 2);\r\r
-                        Assert ("#A07", !TestString.IsNull);\r\r
-\r\r
-                        try {\r\r
-                                TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [2] {113, 100}, 2, 1);\r\r
-                                Fail ("#A07b");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#A07c", typeof (ArgumentOutOfRangeException), e.GetType ());\r\r
-                        }\r\r
-\r\r
-                        try {\r\r
-                                TestString = new SqlString (2057, SqlCompareOptions.BinarySort, new byte [2] {113, 100}, 0, 4);\r\r
-                                Fail ("#A07d");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#A07e", typeof (ArgumentOutOfRangeException), e.GetType ());\r\r
-                        }\r\r
-\r\r
-                        // SqlString (int, SqlCompareOptions, byte[], int, int, bool)\r\r
-                        TestString = new SqlString (2057, SqlCompareOptions.IgnoreCase, new byte [3] {100, 111, 50}, 1, 2, false);\r\r
-                        AssertEquals ("#A08", "o2", TestString.Value);\r\r
-                        TestString = new SqlString (2057, SqlCompareOptions.IgnoreCase, new byte [3] {123, 111, 222}, 1, 2, true);\r\r
-                        Assert ("#A09", !TestString.IsNull);                        \r\r
-                }\r\r
-\r\r
-                // Test public fields\r\r
-                public void TestPublicFields()\r\r
-                {\r\r
-                        // BinarySort\r\r
-                        AssertEquals ("#B01", 32768, SqlString.BinarySort);\r\r
-                        \r\r
-                        // IgnoreCase\r\r
-                        AssertEquals ("#B02", 1, SqlString.IgnoreCase);\r\r
-                                      \r\r
-                        // IgnoreKanaType\r\r
-                        AssertEquals ("#B03", 8, SqlString.IgnoreKanaType);\r\r
-\r\r
-                        // IgnoreNonSpace\r\r
-                        AssertEquals ("#B04", 2, SqlString.IgnoreNonSpace);\r\r
-                        \r\r
-                        // IgnoreWidth\r\r
-                        AssertEquals ("#B05", 16, SqlString.IgnoreWidth);\r\r
-                        \r\r
-                        // Null\r\r
-                        Assert ("#B06", SqlString.Null.IsNull);\r\r
-                }\r\r
-\r\r
-                // Test properties\r\r
-                public void TestProperties()\r\r
-                {\r\r
-                        // CompareInfo\r\r
-                        AssertEquals ("#C01", 3081, Test1.CompareInfo.LCID);\r\r
-\r\r
-                        // CultureInfo\r\r
-                        AssertEquals ("#C02", 3081, Test1.CultureInfo.LCID);                \r\r
-                        \r\r
-                        // IsNull\r\r
-                        Assert ("#C03", !Test1.IsNull);\r\r
-                        Assert ("#C04", SqlString.Null.IsNull);\r\r
-                        \r\r
-                        // LCID\r\r
-                        AssertEquals ("#C05", 3081, Test1.LCID);\r\r
-                        \r\r
-                        // SqlCompareOptions\r\r
-                        AssertEquals ("#C06", "IgnoreCase, IgnoreKanaType, IgnoreWidth", \r\r
-                                      Test1.SqlCompareOptions.ToString ());\r\r
-\r\r
-                        // Value\r\r
-                        AssertEquals ("#C07", "First TestString", Test1.Value);\r\r
-                }\r\r
-\r\r
-                // PUBLIC METHODS\r\r
-\r\r
-                public void TestCompareTo()\r\r
-                {\r\r
-                        SqlByte Test = new SqlByte (1);\r\r
-\r\r
-                        Assert ("#D01", Test1.CompareTo (Test3) < 0);\r\r
-                        Assert ("#D02", Test2.CompareTo (Test1) > 0);\r\r
-                        Assert ("#D03", Test2.CompareTo (Test3) == 0);\r\r
-                        Assert ("#D04", Test3.CompareTo (SqlString.Null) > 0);\r\r
-\r\r
-                        try {\r\r
-                                Test1.CompareTo (Test);\r\r
-                                Fail("#D05");\r\r
-                        } catch(Exception e) {                        \r\r
-                                AssertEquals ("#D06", typeof (ArgumentException), e.GetType ());\r\r
-                        }\r\r
-                        \r\r
-                        SqlString T1 = new SqlString ("test", 2057, SqlCompareOptions.IgnoreCase);\r\r
-                       SqlString T2 = new SqlString ("TEST", 2057, SqlCompareOptions.None);\r\r
-                       \r\r
-                       try {\r\r
-                               T1.CompareTo (T2);\r\r
-                               Fail ("#D07");\r\r
-                       } catch (Exception e) {\r\r
-                               AssertEquals ("#D08", typeof (SqlTypeException), e.GetType ());\r\r
-                       }\r\r
-                       \r\r
-                       // IgnoreCase\r\r
-                       T1 = new SqlString ("test", 2057, SqlCompareOptions.IgnoreCase);\r\r
-                       T2 = new SqlString ("TEST", 2057, SqlCompareOptions.IgnoreCase);\r\r
-                       Assert ("#D09", T2.CompareTo (T1) == 0);\r\r
-                \r\r
-                       T1 = new SqlString ("test", 2057);\r\r
-                       T2 = new SqlString ("TEST", 2057);\r\r
-                       Assert ("#D10", T2.CompareTo (T1) == 0);\r\r
-\r\r
-                       T1 = new SqlString ("test", 2057, SqlCompareOptions.None);\r\r
-                       T2 = new SqlString ("TEST", 2057, SqlCompareOptions.None);\r\r
-                       Assert ("#D11", T2.CompareTo (T1) != 0);\r\r
-\r\r
-                       // IgnoreNonSpace\r\r
-                        T1 = new SqlString ("TESTñ", 2057, SqlCompareOptions.IgnoreNonSpace);\r\r
-                       T2 = new SqlString ("TESTn", 2057, SqlCompareOptions.IgnoreNonSpace);\r\r
-                       Assert ("#D12", T2.CompareTo (T1) == 0);\r\r
-                \r\r
-                       T1 = new SqlString ("TESTñ", 2057, SqlCompareOptions.None);\r\r
-                       T2 = new SqlString ("TESTn", 2057, SqlCompareOptions.None);\r\r
-                       Assert ("#D13", T2.CompareTo (T1) != 0);\r\r
-\r\r
-                       // BinarySort\r\r
-                       T1 = new SqlString ("01_", 2057, SqlCompareOptions.BinarySort);\r\r
-                       T2 = new SqlString ("_01", 2057, SqlCompareOptions.BinarySort);\r\r
-                       Assert ("#D14", T1.CompareTo (T2) < 0);\r\r
-                       \r\r
-                       T1 = new SqlString ("01_", 2057, SqlCompareOptions.None);\r\r
-                       T2 = new SqlString ("_01", 2057, SqlCompareOptions.None);\r\r
-                       Assert ("#D15", T1.CompareTo (T2) > 0);                 \r\r
-                }\r\r
-\r\r
-                public void TestEqualsMethods()\r\r
-                {\r\r
-                        Assert ("#E01", !Test1.Equals (Test2));\r\r
-                        Assert ("#E02", !Test3.Equals (Test1));\r\r
-                        Assert ("#E03", !Test2.Equals (new SqlString ("TEST")));\r\r
-                        Assert ("#E04", Test2.Equals (Test3));\r\r
-\r\r
-                        // Static Equals()-method\r\r
-                        Assert ("#E05", SqlString.Equals (Test2, Test3).Value);\r\r
-                        Assert ("#E06", !SqlString.Equals (Test1, Test2).Value);\r\r
-                }\r\r
-\r\r
-                public void TestGetHashCode()\r\r
-                {\r\r
-                        // FIXME: Better way to test HashCode\r\r
-                        AssertEquals ("#F01", Test1.GetHashCode (), \r\r
-                                      Test1.GetHashCode ());\r\r
-                        Assert ("#F02", Test1.GetHashCode () != Test2.GetHashCode ());\r\r
-                        Assert ("#F03", Test2.GetHashCode () == Test2.GetHashCode ());\r\r
-                }\r\r
-\r\r
-                public void TestGetType()\r\r
-                {\r\r
-                        AssertEquals ("#G01", "System.Data.SqlTypes.SqlString", \r\r
-                                      Test1.GetType ().ToString ());\r\r
-                        AssertEquals ("#G02", "System.String", \r\r
-                                      Test1.Value.GetType ().ToString ());\r\r
-                }\r\r
-\r\r
-                public void TestGreaters()\r\r
-                {\r\r
-\r\r
-                        // GreateThan ()\r\r
-                        Assert ("#H01", !SqlString.GreaterThan (Test1, Test2).Value);\r\r
-                        Assert ("#H02", SqlString.GreaterThan (Test2, Test1).Value);\r\r
-                        Assert ("#H03", !SqlString.GreaterThan (Test2, Test3).Value);\r\r
-\r\r
-                        // GreaterTharOrEqual ()\r\r
-                        Assert ("#H04", !SqlString.GreaterThanOrEqual (Test1, Test2).Value);\r\r
-                        Assert ("#H05", SqlString.GreaterThanOrEqual (Test2, Test1).Value);\r\r
-                        Assert ("#H06", SqlString.GreaterThanOrEqual (Test2, Test3).Value);\r\r
-                }\r\r
-\r\r
-                public void TestLessers()\r\r
-                {\r\r
-                        // LessThan()\r\r
-                        Assert ("#I01", !SqlString.LessThan (Test2, Test3).Value);\r\r
-                        Assert ("#I02", !SqlString.LessThan (Test2, Test1).Value);\r\r
-                        Assert ("#I03", SqlString.LessThan (Test1, Test2).Value);\r\r
-\r\r
-                        // LessThanOrEqual ()\r\r
-                        Assert ("#I04", SqlString.LessThanOrEqual (Test1, Test2).Value);\r\r
-                        Assert ("#I05", !SqlString.LessThanOrEqual (Test2, Test1).Value);\r\r
-                        Assert ("#I06", SqlString.LessThanOrEqual (Test3, Test2).Value);\r\r
-                        Assert ("#I07", SqlString.LessThanOrEqual (Test2, SqlString.Null).IsNull);\r\r
-                }\r\r
-\r\r
-                public void TestNotEquals()\r\r
-                {\r\r
-                        Assert ("#J01", SqlString.NotEquals (Test1, Test2).Value);\r\r
-                        Assert ("#J02", SqlString.NotEquals (Test2, Test1).Value);\r\r
-                        Assert ("#J03", SqlString.NotEquals (Test3, Test1).Value);\r\r
-                        Assert ("#J04", !SqlString.NotEquals (Test2, Test3).Value);\r\r
-\r\r
-                        Assert ("#J05", SqlString.NotEquals (SqlString.Null, Test3).IsNull);\r\r
-                }\r\r
-\r\r
-                public void TestConcat()\r\r
-                {\r\r
-                        Test1 = new SqlString ("First TestString");\r\r
-                        Test2 = new SqlString ("This is just a test SqlString");\r\r
-                        Test3 = new SqlString ("This is just a test SqlString");\r\r
-\r\r
-                        AssertEquals ("#K01", \r\r
-                              (SqlString)"First TestStringThis is just a test SqlString", \r\r
-                              SqlString.Concat (Test1, Test2));\r\r
-\r\r
-                        AssertEquals ("#K02", SqlString.Null, \r\r
-                                      SqlString.Concat (Test1, SqlString.Null));\r\r
-                }\r\r
-\r\r
-                public void TestClone()\r\r
-                {\r\r
-                        SqlString TestSqlString  = Test1.Clone ();\r\r
-                        AssertEquals ("#L01", Test1, TestSqlString);\r\r
-                }\r\r
-\r\r
-                public void TestCompareOptionsFromSqlCompareOptions()\r\r
-                {\r\r
-                        AssertEquals ("#M01", CompareOptions.IgnoreCase,\r\r
-                                    SqlString.CompareOptionsFromSqlCompareOptions (\r\r
-                                    SqlCompareOptions.IgnoreCase));\r\r
-                        AssertEquals ("#M02", CompareOptions.IgnoreCase,\r\r
-                                    SqlString.CompareOptionsFromSqlCompareOptions (\r\r
-                                    SqlCompareOptions.IgnoreCase));\r\r
-                        try {\r\r
-                                \r\r
-                                CompareOptions test = SqlString.CompareOptionsFromSqlCompareOptions (\r\r
-                                    SqlCompareOptions.BinarySort);\r\r
-                                Fail ("#M03");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#M04", typeof (ArgumentOutOfRangeException), e.GetType ());\r\r
-                        }\r\r
-                }\r\r
-\r\r
-                public void TestUnicodeBytes()\r\r
-                {\r\r
-                        AssertEquals ("#N01", (byte)105, Test1.GetNonUnicodeBytes () [1]);\r\r
-                        AssertEquals ("#N02", (byte)32, Test1.GetNonUnicodeBytes () [5]);\r\r
-\r\r
-                        AssertEquals ("#N03", (byte)70, Test1.GetUnicodeBytes () [0]);\r\r
-                        AssertEquals ("#N03b", (byte)70, Test1.GetNonUnicodeBytes () [0]);\r\r
-                        AssertEquals ("#N03c", (byte)0, Test1.GetUnicodeBytes () [1]);\r\r
-                        AssertEquals ("#N03d", (byte)105, Test1.GetNonUnicodeBytes () [1]);\r\r
-                        AssertEquals ("#N03e", (byte)105, Test1.GetUnicodeBytes () [2]);\r\r
-                        AssertEquals ("#N03f", (byte)114, Test1.GetNonUnicodeBytes () [2]);\r\r
-                        AssertEquals ("#N03g", (byte)0, Test1.GetUnicodeBytes () [3]);\r\r
-                        AssertEquals ("#N03h", (byte)115, Test1.GetNonUnicodeBytes () [3]);\r\r
-                        AssertEquals ("#N03i", (byte)114, Test1.GetUnicodeBytes () [4]);\r\r
-                        AssertEquals ("#N03j", (byte)116, Test1.GetNonUnicodeBytes () [4]);\r\r
-\r\r
-                        AssertEquals ("#N04", (byte)105, Test1.GetUnicodeBytes () [2]);\r\r
-\r\r
-                        try {\r\r
-                                byte test = Test1.GetUnicodeBytes () [105];\r\r
-                                Fail ("#N05");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#N06", typeof (IndexOutOfRangeException), e.GetType());                                \r\r
-                        }\r\r
-                }\r\r
-                                \r\r
-                public void TestConversions()\r\r
-                {\r\r
-\r\r
-                        SqlString String250 = new SqlString ("250");\r\r
-                        SqlString String9E300 = new SqlString ("9E+300");\r\r
-\r\r
-                        // ToSqlBoolean ()\r\r
-        \r\r
-                        try {\r\r
-                                bool test = Test1.ToSqlBoolean ().Value;                              \r\r
-                                Fail ("#01");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#01.5", typeof (FormatException), e.GetType());                                                                \r\r
-                        }\r\r
-                        \r\r
-                        Assert ("#O02", (new SqlString("1")).ToSqlBoolean ().Value);\r\r
-                        Assert ("#O03", !(new SqlString("0")).ToSqlBoolean ().Value);\r\r
-                        Assert ("#O04", (new SqlString("True")).ToSqlBoolean ().Value);\r\r
-                        Assert ("#O05", !(new SqlString("FALSE")).ToSqlBoolean ().Value);\r\r
-                        Assert ("#O06", SqlString.Null.ToSqlBoolean ().IsNull);\r\r
-\r\r
-                        // ToSqlByte ()\r\r
-                        try {\r\r
-                                byte test = Test1.ToSqlByte ().Value;\r\r
-                                Fail ("#07");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O07.5", typeof (FormatException), e.GetType());    \r\r
-                        }\r\r
-\r\r
-                        AssertEquals ("#O08", (byte)250, String250.ToSqlByte ().Value);    \r\r
-                        try {\r\r
-                                SqlByte b = (byte)(new SqlString ("2500")).ToSqlByte ();\r\r
-                                Fail ("#O09");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O10", typeof (OverflowException), e.GetType ());\r\r
-                        }\r\r
-\r\r
-                        // ToSqlDateTime\r\r
-                        AssertEquals ("#O11", 10, \r\r
-                                      (new SqlString ("2002-10-10")).ToSqlDateTime ().Value.Day);\r\r
-                        \r\r
-                        // ToSqlDecimal ()\r\r
-                        try {\r\r
-                                AssertEquals ("#O13", (decimal)250, Test1.ToSqlDecimal ().Value);\r\r
-                                Fail ("#O14");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O15", typeof (FormatException), e.GetType ());\r\r
-                        }\r\r
-\r\r
-                        AssertEquals ("#O16", (decimal)250, String250.ToSqlDecimal ().Value);\r\r
-\r\r
-                        try {\r\r
-                                SqlDecimal test = String9E300.ToSqlDecimal ().Value;\r\r
-                                Fail ("#O17");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O18", typeof (FormatException), e.GetType ());\r\r
-                        }      \r\r
-\r\r
-                        // ToSqlDouble\r\r
-                        AssertEquals ("#O19", (SqlDouble)9E+300, String9E300.ToSqlDouble ());\r\r
-\r\r
-                        try {\r\r
-                                SqlDouble test = (new SqlString ("4e400")).ToSqlDouble ();\r\r
-                                Fail ("#O20");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O21", typeof (OverflowException), e.GetType ());\r\r
-                        }\r\r
-\r\r
-                        // ToSqlGuid\r\r
-                        SqlString TestGuid = new SqlString("11111111-1111-1111-1111-111111111111");\r\r
-                        AssertEquals ("#O22", new SqlGuid("11111111-1111-1111-1111-111111111111"), TestGuid.ToSqlGuid ());\r\r
-\r\r
-                        try {\r\r
-                                SqlGuid test = String9E300.ToSqlGuid ();\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O23", typeof (FormatException), e.GetType ());\r\r
-                        }\r\r
-                        \r\r
-                        // ToSqlInt16 ()\r\r
-                        AssertEquals ("#O24", (short)250, String250.ToSqlInt16 ().Value);\r\r
-\r\r
-                        try {\r\r
-                                SqlInt16 test = String9E300.ToSqlInt16().Value;\r\r
-                                Fail ("#O25");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O26", typeof (FormatException), e.GetType ());\r\r
-                        }        \r\r
-\r\r
-                        // ToSqlInt32 ()\r\r
-                        AssertEquals ("#O27", (int)250, String250.ToSqlInt32 ().Value);\r\r
-\r\r
-                        try {\r\r
-                                SqlInt32 test = String9E300.ToSqlInt32 ().Value;\r\r
-                                Fail ("#O28");\r\r
-                        } catch (Exception e) { \r\r
-                                AssertEquals ("#O29", typeof (FormatException), e.GetType ());\r\r
-                        }\r\r
-\r\r
-                        try {\r\r
-                                SqlInt32 test = Test1.ToSqlInt32 ().Value;\r\r
-                                Fail ("#O30");\r\r
-                        } catch (Exception e) { \r\r
-                                AssertEquals ("#O31", typeof (FormatException), e.GetType ());\r\r
-                        }\r\r
-\r\r
-                        // ToSqlInt64 ()\r\r
-                        AssertEquals ("#O32", (long)250, String250.ToSqlInt64 ().Value);\r\r
-\r\r
-                        try {        \r\r
-                                SqlInt64 test = String9E300.ToSqlInt64 ().Value;\r\r
-                                Fail ("#O33");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O34", typeof (FormatException), e.GetType ());\r\r
-                        }        \r\r
-\r\r
-                        // ToSqlMoney ()\r\r
-                        AssertEquals ("#O35", (decimal)250, String250.ToSqlMoney ().Value);\r\r
-\r\r
-                        try {\r\r
-                                SqlMoney test = String9E300.ToSqlMoney ().Value;\r\r
-                                Fail ("#O36");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O37", typeof (FormatException), e.GetType ());\r\r
-                        }        \r\r
-\r\r
-                        // ToSqlSingle ()\r\r
-                        AssertEquals ("#O38", (float)250, String250.ToSqlSingle ().Value);\r\r
-\r\r
-                        try {\r\r
-                                SqlSingle test = String9E300.ToSqlSingle().Value;\r\r
-                                Fail ("#O39");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#O40", typeof (OverflowException), e.GetType ());\r\r
-                        }        \r\r
-\r\r
-                        // ToString ()\r\r
-                        AssertEquals ("#O41", "First TestString", Test1.ToString ());\r\r
-                }\r\r
-\r\r
-                // OPERATORS\r\r
-\r\r
-                public void TestArithmeticOperators()\r\r
-                {\r\r
-                        SqlString TestString = new SqlString ("...Testing...");\r\r
-                        AssertEquals ("#P01", (SqlString)"First TestString...Testing...",\r\r
-                                      Test1 + TestString);\r\r
-                        AssertEquals ("#P02", SqlString.Null,\r\r
-                                      Test1 + SqlString.Null);\r\r
-                }\r\r
-\r\r
-                public void TestThanOrEqualOperators()\r\r
-                {\r\r
-                        // == -operator\r\r
-                        Assert ("#Q01", (Test2 == Test3).Value);\r\r
-                        Assert ("#Q02", !(Test1 == Test2).Value);\r\r
-                        Assert ("#Q03", (Test1 == SqlString.Null).IsNull);\r\r
-                        \r\r
-                        // != -operator\r\r
-                        Assert ("#Q04", !(Test3 != Test2).Value);\r\r
-                        Assert ("#Q05", !(Test2 != Test3).Value);\r\r
-                        Assert ("#Q06", (Test1 != Test3).Value);\r\r
-                        Assert ("#Q07", (Test1 != SqlString.Null).IsNull);\r\r
-\r\r
-                        // > -operator\r\r
-                        Assert ("#Q08", (Test2 > Test1).Value);\r\r
-                        Assert ("#Q09", !(Test1 > Test3).Value);\r\r
-                        Assert ("#Q10", !(Test2 > Test3).Value);\r\r
-                        Assert ("#Q11", (Test1 > SqlString.Null).IsNull);\r\r
-\r\r
-                        // >=  -operator\r\r
-                        Assert ("#Q12", !(Test1 >= Test3).Value);\r\r
-                        Assert ("#Q13", (Test3 >= Test1).Value);\r\r
-                        Assert ("#Q14", (Test2 >= Test3).Value);\r\r
-                        Assert ("#Q15", (Test1 >= SqlString.Null).IsNull);\r\r
-\r\r
-                        // < -operator\r\r
-                        Assert ("#Q16", (Test1 < Test2).Value);\r\r
-                        Assert ("#Q17", (Test1 < Test3).Value);\r\r
-                        Assert ("#Q18", !(Test2 < Test3).Value);\r\r
-                        Assert ("#Q19", (Test1 < SqlString.Null).IsNull);\r\r
-\r\r
-                        // <= -operator\r\r
-                        Assert ("#Q20", (Test1 <= Test3).Value);\r\r
-                        Assert ("#Q21", !(Test3 <= Test1).Value);\r\r
-                        Assert ("#Q22", (Test2 <= Test3).Value);\r\r
-                        Assert ("#Q23", (Test1 <= SqlString.Null).IsNull);\r\r
-                }\r\r
-\r\r
-                public void TestSqlBooleanToSqlString()\r\r
-                {\r\r
-                        SqlBoolean TestBoolean = new SqlBoolean (true);\r\r
-                        SqlBoolean TestBoolean2 = new SqlBoolean (false);\r\r
-                        SqlString Result;\r\r
-\r\r
-                        Result = (SqlString)TestBoolean;\r\r
-                        AssertEquals ("#R01", "True", Result.Value);\r\r
-                        \r\r
-                        Result = (SqlString)TestBoolean2;\r\r
-                        AssertEquals ("#R02", "False", Result.Value);\r\r
-                        \r\r
-                        Result = (SqlString)SqlBoolean.Null;\r\r
-                        Assert ("#R03", Result.IsNull);\r\r
-                }\r\r
-\r\r
-                public void TestSqlByteToBoolean()\r\r
-                {\r\r
-                        SqlByte TestByte = new SqlByte (250);\r\r
-                        AssertEquals ("#S01", "250", ((SqlString)TestByte).Value);\r\r
-                        try {\r\r
-                                SqlString test = ((SqlString)SqlByte.Null).Value;\r\r
-                                Fail ("#S02");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#S03", typeof (SqlNullValueException), e.GetType ());\r\r
-                        }\r\r
-                }\r\r
-\r\r
-                public void TestSqlDateTimeToSqlString()\r\r
-                {                        \r\r
-                        Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-AU");\r\r
-                        SqlDateTime TestTime = new SqlDateTime(2002, 10, 22, 9, 52, 30);\r\r
-                        AssertEquals ("#T01", "22/10/2002 9:52:30 AM", ((SqlString)TestTime).Value);                        \r\r
-                }\r\r
-                \r\r
-                public void TestSqlDecimalToSqlString()\r\r
-                {\r\r
-                        SqlDecimal TestDecimal = new SqlDecimal (1000.2345);\r\r
-                        AssertEquals ("#U01", "1000.2345000000000", ((SqlString)TestDecimal).Value);\r\r
-                }\r\r
-                \r\r
-                public void TestSqlDoubleToSqlString()\r\r
-                {\r\r
-                        SqlDouble TestDouble = new SqlDouble (64E+64);\r\r
-                        AssertEquals ("#V01", "6.4E+65", ((SqlString)TestDouble).Value);\r\r
-                }\r\r
-\r\r
-                public void TestSqlGuidToSqlString()\r\r
-                {\r\r
-                        byte [] b = new byte [16];\r\r
-                        b [0] = 100;\r\r
-                        b [1] = 64;\r\r
-                        SqlGuid TestGuid = new SqlGuid (b);\r\r
-                        \r\r
-                        AssertEquals ("#W01", "00004064-0000-0000-0000-000000000000", \r\r
-                                      ((SqlString)TestGuid).Value);\r\r
-                        try {\r\r
-                                SqlString test = ((SqlString)SqlGuid.Null).Value;\r\r
-                                Fail ("#W02");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#W03", typeof (SqlNullValueException), e.GetType());\r\r
-                        }\r\r
-                }\r\r
-                \r\r
-                public void TestSqlInt16ToSqlString()\r\r
-                {\r\r
-                        SqlInt16 TestInt = new SqlInt16(20012);\r\r
-                        AssertEquals ("#X01", "20012", ((SqlString)TestInt).Value);\r\r
-                        try {\r\r
-                                SqlString test = ((SqlString)SqlInt16.Null).Value;\r\r
-                                Fail ("#X02");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#X03", typeof (SqlNullValueException), e.GetType ());                                \r\r
-                        }\r\r
-                }\r\r
-                \r\r
-                public void TestSqlInt32ToSqlString()\r\r
-                {\r\r
-                        SqlInt32 TestInt = new SqlInt32(-12456);\r\r
-                        AssertEquals ("#Y01", "-12456", ((SqlString)TestInt).Value);\r\r
-                        try {\r\r
-                                SqlString test = ((SqlString)SqlInt32.Null).Value;\r\r
-                                Fail ("#Y02");\r\r
-                        } catch (Exception e) {\r\r
-                                AssertEquals ("#Y03", typeof (SqlNullValueException), e.GetType ());                                \r\r
-                        }\r\r
-                }\r\r
-                \r\r
-                public void TestSqlInt64ToSqlString()\r\r
-                {\r\r
-                        SqlInt64 TestInt = new SqlInt64(10101010);\r\r
-                        AssertEquals ("#Z01", "10101010", ((SqlString)TestInt).Value);\r\r
-                }\r\r
-                \r\r
-                public void TestSqlMoneyToSqlString()\r\r
-                {\r\r
-                        SqlMoney TestMoney = new SqlMoney (646464.6464);\r\r
-                        AssertEquals ("#AA01", "646464.6464", ((SqlString)TestMoney).Value);\r\r
-                }\r\r
-                \r\r
-                public void TestSqlSingleToSqlString()\r\r
-                {\r\r
-                        SqlSingle TestSingle = new SqlSingle (3E+20);\r\r
-                        AssertEquals ("#AB01", "3E+20", ((SqlString)TestSingle).Value);\r\r
-                }\r\r
-                                              \r\r
-                public void TestSqlStringToString()\r\r
-                {\r\r
-                        AssertEquals ("#AC01", "First TestString",(String)Test1);                        \r\r
-                }\r\r
-\r\r
-                public void TestStringToSqlString()\r\r
-                {\r\r
-                        String TestString = "Test String";\r\r
-                        AssertEquals ("#AD01", "Test String", ((SqlString)TestString).Value);                        \r\r
-                }                \r\r
-        }\r\r
-}\r\r
-\r\r
diff --git a/mcs/class/System.Data/Test/System.Data/AllTests.cs b/mcs/class/System.Data/Test/System.Data/AllTests.cs
deleted file mode 100644 (file)
index 09c8b62..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// MonoTests.System.Data.AllTests.cs
-//
-// Author:
-//   Rodrigo Moya <rodrigo@ximian.com>
-//
-// (C) Copyright 2002 Rodrigo Moya
-//
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data
-{
-       /// <summary>
-       ///  Combines all unit tests for the System.Data.dll assembly
-       ///   into one test suite.
-       /// </summary>
-       public class AllTests : TestCase
-       {
-               public AllTests (string name) : base (name) { }
-
-               public static ITest Suite {
-                       get {
-                               TestSuite suite =  new TestSuite ();
-                               suite.AddTest (new TestSuite (typeof (DataColumnTest)));
-                               suite.AddTest (new TestSuite (typeof (UniqueConstraintTest)));
-                               suite.AddTest (new TestSuite (typeof (ConstraintTest)));
-                               suite.AddTest (new TestSuite (typeof (ConstraintCollectionTest)));
-                               suite.AddTest (new TestSuite (typeof (ForeignKeyConstraintTest)));
-                               suite.AddTest (new TestSuite (typeof (DataTableTest)));
-                               suite.AddTest (new TestSuite (typeof (DataRowCollectionTest)));
-                               suite.AddTest (new TestSuite (typeof (DataRowTest)));
-                               suite.AddTest (new TestSuite (typeof (DataColumnCollectionTest)));
-                               suite.AddTest (new TestSuite (typeof (DataSetTest)));
-                               suite.AddTest (new TestSuite (typeof (DataRelationTest)));
-                               return suite;
-                       }
-               }
-       }
-}
index d638f15307a89dab8a4ddce2fb72248410ea3c47..000764f95614e51fc368894719d3e18521e12ff8 100644 (file)
@@ -1,10 +1,12 @@
 // ConstraintCollection.cs - NUnit Test Cases for testing the ConstraintCollection 
 //     class.
 //     
-//
-// Franklin Wise (gracenote@earthlink.net)
+// Authors:
+//   Franklin Wise (gracenote@earthlink.net)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
 // (C) Franklin Wise
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 
@@ -12,23 +14,17 @@ using NUnit.Framework;
 using System;
 using System.Data;
 
-
 namespace MonoTests.System.Data
 {
-
-
-       public class ConstraintCollectionTest : TestCase 
-       {
+       [TestFixture]
+       public class ConstraintCollectionTest {
                private DataTable _table;
                private DataTable _table2;
                private Constraint _constraint1;
                private Constraint _constraint2;
 
-               public ConstraintCollectionTest() : base ("MonoTests.System.Data.ConstraintCollectionTest") {}
-               public ConstraintCollectionTest(string name) : base(name) {}
-
-               public void PublicSetup(){SetUp();}
-               protected override void SetUp() 
+               [SetUp]
+               public void GetReady() 
                {
                        //Setup DataTable
                        _table = new DataTable("TestTable");
@@ -50,17 +46,8 @@ namespace MonoTests.System.Data
                        _table.Constraints.Clear();
                }
 
-               protected override void TearDown() {}
-
-               public static ITest Suite 
-               {
-                       get 
-                       { 
-                               return new TestSuite(typeof(ConstraintCollectionTest)); 
-                       }
-               }
-
-               public void TestAdd()
+               [Test]
+               public void Add()
                {
                        ConstraintCollection col = _table.Constraints;
                        col.Add(_constraint1);
@@ -69,7 +56,8 @@ namespace MonoTests.System.Data
                        Assertion.AssertEquals("Count doesn't equal added.",2, col.Count);
                }
 
-               public void TestAddExceptions()
+               [Test]
+               public void AddExceptions()
                {
                        ConstraintCollection col = _table.Constraints;
                        
@@ -80,7 +68,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("B1: Failed to throw ArgumentNullException.");
                        }
                        catch (ArgumentNullException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch 
                        {
                                Assertion.Fail("A1: Wrong exception type");
@@ -96,7 +84,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("Failed to throw Duplicate name exception.");
                        }
                        catch (DuplicateNameException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("A2: Wrong exception type. " + exc.ToString());
@@ -109,14 +97,15 @@ namespace MonoTests.System.Data
                                Assertion.Fail("B2: Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch 
                        {
                                Assertion.Fail("A3: Wrong exception type");
                        }
                }
 
-               public void TestIndexer()
+               [Test]
+               public void Indexer()
                {
                        Constraint c1 = new UniqueConstraint(_table.Columns[0]);
                        Constraint c2 = new UniqueConstraint(_table.Columns[1]);
@@ -136,7 +125,8 @@ namespace MonoTests.System.Data
 
                }
 
-               public void TestIndexOf()
+               [Test]
+               public void IndexOf()
                {
                        Constraint c1 = new UniqueConstraint(_table.Columns[0]);
                        Constraint c2 = new UniqueConstraint(_table.Columns[1]);
@@ -153,7 +143,8 @@ namespace MonoTests.System.Data
                        Assertion.AssertEquals("A4", 1, _table.Constraints.IndexOf("second"));
                }
 
-               public void TestContains()
+               [Test]
+               public void Contains()
                {
                        Constraint c1 = new UniqueConstraint(_table.Columns[0]);
                        Constraint c2 = new UniqueConstraint(_table.Columns[1]);
@@ -167,7 +158,8 @@ namespace MonoTests.System.Data
                        Assertion.Assert("A2", _table.Constraints.Contains(c2.ConstraintName) == false); //doesn't contain
                }
 
-               public void TestIndexerFailures()
+               [Test]
+               public void IndexerFailures()
                {
                        _table.Constraints.Add(new UniqueConstraint(_table.Columns[0]));
 
@@ -181,7 +173,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("B1: Failed to throw IndexOutOfRangeException.");
                        }
                        catch (IndexOutOfRangeException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch 
                        {
                                Assertion.Fail("A1: Wrong exception type");
@@ -194,7 +186,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("B2: Failed to throw IndexOutOfRangeException.");
                        }
                        catch (IndexOutOfRangeException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch 
                        {
                                Assertion.Fail("A2: Wrong exception type");
@@ -203,7 +195,8 @@ namespace MonoTests.System.Data
                }
 
                //TODO: Implementation not ready for this test yet
-//             public void TestAddFkException1()
+               //[Test]
+//             public void AddFkException1()
 //             {
 //                     DataSet ds = new DataSet();
 //                     ds.Tables.Add(_table);
@@ -222,7 +215,7 @@ namespace MonoTests.System.Data
 //                             Assertion.Fail("B1: Failed to throw ArgumentException.");
 //                     }
 //                     catch (ArgumentException) {}
-//                     catch (AssertionFailedError exc) {throw exc;}
+//                     catch (AssertionException exc) {throw exc;}
 //                     catch (Exception exc)
 //                     {
 //                             Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
@@ -233,7 +226,8 @@ namespace MonoTests.System.Data
 
 
                //TODO: Implementation not ready for this test yet
-//             public void TestAddFkException2()
+               //[Test]
+//             public void AddFkException2()
 //             {
 //                     //Foreign key rules only work when the tables
 //                     //are apart of the dataset
@@ -258,7 +252,7 @@ namespace MonoTests.System.Data
 //                             Assertion.Fail("B1: Failed to throw ArgumentException.");
 //                     }
 //                     catch (ArgumentException) {}
-//                     catch (AssertionFailedError exc) {throw exc;}
+//                     catch (AssertionException exc) {throw exc;}
 //                     catch (Exception exc)
 //                     {
 //                             Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
@@ -269,7 +263,8 @@ namespace MonoTests.System.Data
 
 
                //TODO: Implementation not ready for this test yet
-//             public void TestAddUniqueExceptions()
+               //[Test]
+//             public void AddUniqueExceptions()
 //             {
 //                     
 //
@@ -284,45 +279,46 @@ namespace MonoTests.System.Data
 //                             Assertion.Fail("B1: Failed to throw ArgumentException.");
 //                     }
 //                     catch (ArgumentException) {}
-//                     catch (AssertionFailedError exc) {throw exc;}
+//                     catch (AssertionException exc) {throw exc;}
 //                     catch (Exception exc)
 //                     {
 //                             Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
 //                     }
 //             }
 
-               public void TestAddRange()
+               [Test]
+               public void AddRange()
                {
                }
 
-               public void TestClear()
+               [Test]
+               public void Clear()
                {
-
                }
 
-               public void TestCanRemove()
+               [Test]
+               public void CanRemove()
                {
-
                }
 
-               public void TestCollectionChanged()
+               [Test]
+               public void CollectionChanged()
                {
-
                }
 
-               public void TestRemoveAt()
+               [Test]
+               public void RemoveAt()
                {
                }
 
-               public void TestRemove()
+               [Test]
+               public void Remove()
                {
                }
 
-
-               public void TestRemoveExceptions()
+               [Test]
+               public void RemoveExceptions()
                {
-
-
                }
        }
 }
index 1d3e26e1680dd459fe510aedfe05f0ab9fe3ae69..5fa966df40b3a6f49633eb329f0017ade2e45793 100644 (file)
@@ -1,9 +1,12 @@
 // ConstraintTest.cs - NUnit Test Cases for testing the abstract class System.Data.Constraint
 // The tests use an inherited class (UniqueConstraint) to test the Constraint class.
 //
-// Franklin Wise <gracenote@earthlink.net>
+// Authors:
+//   Franklin Wise <gracenote@earthlink.net>
+//   Martin Willemoes Hansen <mwh@sysrq.dk>
 //
 // (C) 2002 Franklin Wise
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -28,17 +31,15 @@ namespace MonoTests.System.Data
 //             }
 //     }
 
-       public class ConstraintTest : TestCase 
+       [TestFixture]
+       public class ConstraintTest
        {
                private DataTable _table;
                private Constraint _constraint1;
                private Constraint _constraint2;
 
-               public ConstraintTest() : base ("MonoTests.System.Data.ConstraintTest") {}
-               public ConstraintTest(string name) : base(name) {}
-
-               public void PublicSetup(){SetUp();}
-               protected override void SetUp() {
+               [SetUp]
+               public void GetReady() {
 
                        //Setup DataTable
                        _table = new DataTable("TestTable");
@@ -56,16 +57,8 @@ namespace MonoTests.System.Data
                        _table.Constraints.Clear();
                }  
                
-
-               protected override void TearDown() {}
-
-               public static ITest Suite {
-                       get { 
-                               return new TestSuite(typeof(ConstraintTest)); 
-                       }
-               }
-
-               public void TestSetConstraintNameNullOrEmptyExceptions() {
+               [Test]
+               public void SetConstraintNameNullOrEmptyExceptions() {
                        bool exceptionCaught = false;
                        string name = null;
 
@@ -96,7 +89,8 @@ namespace MonoTests.System.Data
                        }       
                }
 
-               public void TestSetConstraintNameDuplicateException() {
+               [Test]
+               public void SetConstraintNameDuplicateException() {
                        _constraint1.ConstraintName = "Dog";
                        _constraint2.ConstraintName = "Cat";
 
@@ -111,14 +105,15 @@ namespace MonoTests.System.Data
                                        " DuplicateNameException exception.");
                        }       
                        catch (DuplicateNameException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch {
                                Assertion.Fail("Wrong exception type thrown.");
                        }
                
                }
 
-               public void TestToString() {
+               [Test]
+               public void ToStringTest() {
                        _constraint1.ConstraintName = "Test";
                        Assertion.Assert("ToString is the same as constraint name.", _constraint1.ConstraintName.CompareTo( _constraint1.ToString()) == 0);
                        
@@ -126,13 +121,13 @@ namespace MonoTests.System.Data
                        Assertion.AssertNotNull("ToString should return empty.",_constraint1.ToString());
                }
 
-               public void TestGetExtendedProperties() {
+               [Test]
+               public void GetExtendedProperties() {
                        PropertyCollection col = _constraint1.ExtendedProperties as
                                PropertyCollection;
 
                        Assertion.AssertNotNull("ExtendedProperties returned null or didn't " +
                                "return the correct type", col);
                }
-               
        }
 }
index 7b58917a252c5fd4afe3e448f259fdb6b760fde7..1e704db6ab9ab1093bc2c406ac86ed03dea0506f 100644 (file)
@@ -1,11 +1,13 @@
 // DataColumnCollectionTest.cs - NUnit Test Cases for System.Data.DataColumnCollection
 //
-// Author:
+// Authors:
 //   Franklin Wise <gracenote@earthlink.net>
 //   Ville Palo <vi64pa@kolumbus.fi>
+//   Martin Willemoes Hansen <mwh@sysrq.dk>
 //
 // (C) Copyright 2002 Franklin Wise
 // (C) Copyright 2003 Ville Palo
+// (C) Copyright 2003 Martin Willemoes Hansen
 //
 
 using NUnit.Framework;
@@ -15,35 +17,28 @@ using System.Xml;
 
 namespace MonoTests.System.Data
 {
-       public class DataColumnCollectionTest : TestCase
+       [TestFixture]
+       public class DataColumnCollectionTest
        {
-               public DataColumnCollectionTest () : base ("MonoTest.System.Data.DataColumnCollectionTest") {}
-               public DataColumnCollectionTest (string name) : base (name) {}
-
                private DataTable _tbl;
 
-               protected override void SetUp () 
+               [SetUp]
+               public void GetReady () 
                {
                        _tbl = new DataTable();
                }
 
-               protected override void TearDown() {}
-
-               public static ITest Suite {
-                       get { 
-                               return new TestSuite (typeof (DataColumnCollectionTest));
-                       }
-               }
-
                //TODO
-               public void TestAddValidationExceptions()
+               [Test]
+               public void AddValidationExceptions()
                {
                        
                        //Set DefaultValue and AutoIncr == true
                        //And get an exception
                }
 
-               public void TestAdd ()
+               [Test]
+               public void Add ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataColumnCollection Cols = Table.Columns;
@@ -52,133 +47,134 @@ namespace MonoTests.System.Data
                        Cols.Add ();
                        
                        C = Cols [0];
-                       AssertEquals ("test#01", true, C.AllowDBNull);
-                       AssertEquals ("test#02", false, C.AutoIncrement);
-                       AssertEquals ("test#03", 0L, C.AutoIncrementSeed);
-                       AssertEquals ("test#04", 1L, C.AutoIncrementStep);
-                       AssertEquals ("test#05", "Column1", C.Caption);
-                       AssertEquals ("test#06", "Element", C.ColumnMapping.ToString ());
-                       AssertEquals ("test#07", "Column1", C.ColumnName);
-                       AssertEquals ("test#08", true, C.Container == null);
-                       AssertEquals ("test#09", typeof (string), C.DataType);
-                       AssertEquals ("test#10", DBNull.Value, C.DefaultValue);
-                       AssertEquals ("test#11", false, C.DesignMode);
-                       AssertEquals ("test#12", "", C.Expression);
-                       AssertEquals ("test#13", 0, C.ExtendedProperties.Count);
-                       AssertEquals ("test#14", -1, C.MaxLength);
-                       AssertEquals ("test#15", "", C.Namespace);
-                       AssertEquals ("test#16", 0, C.Ordinal);
-                       AssertEquals ("test#17", "", C.Prefix);
-                       AssertEquals ("test#18", false, C.ReadOnly);
-                       AssertEquals ("test#19", null, C.Site);
-                       AssertEquals ("test#20", "test_table", C.Table.TableName);
-                       AssertEquals ("test#21", "Column1", C.ToString ());
-                       AssertEquals ("test#22", false, C.Unique);
+                       Assertion.AssertEquals ("test#01", true, C.AllowDBNull);
+                       Assertion.AssertEquals ("test#02", false, C.AutoIncrement);
+                       Assertion.AssertEquals ("test#03", 0L, C.AutoIncrementSeed);
+                       Assertion.AssertEquals ("test#04", 1L, C.AutoIncrementStep);
+                       Assertion.AssertEquals ("test#05", "Column1", C.Caption);
+                       Assertion.AssertEquals ("test#06", "Element", C.ColumnMapping.ToString ());
+                       Assertion.AssertEquals ("test#07", "Column1", C.ColumnName);
+                       Assertion.AssertEquals ("test#08", true, C.Container == null);
+                       Assertion.AssertEquals ("test#09", typeof (string), C.DataType);
+                       Assertion.AssertEquals ("test#10", DBNull.Value, C.DefaultValue);
+                       Assertion.AssertEquals ("test#11", false, C.DesignMode);
+                       Assertion.AssertEquals ("test#12", "", C.Expression);
+                       Assertion.AssertEquals ("test#13", 0, C.ExtendedProperties.Count);
+                       Assertion.AssertEquals ("test#14", -1, C.MaxLength);
+                       Assertion.AssertEquals ("test#15", "", C.Namespace);
+                       Assertion.AssertEquals ("test#16", 0, C.Ordinal);
+                       Assertion.AssertEquals ("test#17", "", C.Prefix);
+                       Assertion.AssertEquals ("test#18", false, C.ReadOnly);
+                       Assertion.AssertEquals ("test#19", null, C.Site);
+                       Assertion.AssertEquals ("test#20", "test_table", C.Table.TableName);
+                       Assertion.AssertEquals ("test#21", "Column1", C.ToString ());
+                       Assertion.AssertEquals ("test#22", false, C.Unique);
 
                        C = Cols [1];
-                       AssertEquals ("test#23", true, C.AllowDBNull);
-                       AssertEquals ("test#24", false, C.AutoIncrement);
-                       AssertEquals ("test#25", 0L, C.AutoIncrementSeed);
-                       AssertEquals ("test#26", 1L, C.AutoIncrementStep);
-                       AssertEquals ("test#27", "Column2", C.Caption);
-                       AssertEquals ("test#28", "Element", C.ColumnMapping.ToString ());
-                       AssertEquals ("test#29", "Column2", C.ColumnName);
-                       AssertEquals ("test#30", true, C.Container == null);
-                       AssertEquals ("test#31", typeof (string), C.DataType);
-                       AssertEquals ("test#32", DBNull.Value, C.DefaultValue);
-                       AssertEquals ("test#33", false, C.DesignMode);
-                       AssertEquals ("test#34", "", C.Expression);
-                       AssertEquals ("test#35", 0, C.ExtendedProperties.Count);
-                       AssertEquals ("test#36", -1, C.MaxLength);
-                       AssertEquals ("test#37", "", C.Namespace);
-                       AssertEquals ("test#38", 1, C.Ordinal);
-                       AssertEquals ("test#39", "", C.Prefix);
-                       AssertEquals ("test#40", false, C.ReadOnly);
-                       AssertEquals ("test#41", null, C.Site);
-                       AssertEquals ("test#42", "test_table", C.Table.TableName);
-                       AssertEquals ("test#43", "Column2", C.ToString ());
-                       AssertEquals ("test#44", false, C.Unique);
+                       Assertion.AssertEquals ("test#23", true, C.AllowDBNull);
+                       Assertion.AssertEquals ("test#24", false, C.AutoIncrement);
+                       Assertion.AssertEquals ("test#25", 0L, C.AutoIncrementSeed);
+                       Assertion.AssertEquals ("test#26", 1L, C.AutoIncrementStep);
+                       Assertion.AssertEquals ("test#27", "Column2", C.Caption);
+                       Assertion.AssertEquals ("test#28", "Element", C.ColumnMapping.ToString ());
+                       Assertion.AssertEquals ("test#29", "Column2", C.ColumnName);
+                       Assertion.AssertEquals ("test#30", true, C.Container == null);
+                       Assertion.AssertEquals ("test#31", typeof (string), C.DataType);
+                       Assertion.AssertEquals ("test#32", DBNull.Value, C.DefaultValue);
+                       Assertion.AssertEquals ("test#33", false, C.DesignMode);
+                       Assertion.AssertEquals ("test#34", "", C.Expression);
+                       Assertion.AssertEquals ("test#35", 0, C.ExtendedProperties.Count);
+                       Assertion.AssertEquals ("test#36", -1, C.MaxLength);
+                       Assertion.AssertEquals ("test#37", "", C.Namespace);
+                       Assertion.AssertEquals ("test#38", 1, C.Ordinal);
+                       Assertion.AssertEquals ("test#39", "", C.Prefix);
+                       Assertion.AssertEquals ("test#40", false, C.ReadOnly);
+                       Assertion.AssertEquals ("test#41", null, C.Site);
+                       Assertion.AssertEquals ("test#42", "test_table", C.Table.TableName);
+                       Assertion.AssertEquals ("test#43", "Column2", C.ToString ());
+                       Assertion.AssertEquals ("test#44", false, C.Unique);
 
                        Cols.Add ("test1", typeof (int), "");
                        Cols.Add ("test2", typeof (string), "Column1 +  Column2");
 
                        C = Cols [2];
-                       AssertEquals ("test#45", true, C.AllowDBNull);
-                       AssertEquals ("test#46", false, C.AutoIncrement);
-                       AssertEquals ("test#47", 0L, C.AutoIncrementSeed);
-                       AssertEquals ("test#48", 1L, C.AutoIncrementStep);
-                       AssertEquals ("test#49", "test1", C.Caption);
-                       AssertEquals ("test#50", "Element", C.ColumnMapping.ToString ());
-                       AssertEquals ("test#51", "test1", C.ColumnName);
-                       AssertEquals ("test#52", true, C.Container == null);
-                       AssertEquals ("test#53", typeof (int), C.DataType);
-                       AssertEquals ("test#54", DBNull.Value, C.DefaultValue);
-                       AssertEquals ("test#55", false, C.DesignMode);
-                       AssertEquals ("test#56", "", C.Expression);
-                       AssertEquals ("test#57", 0, C.ExtendedProperties.Count);
-                       AssertEquals ("test#58", -1, C.MaxLength);
-                       AssertEquals ("test#59", "", C.Namespace);
-                       AssertEquals ("test#60", 2, C.Ordinal);
-                       AssertEquals ("test#61", "", C.Prefix);
-                       AssertEquals ("test#62", false, C.ReadOnly);
-                       AssertEquals ("test#63", null, C.Site);
-                       AssertEquals ("test#64", "test_table", C.Table.TableName);
-                       AssertEquals ("test#65", "test1", C.ToString ());
-                       AssertEquals ("test#66", false, C.Unique);
+                       Assertion.AssertEquals ("test#45", true, C.AllowDBNull);
+                       Assertion.AssertEquals ("test#46", false, C.AutoIncrement);
+                       Assertion.AssertEquals ("test#47", 0L, C.AutoIncrementSeed);
+                       Assertion.AssertEquals ("test#48", 1L, C.AutoIncrementStep);
+                       Assertion.AssertEquals ("test#49", "test1", C.Caption);
+                       Assertion.AssertEquals ("test#50", "Element", C.ColumnMapping.ToString ());
+                       Assertion.AssertEquals ("test#51", "test1", C.ColumnName);
+                       Assertion.AssertEquals ("test#52", true, C.Container == null);
+                       Assertion.AssertEquals ("test#53", typeof (int), C.DataType);
+                       Assertion.AssertEquals ("test#54", DBNull.Value, C.DefaultValue);
+                       Assertion.AssertEquals ("test#55", false, C.DesignMode);
+                       Assertion.AssertEquals ("test#56", "", C.Expression);
+                       Assertion.AssertEquals ("test#57", 0, C.ExtendedProperties.Count);
+                       Assertion.AssertEquals ("test#58", -1, C.MaxLength);
+                       Assertion.AssertEquals ("test#59", "", C.Namespace);
+                       Assertion.AssertEquals ("test#60", 2, C.Ordinal);
+                       Assertion.AssertEquals ("test#61", "", C.Prefix);
+                       Assertion.AssertEquals ("test#62", false, C.ReadOnly);
+                       Assertion.AssertEquals ("test#63", null, C.Site);
+                       Assertion.AssertEquals ("test#64", "test_table", C.Table.TableName);
+                       Assertion.AssertEquals ("test#65", "test1", C.ToString ());
+                       Assertion.AssertEquals ("test#66", false, C.Unique);
 
                        C = Cols [3];
-                       AssertEquals ("test#67", true, C.AllowDBNull);
-                       AssertEquals ("test#68", false, C.AutoIncrement);
-                       AssertEquals ("test#69", 0L, C.AutoIncrementSeed);
-                       AssertEquals ("test#70", 1L, C.AutoIncrementStep);
-                       AssertEquals ("test#71", "test2", C.Caption);
-                       AssertEquals ("test#72", "Element", C.ColumnMapping.ToString ());
-                       AssertEquals ("test#73", "test2", C.ColumnName);
-                       AssertEquals ("test#74", true, C.Container == null);
-                       AssertEquals ("test#75", typeof (string), C.DataType);
-                       AssertEquals ("test#76", DBNull.Value, C.DefaultValue);
-                       AssertEquals ("test#77", false, C.DesignMode);
-                       AssertEquals ("test#78", "Column1 +  Column2", C.Expression);
-                       AssertEquals ("test#79", 0, C.ExtendedProperties.Count);
-                       AssertEquals ("test#80", -1, C.MaxLength);
-                       AssertEquals ("test#81", "", C.Namespace);
-                       AssertEquals ("test#82", 3, C.Ordinal);
-                       AssertEquals ("test#83", "", C.Prefix);
-                       AssertEquals ("test#84", true, C.ReadOnly);
-                       AssertEquals ("test#85", null, C.Site);
-                       AssertEquals ("test#86", "test_table", C.Table.TableName);
-                       AssertEquals ("test#87", "test2 + Column1 +  Column2", C.ToString ());
-                       AssertEquals ("test#88", false, C.Unique); 
+                       Assertion.AssertEquals ("test#67", true, C.AllowDBNull);
+                       Assertion.AssertEquals ("test#68", false, C.AutoIncrement);
+                       Assertion.AssertEquals ("test#69", 0L, C.AutoIncrementSeed);
+                       Assertion.AssertEquals ("test#70", 1L, C.AutoIncrementStep);
+                       Assertion.AssertEquals ("test#71", "test2", C.Caption);
+                       Assertion.AssertEquals ("test#72", "Element", C.ColumnMapping.ToString ());
+                       Assertion.AssertEquals ("test#73", "test2", C.ColumnName);
+                       Assertion.AssertEquals ("test#74", true, C.Container == null);
+                       Assertion.AssertEquals ("test#75", typeof (string), C.DataType);
+                       Assertion.AssertEquals ("test#76", DBNull.Value, C.DefaultValue);
+                       Assertion.AssertEquals ("test#77", false, C.DesignMode);
+                       Assertion.AssertEquals ("test#78", "Column1 +  Column2", C.Expression);
+                       Assertion.AssertEquals ("test#79", 0, C.ExtendedProperties.Count);
+                       Assertion.AssertEquals ("test#80", -1, C.MaxLength);
+                       Assertion.AssertEquals ("test#81", "", C.Namespace);
+                       Assertion.AssertEquals ("test#82", 3, C.Ordinal);
+                       Assertion.AssertEquals ("test#83", "", C.Prefix);
+                       Assertion.AssertEquals ("test#84", true, C.ReadOnly);
+                       Assertion.AssertEquals ("test#85", null, C.Site);
+                       Assertion.AssertEquals ("test#86", "test_table", C.Table.TableName);
+                       Assertion.AssertEquals ("test#87", "test2 + Column1 +  Column2", C.ToString ());
+                       Assertion.AssertEquals ("test#88", false, C.Unique); 
 
                        C = new DataColumn ("test3", typeof (int));
                        Cols.Add (C);
 
                        C = Cols [4];
-                       AssertEquals ("test#89", true, C.AllowDBNull);
-                       AssertEquals ("test#90", false, C.AutoIncrement);
-                       AssertEquals ("test#91", 0L, C.AutoIncrementSeed);
-                       AssertEquals ("test#92", 1L, C.AutoIncrementStep);
-                       AssertEquals ("test#93", "test3", C.Caption);
-                       AssertEquals ("test#94", "Element", C.ColumnMapping.ToString ());
-                       AssertEquals ("test#95", "test3", C.ColumnName);
-                       AssertEquals ("test#96", true, C.Container == null);
-                       AssertEquals ("test#97", typeof (int), C.DataType);
-                       AssertEquals ("test#98", DBNull.Value, C.DefaultValue);
-                       AssertEquals ("test#99", false, C.DesignMode);
-                       AssertEquals ("test#100", "", C.Expression);
-                       AssertEquals ("test#101", 0, C.ExtendedProperties.Count);
-                       AssertEquals ("test#102", -1, C.MaxLength);
-                       AssertEquals ("test#103", "", C.Namespace);
-                       AssertEquals ("test#104", 4, C.Ordinal);
-                       AssertEquals ("test#105", "", C.Prefix);
-                       AssertEquals ("test#106", false, C.ReadOnly);
-                       AssertEquals ("test#107", null, C.Site);
-                       AssertEquals ("test#108", "test_table", C.Table.TableName);
-                       AssertEquals ("test#109", "test3", C.ToString ());
-                       AssertEquals ("test#110", false, C.Unique); 
+                       Assertion.AssertEquals ("test#89", true, C.AllowDBNull);
+                       Assertion.AssertEquals ("test#90", false, C.AutoIncrement);
+                       Assertion.AssertEquals ("test#91", 0L, C.AutoIncrementSeed);
+                       Assertion.AssertEquals ("test#92", 1L, C.AutoIncrementStep);
+                       Assertion.AssertEquals ("test#93", "test3", C.Caption);
+                       Assertion.AssertEquals ("test#94", "Element", C.ColumnMapping.ToString ());
+                       Assertion.AssertEquals ("test#95", "test3", C.ColumnName);
+                       Assertion.AssertEquals ("test#96", true, C.Container == null);
+                       Assertion.AssertEquals ("test#97", typeof (int), C.DataType);
+                       Assertion.AssertEquals ("test#98", DBNull.Value, C.DefaultValue);
+                       Assertion.AssertEquals ("test#99", false, C.DesignMode);
+                       Assertion.AssertEquals ("test#100", "", C.Expression);
+                       Assertion.AssertEquals ("test#101", 0, C.ExtendedProperties.Count);
+                       Assertion.AssertEquals ("test#102", -1, C.MaxLength);
+                       Assertion.AssertEquals ("test#103", "", C.Namespace);
+                       Assertion.AssertEquals ("test#104", 4, C.Ordinal);
+                       Assertion.AssertEquals ("test#105", "", C.Prefix);
+                       Assertion.AssertEquals ("test#106", false, C.ReadOnly);
+                       Assertion.AssertEquals ("test#107", null, C.Site);
+                       Assertion.AssertEquals ("test#108", "test_table", C.Table.TableName);
+                       Assertion.AssertEquals ("test#109", "test3", C.ToString ());
+                       Assertion.AssertEquals ("test#110", false, C.Unique); 
                }
 
-               public void TestAddExceptions ()
+               [Test]
+               public void AddExceptions ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataTable Table2 = new DataTable ("test_table2");
@@ -187,9 +183,9 @@ namespace MonoTests.System.Data
 
                        try {
                                Cols.Add (C);
-                               Fail ("test#01");
+                               Assertion.Fail ("test#01");
                        } catch (Exception e) {
-                               AssertEquals ("test#02", typeof (ArgumentNullException), e.GetType ());
+                               Assertion.AssertEquals ("test#02", typeof (ArgumentNullException), e.GetType ());
                        }
 
                        C = new DataColumn ("test");
@@ -197,40 +193,41 @@ namespace MonoTests.System.Data
 
                        try {
                                Cols.Add (C);
-                               Fail ("test#04");
+                               Assertion.Fail ("test#04");
                        } catch (Exception e) {
-                               AssertEquals ("test#05", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#06", "Column 'test' already belongs to this DataTable.", e.Message);
+                               Assertion.AssertEquals ("test#05", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#06", "Column 'test' already belongs to this DataTable.", e.Message);
                        }
 
                        try {
                                Table2.Columns.Add (C);
-                               Fail ("test#07");
+                               Assertion.Fail ("test#07");
                        } catch (Exception e) {
-                               AssertEquals ("test#08", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#09", "Column 'test' already belongs to another DataTable.", e.Message);
+                               Assertion.AssertEquals ("test#08", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#09", "Column 'test' already belongs to another DataTable.", e.Message);
                        }
 
                        DataColumn C2 = new DataColumn ("test");
 
                        try {
                                Cols.Add (C2);
-                               Fail ("test#10");
+                               Assertion.Fail ("test#10");
                        } catch (Exception e) {
-                               AssertEquals ("test#11", typeof (DuplicateNameException), e.GetType ());
-                               AssertEquals ("test#12", "A column named 'test' already belongs to this DataTable.", e.Message);
+                               Assertion.AssertEquals ("test#11", typeof (DuplicateNameException), e.GetType ());
+                               Assertion.AssertEquals ("test#12", "A column named 'test' already belongs to this DataTable.", e.Message);
                        }
 
                        try {
                                Cols.Add ("test2", typeof (string), "substring ('fdsafewq', 2)");
-                               Fail ("test#13");
+                               Assertion.Fail ("test#13");
                        } catch (Exception e) {
-                               AssertEquals ("test#14", true, e is InvalidExpressionException);
-                               AssertEquals ("test#15", "Invalid number of arguments: function substring().", e.Message);
+                               Assertion.AssertEquals ("test#14", true, e is InvalidExpressionException);
+                               Assertion.AssertEquals ("test#15", "Invalid number of arguments: function substring().", e.Message);
                        }
                }
 
-               public void TestAddRange ()
+               [Test]
+               public void AddRange ()
                {                       
                        DataTable Table = new DataTable ("test_table");
                        DataTable Table2 = new DataTable ("test_table2");
@@ -250,55 +247,56 @@ namespace MonoTests.System.Data
                        Cols.AddRange (ColArray);
 
                        C = Cols [0];
-                       AssertEquals ("test#01", true, C.AllowDBNull);
-                       AssertEquals ("test#02", false, C.AutoIncrement);
-                       AssertEquals ("test#03", 0L, C.AutoIncrementSeed);
-                       AssertEquals ("test#04", 1L, C.AutoIncrementStep);
-                       AssertEquals ("test#05", "test1", C.Caption);
-                       AssertEquals ("test#06", "Element", C.ColumnMapping.ToString ());
-                       AssertEquals ("test#07", "test1", C.ColumnName);
-                       AssertEquals ("test#08", true, C.Container == null);
-                       AssertEquals ("test#09", typeof (string), C.DataType);
-                       AssertEquals ("test#10", DBNull.Value, C.DefaultValue);
-                       AssertEquals ("test#11", false, C.DesignMode);
-                       AssertEquals ("test#12", "", C.Expression);
-                       AssertEquals ("test#13", 0, C.ExtendedProperties.Count);
-                       AssertEquals ("test#14", -1, C.MaxLength);
-                       AssertEquals ("test#15", "", C.Namespace);
-                       AssertEquals ("test#16", 0, C.Ordinal);
-                       AssertEquals ("test#17", "", C.Prefix);
-                       AssertEquals ("test#18", false, C.ReadOnly);
-                       AssertEquals ("test#19", null, C.Site);
-                       AssertEquals ("test#20", "test_table", C.Table.TableName);
-                       AssertEquals ("test#21", "test1", C.ToString ());
-                       AssertEquals ("test#22", false, C.Unique);
+                       Assertion.AssertEquals ("test#01", true, C.AllowDBNull);
+                       Assertion.AssertEquals ("test#02", false, C.AutoIncrement);
+                       Assertion.AssertEquals ("test#03", 0L, C.AutoIncrementSeed);
+                       Assertion.AssertEquals ("test#04", 1L, C.AutoIncrementStep);
+                       Assertion.AssertEquals ("test#05", "test1", C.Caption);
+                       Assertion.AssertEquals ("test#06", "Element", C.ColumnMapping.ToString ());
+                       Assertion.AssertEquals ("test#07", "test1", C.ColumnName);
+                       Assertion.AssertEquals ("test#08", true, C.Container == null);
+                       Assertion.AssertEquals ("test#09", typeof (string), C.DataType);
+                       Assertion.AssertEquals ("test#10", DBNull.Value, C.DefaultValue);
+                       Assertion.AssertEquals ("test#11", false, C.DesignMode);
+                       Assertion.AssertEquals ("test#12", "", C.Expression);
+                       Assertion.AssertEquals ("test#13", 0, C.ExtendedProperties.Count);
+                       Assertion.AssertEquals ("test#14", -1, C.MaxLength);
+                       Assertion.AssertEquals ("test#15", "", C.Namespace);
+                       Assertion.AssertEquals ("test#16", 0, C.Ordinal);
+                       Assertion.AssertEquals ("test#17", "", C.Prefix);
+                       Assertion.AssertEquals ("test#18", false, C.ReadOnly);
+                       Assertion.AssertEquals ("test#19", null, C.Site);
+                       Assertion.AssertEquals ("test#20", "test_table", C.Table.TableName);
+                       Assertion.AssertEquals ("test#21", "test1", C.ToString ());
+                       Assertion.AssertEquals ("test#22", false, C.Unique);
 
                        C = Cols [1];
-                       AssertEquals ("test#01", false, C.AllowDBNull);
-                       AssertEquals ("test#02", false, C.AutoIncrement);
-                       AssertEquals ("test#03", 0L, C.AutoIncrementSeed);
-                       AssertEquals ("test#04", 1L, C.AutoIncrementStep);
-                       AssertEquals ("test#05", "Test_caption", C.Caption);
-                       AssertEquals ("test#06", "Element", C.ColumnMapping.ToString ());
-                       AssertEquals ("test#07", "test2", C.ColumnName);
-                       AssertEquals ("test#08", true, C.Container == null);
-                       AssertEquals ("test#09", typeof (XmlReader), C.DataType);
-                       AssertEquals ("test#10", DBNull.Value, C.DefaultValue);
-                       AssertEquals ("test#11", false, C.DesignMode);
-                       AssertEquals ("test#12", "", C.Expression);
-                       AssertEquals ("test#13", 0, C.ExtendedProperties.Count);
-                       AssertEquals ("test#14", -1, C.MaxLength);
-                       AssertEquals ("test#15", "", C.Namespace);
-                       AssertEquals ("test#16", 1, C.Ordinal);
-                       AssertEquals ("test#17", "", C.Prefix);
-                       AssertEquals ("test#18", false, C.ReadOnly);
-                       AssertEquals ("test#19", null, C.Site);
-                       AssertEquals ("test#20", "test_table", C.Table.TableName);
-                       AssertEquals ("test#21", "test2", C.ToString ());
-                       AssertEquals ("test#22", false, C.Unique);
+                       Assertion.AssertEquals ("test#01", false, C.AllowDBNull);
+                       Assertion.AssertEquals ("test#02", false, C.AutoIncrement);
+                       Assertion.AssertEquals ("test#03", 0L, C.AutoIncrementSeed);
+                       Assertion.AssertEquals ("test#04", 1L, C.AutoIncrementStep);
+                       Assertion.AssertEquals ("test#05", "Test_caption", C.Caption);
+                       Assertion.AssertEquals ("test#06", "Element", C.ColumnMapping.ToString ());
+                       Assertion.AssertEquals ("test#07", "test2", C.ColumnName);
+                       Assertion.AssertEquals ("test#08", true, C.Container == null);
+                       Assertion.AssertEquals ("test#09", typeof (XmlReader), C.DataType);
+                       Assertion.AssertEquals ("test#10", DBNull.Value, C.DefaultValue);
+                       Assertion.AssertEquals ("test#11", false, C.DesignMode);
+                       Assertion.AssertEquals ("test#12", "", C.Expression);
+                       Assertion.AssertEquals ("test#13", 0, C.ExtendedProperties.Count);
+                       Assertion.AssertEquals ("test#14", -1, C.MaxLength);
+                       Assertion.AssertEquals ("test#15", "", C.Namespace);
+                       Assertion.AssertEquals ("test#16", 1, C.Ordinal);
+                       Assertion.AssertEquals ("test#17", "", C.Prefix);
+                       Assertion.AssertEquals ("test#18", false, C.ReadOnly);
+                       Assertion.AssertEquals ("test#19", null, C.Site);
+                       Assertion.AssertEquals ("test#20", "test_table", C.Table.TableName);
+                       Assertion.AssertEquals ("test#21", "test2", C.ToString ());
+                       Assertion.AssertEquals ("test#22", false, C.Unique);
                }
 
-               public void TestCanRemove ()
+               [Test]
+               public void CanRemove ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataTable Table2 = new DataTable ("test_table_2");
@@ -308,22 +306,22 @@ namespace MonoTests.System.Data
 
                        // LAMESPEC: MSDN says that if C doesn't belong to Cols
                        // Exception is thrown.
-                       AssertEquals ("test#01", false, Cols.CanRemove (C));
+                       Assertion.AssertEquals ("test#01", false, Cols.CanRemove (C));
 
                        Cols.Add (C);
-                       AssertEquals ("test#02", true, Cols.CanRemove (C));
+                       Assertion.AssertEquals ("test#02", true, Cols.CanRemove (C));
 
                        C = new DataColumn ();
                        C.Expression = "test1 + 2";
                        Cols.Add (C);
 
                        C = Cols ["test2"];
-                       AssertEquals ("test#03", false, Cols.CanRemove (C));
+                       Assertion.AssertEquals ("test#03", false, Cols.CanRemove (C));
 
                        C = new DataColumn ("t");
                        Table2.Columns.Add (C);
                        DataColumnCollection Cols2 = Table2.Columns;
-                       AssertEquals ("test#04", true, Cols2.CanRemove (C));
+                       Assertion.AssertEquals ("test#04", true, Cols2.CanRemove (C));
 
                        DataRelation Rel = new DataRelation ("Rel", Table.Columns [0], Table2.Columns [0]);
                        DataSet Set = new DataSet ();
@@ -331,11 +329,12 @@ namespace MonoTests.System.Data
                        Set.Tables.Add (Table2);
                        Set.Relations.Add (Rel);
 
-                       AssertEquals ("test#05", false, Cols2.CanRemove (C));
-                       AssertEquals ("test#06", false, Cols.CanRemove (null));
+                       Assertion.AssertEquals ("test#05", false, Cols2.CanRemove (C));
+                       Assertion.AssertEquals ("test#06", false, Cols.CanRemove (null));
                }
 
-               public void TestClear ()
+               [Test]
+               public void Clear ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataTable Table2 = new DataTable ("test_table2");
@@ -349,7 +348,7 @@ namespace MonoTests.System.Data
                        Cols.Add ("testi");
 
                        Cols.Clear ();
-                       AssertEquals ("test#01", 0, Cols.Count);
+                       Assertion.AssertEquals ("test#01", 0, Cols.Count);
 
                        Cols.Add ();
                        Cols.Add ("testi");
@@ -360,14 +359,15 @@ namespace MonoTests.System.Data
                        Set.Relations.Add (Rel);
                        try {
                                Cols.Clear ();
-                               Fail ("test#02");
+                               Assertion.Fail ("test#02");
                        } catch (Exception e) {
-                               AssertEquals ("test#03", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#04", "Cannot remove this column, because it is part of the parent key for relationship Rel.", e.Message);
+                               Assertion.AssertEquals ("test#03", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#04", "Cannot remove this column, because it is part of the parent key for relationship Rel.", e.Message);
                        }
                }
 
-               public void TestContains ()
+               [Test]
+               public void Contains ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataColumnCollection Cols = Table.Columns;
@@ -375,17 +375,18 @@ namespace MonoTests.System.Data
                        Cols.Add ("test");
                        Cols.Add ("tesT2");
 
-                       AssertEquals ("test#01", true, Cols.Contains ("test"));
-                       AssertEquals ("test#02", false, Cols.Contains ("_test"));
-                       AssertEquals ("test#03", true, Cols.Contains ("TEST"));
+                       Assertion.AssertEquals ("test#01", true, Cols.Contains ("test"));
+                       Assertion.AssertEquals ("test#02", false, Cols.Contains ("_test"));
+                       Assertion.AssertEquals ("test#03", true, Cols.Contains ("TEST"));
                        Table.CaseSensitive = true;
-                       AssertEquals ("test#04", true, Cols.Contains ("TEST"));
-                       AssertEquals ("test#05", true, Cols.Contains ("test2"));
-                       AssertEquals ("test#06", false, Cols.Contains ("_test2"));
-                       AssertEquals ("test#07", true, Cols.Contains ("TEST2"));
+                       Assertion.AssertEquals ("test#04", true, Cols.Contains ("TEST"));
+                       Assertion.AssertEquals ("test#05", true, Cols.Contains ("test2"));
+                       Assertion.AssertEquals ("test#06", false, Cols.Contains ("_test2"));
+                       Assertion.AssertEquals ("test#07", true, Cols.Contains ("TEST2"));
                }
 
-               public void TestCopyTo ()
+               [Test]
+               public void CopyTo ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataColumnCollection Cols = Table.Columns;
@@ -397,39 +398,41 @@ namespace MonoTests.System.Data
 
                        DataColumn [] array = new DataColumn [4];
                        Cols.CopyTo (array, 0);
-                       AssertEquals ("test#01", 4, array.Length);
-                       AssertEquals ("test#02", "test", array [0].ColumnName);
-                       AssertEquals ("test#03", "test2", array [1].ColumnName);
-                       AssertEquals ("test#04", "test3", array [2].ColumnName);
-                       AssertEquals ("test#05", "test4", array [3].ColumnName);
+                       Assertion.AssertEquals ("test#01", 4, array.Length);
+                       Assertion.AssertEquals ("test#02", "test", array [0].ColumnName);
+                       Assertion.AssertEquals ("test#03", "test2", array [1].ColumnName);
+                       Assertion.AssertEquals ("test#04", "test3", array [2].ColumnName);
+                       Assertion.AssertEquals ("test#05", "test4", array [3].ColumnName);
 
                        array = new DataColumn [6];
                        Cols.CopyTo (array, 2);
-                       AssertEquals ("test#06", 6, array.Length);
-                       AssertEquals ("test#07", "test", array [2].ColumnName);
-                       AssertEquals ("test#08", "test2", array [3].ColumnName);
-                       AssertEquals ("test#09", "test3", array [4].ColumnName);
-                       AssertEquals ("test#10", "test4", array [5].ColumnName);
-                       AssertEquals ("test#11", null, array [0]);
-                       AssertEquals ("test#12", null, array [1]);
+                       Assertion.AssertEquals ("test#06", 6, array.Length);
+                       Assertion.AssertEquals ("test#07", "test", array [2].ColumnName);
+                       Assertion.AssertEquals ("test#08", "test2", array [3].ColumnName);
+                       Assertion.AssertEquals ("test#09", "test3", array [4].ColumnName);
+                       Assertion.AssertEquals ("test#10", "test4", array [5].ColumnName);
+                       Assertion.AssertEquals ("test#11", null, array [0]);
+                       Assertion.AssertEquals ("test#12", null, array [1]);
                }
 
-               public void TestEquals ()
+               [Test]
+               public void Equals ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataTable Table2 = new DataTable ("test_table");
                        DataColumnCollection Cols = Table.Columns;
                        DataColumnCollection Cols2 = Table2.Columns;
 
-                       AssertEquals ("test#01", false, Cols.Equals (Cols2));
-                       AssertEquals ("test#02", false, Cols2.Equals (Cols));
-                       AssertEquals ("test#03", false, Object.Equals (Cols, Cols2));
-                       AssertEquals ("test#04", true, Cols.Equals (Cols));
-                       AssertEquals ("test#05", true, Cols2.Equals (Cols2));
-                       AssertEquals ("test#06", true, Object.Equals (Cols2, Cols2));
+                       Assertion.AssertEquals ("test#01", false, Cols.Equals (Cols2));
+                       Assertion.AssertEquals ("test#02", false, Cols2.Equals (Cols));
+                       Assertion.AssertEquals ("test#03", false, Object.Equals (Cols, Cols2));
+                       Assertion.AssertEquals ("test#04", true, Cols.Equals (Cols));
+                       Assertion.AssertEquals ("test#05", true, Cols2.Equals (Cols2));
+                       Assertion.AssertEquals ("test#06", true, Object.Equals (Cols2, Cols2));
                }
 
-               public void TestIndexOf ()
+               [Test]
+               public void IndexOf ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataColumnCollection Cols = Table.Columns;
@@ -439,18 +442,19 @@ namespace MonoTests.System.Data
                        Cols.Add ("test3");
                        Cols.Add ("test4");
 
-                       AssertEquals ("test#01", 0, Cols.IndexOf ("test"));
-                       AssertEquals ("test#02", 1, Cols.IndexOf ("TEST2"));
+                       Assertion.AssertEquals ("test#01", 0, Cols.IndexOf ("test"));
+                       Assertion.AssertEquals ("test#02", 1, Cols.IndexOf ("TEST2"));
                        Table.CaseSensitive = true;
-                       AssertEquals ("test#03", 1, Cols.IndexOf ("TEST2"));
+                       Assertion.AssertEquals ("test#03", 1, Cols.IndexOf ("TEST2"));
 
-                       AssertEquals ("test#04", 3, Cols.IndexOf (Cols [3]));
+                       Assertion.AssertEquals ("test#04", 3, Cols.IndexOf (Cols [3]));
                        DataColumn C = new DataColumn ("error");
-                       AssertEquals ("test#05", -1, Cols.IndexOf (C));
-                       AssertEquals ("test#06", -1, Cols.IndexOf ("_error_"));
+                       Assertion.AssertEquals ("test#05", -1, Cols.IndexOf (C));
+                       Assertion.AssertEquals ("test#06", -1, Cols.IndexOf ("_error_"));
                }
 
-               public void TestRemove ()
+               [Test]
+               public void Remove ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataColumnCollection Cols = Table.Columns;
@@ -460,18 +464,18 @@ namespace MonoTests.System.Data
                        Cols.Add ("test3");
                        Cols.Add ("test4");
 
-                       AssertEquals ("test#01", 4, Cols.Count);
+                       Assertion.AssertEquals ("test#01", 4, Cols.Count);
                        Cols.Remove ("test2");
-                       AssertEquals ("test#02", 3, Cols.Count);
+                       Assertion.AssertEquals ("test#02", 3, Cols.Count);
                        Cols.Remove ("TEST3");
-                       AssertEquals ("test#03", 2, Cols.Count);
+                       Assertion.AssertEquals ("test#03", 2, Cols.Count);
 
                        try {
                                Cols.Remove ("_test_");
-                               Fail ("test#04");
+                               Assertion.Fail ("test#04");
                        } catch (Exception e) {
-                               AssertEquals ("test#05", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#06", "Column '_test_' does not belong to table test_table.", e.Message);
+                               Assertion.AssertEquals ("test#05", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#06", "Column '_test_' does not belong to table test_table.", e.Message);
                        }
 
                        Cols.Add ();
@@ -479,18 +483,18 @@ namespace MonoTests.System.Data
                        Cols.Add ();
                        Cols.Add ();
 
-                       AssertEquals ("test#07", 6, Cols.Count);
+                       Assertion.AssertEquals ("test#07", 6, Cols.Count);
                        Cols.Remove (Cols [0]);
                        Cols.Remove (Cols [0]);
-                       AssertEquals ("test#08", 4, Cols.Count);
-                       AssertEquals ("test#09", "Column1", Cols [0].ColumnName);
+                       Assertion.AssertEquals ("test#08", 4, Cols.Count);
+                       Assertion.AssertEquals ("test#09", "Column1", Cols [0].ColumnName);
 
                        try {
                                Cols.Remove (new DataColumn ("Column1"));
-                               Fail ("test#10");
+                               Assertion.Fail ("test#10");
                        } catch (Exception e) {
-                               AssertEquals ("test#11", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#12", "Cannot remove a column that doesn't belong to this table.", e.Message);
+                               Assertion.AssertEquals ("test#11", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#12", "Cannot remove a column that doesn't belong to this table.", e.Message);
                        }
 
                        Cols.Add ();
@@ -498,25 +502,26 @@ namespace MonoTests.System.Data
                        Cols.Add ();
                        Cols.Add ();
 
-                       AssertEquals ("test#13", 8, Cols.Count);
+                       Assertion.AssertEquals ("test#13", 8, Cols.Count);
                        Cols.RemoveAt (7);
                        Cols.RemoveAt (1);
                        Cols.RemoveAt (0);
                        Cols.RemoveAt (0);
-                       AssertEquals ("test#14", 4, Cols.Count);
-                       AssertEquals ("test#15", "Column4", Cols [0].ColumnName);
-                       AssertEquals ("test#16", "Column5", Cols [1].ColumnName);
+                       Assertion.AssertEquals ("test#14", 4, Cols.Count);
+                       Assertion.AssertEquals ("test#15", "Column4", Cols [0].ColumnName);
+                       Assertion.AssertEquals ("test#16", "Column5", Cols [1].ColumnName);
 
                        try {
                                Cols.RemoveAt (10);
-                               Fail ("test#17");
+                               Assertion.Fail ("test#17");
                        } catch (Exception e) {
-                               AssertEquals ("test#18", typeof (IndexOutOfRangeException), e.GetType ());
-                               AssertEquals ("test#19", "Cannot find column 10.", e.Message);
+                               Assertion.AssertEquals ("test#18", typeof (IndexOutOfRangeException), e.GetType ());
+                               Assertion.AssertEquals ("test#19", "Cannot find column 10.", e.Message);
                        }
                }
 
-               public void TestToString ()
+               [Test]
+               public void ToStringTest ()
                {
                        DataTable Table = new DataTable ("test_table");
                        DataColumnCollection Cols = Table.Columns;
@@ -524,7 +529,7 @@ namespace MonoTests.System.Data
                        Cols.Add ("test");
                        Cols.Add ("test2");
                        Cols.Add ("test3");
-                       AssertEquals ("test#01", "System.Data.DataColumnCollection", Cols.ToString ());
+                       Assertion.AssertEquals ("test#01", "System.Data.DataColumnCollection", Cols.ToString ());
                }
        }
 }
index 1c5a5e12a40c79ada71aff33f02418efe2291e71..6d72b553b2ebdf8e36dbb9a1da4ed2e1d9cef071 100644 (file)
@@ -1,13 +1,15 @@
 // DataColumnTest.cs - NUnit Test Cases for System.Data.DataColumn
 //
-// Author:
+// Authors:
 //   Franklin Wise <gracenote@earthlink.net>
 //   Rodrigo Moya <rodrigo@ximian.com>
 //   Daniel Morgan <danmorg@sc.rr.com>
+//   Martin Willemoes Hansen <mwh@sysrq.dk>
 //
 // (C) Copyright 2002 Franklin Wise
 // (C) Copyright 2002 Rodrigo Moya
 // (C) Copyright 2003 Daniel Morgan
+// (C) Copyright 2003 Martin Willemoes Hansen
 //
 
 using NUnit.Framework;
@@ -16,27 +18,19 @@ using System.Data;
 
 namespace MonoTests.System.Data
 {
-       public class DataColumnTest : TestCase
+       [TestFixture]
+       public class DataColumnTest
        {
-               public DataColumnTest () : base ("System.Data.DataColumn") {}
-               public DataColumnTest (string name) : base (name) {}
-
                private DataTable _tbl;
 
-               protected override void SetUp () 
+               [SetUp]
+               public void GetReady () 
                {
                        _tbl = new DataTable();
                }
 
-               protected override void TearDown() {}
-
-               public static ITest Suite {
-                       get { 
-                               return new TestSuite (typeof (DataColumnTest)); 
-                       }
-               }
-
-               public void TestCtor()  
+               [Test]
+               public void Ctor()      
                {
                        string colName = "ColName";
                        DataColumn col = new DataColumn();
@@ -54,7 +48,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("DC7: Failed to throw ArgumentNullException.");
                        }
                        catch (ArgumentNullException){}
-                       catch (AssertionFailedError exc) {throw  exc;}
+                       catch (AssertionException exc) {throw  exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("DC8: DataColumnNull. Wrong exception type. Got:" + exc);
@@ -62,7 +56,8 @@ namespace MonoTests.System.Data
 
                }
 
-               public void TestAllowDBNull()
+               [Test]
+               public void AllowDBNull()
                {
                        DataColumn col = new DataColumn("NullCheck",typeof(int));
                        _tbl.Columns.Add(col);
@@ -72,7 +67,8 @@ namespace MonoTests.System.Data
                        col.AllowDBNull = false;
                }
 
-               public void TestAutoIncrement()
+               [Test]
+               public void AutoIncrement()
                {
                        DataColumn col = new DataColumn("Auto",typeof(string));
                        col.AutoIncrement = true;
@@ -85,7 +81,8 @@ namespace MonoTests.System.Data
                        Assertion.Assert("DC11: AutoInc type convert failed." ,col.DataType == typeof (int));
                }
 
-               public void TestAutoIncrementExceptions()
+               [Test]
+               public void AutoIncrementExceptions()
                {
                        DataColumn col = new DataColumn();
 
@@ -98,7 +95,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("DC12: Failed to throw ArgumentException");
                        }
                        catch (ArgumentException){}
-                       catch (AssertionFailedError exc) {throw  exc;}
+                       catch (AssertionException exc) {throw  exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("DC13: ExprAutoInc. Wrong exception type. Got:" + exc);
@@ -107,7 +104,8 @@ namespace MonoTests.System.Data
 
                }
 
-               public void TestCaption()
+               [Test]
+               public void Caption()
                {
                        DataColumn col = new DataColumn("ColName");
                        //Caption not set at this point
@@ -123,7 +121,8 @@ namespace MonoTests.System.Data
                        
                }
 
-               public void TestForColumnNameException()
+               [Test]
+               public void ForColumnNameException()
                {
                        DataColumn col = new DataColumn();
                        DataColumn col2 = new DataColumn();
@@ -131,7 +130,7 @@ namespace MonoTests.System.Data
                        DataColumn col4 = new DataColumn();
                        
                        col.ColumnName = "abc";
-                       AssertEquals( "abc", col.ColumnName);
+                       Assertion.AssertEquals( "abc", col.ColumnName);
 
                        _tbl.Columns.Add(col);
                        
@@ -140,11 +139,11 @@ namespace MonoTests.System.Data
                        {
                                col2.ColumnName = "abc";
                                _tbl.Columns.Add(col2);
-                               AssertEquals( "abc", col2.ColumnName);
+                               Assertion.AssertEquals( "abc", col2.ColumnName);
                                Assertion.Fail("DC17: Failed to throw duplicate name exception.");
                        }
                        catch (DuplicateNameException){}
-                       catch (AssertionFailedError exc) {throw  exc;}
+                       catch (AssertionException exc) {throw  exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("DC18: Wrong exception type. " + exc.ToString());
@@ -155,7 +154,8 @@ namespace MonoTests.System.Data
                        _tbl.Columns.Add(col3);
                }
 
-               public void TestDefaultValue()
+               [Test]
+               public void DefaultValue()
                {
                        DataTable tbl = new DataTable();
                        tbl.Columns.Add("MyCol", typeof(int));
@@ -168,7 +168,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("DC19: Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException){}
-                       catch (AssertionFailedError exc) {throw  exc;}
+                       catch (AssertionException exc) {throw  exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("DC20: Wrong exception type. " + exc.ToString());
@@ -184,7 +184,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("DC21: Failed to throw InvalidCastException.");
                        }
                        catch (InvalidCastException){}
-                       catch (AssertionFailedError exc) {throw  exc;}
+                       catch (AssertionException exc) {throw  exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("DC22: Wrong exception type. " + exc.ToString());
@@ -198,7 +198,8 @@ namespace MonoTests.System.Data
 
                }
 
-               public void TestSetDataType()
+               [Test]
+               public void SetDataType()
                {
                        //test for DataAlready exists and change the datatype
                        
@@ -208,69 +209,72 @@ namespace MonoTests.System.Data
 
                }
 
-               public void TestDefaults1() 
+               [Test]
+               public void Defaults1() 
                {
                        //Check for defaults - ColumnName not set at the beginning
-                       DataTable table = new DataTable();              \r
-                       DataColumn column = new DataColumn();\r
-                       \r
-                       Assertion.AssertEquals("DC1: ColumnName default Before Add", column.ColumnName, String.Empty);\r
-                       Assertion.AssertEquals("DC2: DataType default Before Add", column.DataType.ToString(), typeof(string).ToString());\r
-                       \r
-                       table.Columns.Add(column);\r
-                       \r
-                       Assertion.AssertEquals("DC3: ColumnName default After Add", table.Columns[0].ColumnName, "Column1");\r
-                       Assertion.AssertEquals("DC4: DataType default After Add", table.Columns[0].DataType.ToString(), typeof(string).ToString());     \r
-                       \r
-                       DataRow row = table.NewRow();\r
-                       table.Rows.Add(row);\r
-                       DataRow dataRow = table.Rows[0];\r
-                       \r
-                       object v = null;\r
-                       try {\r
-                               v = dataRow.ItemArray[0];\r
-                       }\r
-                       catch(Exception e) {\r
-                               Assertion.Fail("DC5: getting item from dataRow.ItemArray[0] threw Exception: " + e);\r
-                       }\r
-                       \r
-                       Type vType = dataRow.ItemArray[0].GetType();\r
-                       Assertion.AssertEquals("DC6: Value from DataRow.Item", v, DBNull.Value);\r
+                       DataTable table = new DataTable();              
+                       DataColumn column = new DataColumn();
+                       
+                       Assertion.AssertEquals("DC1: ColumnName default Before Add", column.ColumnName, String.Empty);
+                       Assertion.AssertEquals("DC2: DataType default Before Add", column.DataType.ToString(), typeof(string).ToString());
+                       
+                       table.Columns.Add(column);
+                       
+                       Assertion.AssertEquals("DC3: ColumnName default After Add", table.Columns[0].ColumnName, "Column1");
+                       Assertion.AssertEquals("DC4: DataType default After Add", table.Columns[0].DataType.ToString(), typeof(string).ToString());     
+                       
+                       DataRow row = table.NewRow();
+                       table.Rows.Add(row);
+                       DataRow dataRow = table.Rows[0];
+                       
+                       object v = null;
+                       try {
+                               v = dataRow.ItemArray[0];
+                       }
+                       catch(Exception e) {
+                               Assertion.Fail("DC5: getting item from dataRow.ItemArray[0] threw Exception: " + e);
+                       }
+                       
+                       Type vType = dataRow.ItemArray[0].GetType();
+                       Assertion.AssertEquals("DC6: Value from DataRow.Item", v, DBNull.Value);
                }
 
-               public void TestDefaults2() 
+               [Test]
+               public void Defaults2() 
                {
                        //Check for defaults - ColumnName set at the beginning
                        string blah = "Blah";
                        //Check for defaults - ColumnName not set at the beginning
-                       DataTable table = new DataTable();              \r
-                       DataColumn column = new DataColumn(blah);\r
-                       \r
-                       Assertion.AssertEquals("DC23: ColumnName default Before Add", column.ColumnName,blah);\r
-                       Assertion.AssertEquals("DC24: DataType default Before Add", column.DataType.ToString(), typeof(string).ToString());\r
-                       \r
-                       table.Columns.Add(column);\r
-                       \r
-                       Assertion.AssertEquals("DC25: ColumnName default After Add", table.Columns[0].ColumnName, blah);\r
-                       Assertion.AssertEquals("DC26: DataType default After Add", table.Columns[0].DataType.ToString(), typeof(string).ToString());    \r
-                       \r
-                       DataRow row = table.NewRow();\r
-                       table.Rows.Add(row);\r
-                       DataRow dataRow = table.Rows[0];\r
-\r
-                       object v = null;\r
-                       try {\r
-                               v = dataRow.ItemArray[0];\r
-                       }\r
-                       catch(Exception e) {\r
-                               Assertion.Fail("DC27: getting item from dataRow.ItemArray[0] threw Exception: " + e);\r
-                       }\r
-                       \r
-                       Type vType = dataRow.ItemArray[0].GetType();\r
+                       DataTable table = new DataTable();              
+                       DataColumn column = new DataColumn(blah);
+                       
+                       Assertion.AssertEquals("DC23: ColumnName default Before Add", column.ColumnName,blah);
+                       Assertion.AssertEquals("DC24: DataType default Before Add", column.DataType.ToString(), typeof(string).ToString());
+                       
+                       table.Columns.Add(column);
+                       
+                       Assertion.AssertEquals("DC25: ColumnName default After Add", table.Columns[0].ColumnName, blah);
+                       Assertion.AssertEquals("DC26: DataType default After Add", table.Columns[0].DataType.ToString(), typeof(string).ToString());    
+                       
+                       DataRow row = table.NewRow();
+                       table.Rows.Add(row);
+                       DataRow dataRow = table.Rows[0];
+
+                       object v = null;
+                       try {
+                               v = dataRow.ItemArray[0];
+                       }
+                       catch(Exception e) {
+                               Assertion.Fail("DC27: getting item from dataRow.ItemArray[0] threw Exception: " + e);
+                       }
+                       
+                       Type vType = dataRow.ItemArray[0].GetType();
                        Assertion.AssertEquals("DC28: Value from DataRow.Item", v, DBNull.Value);
                }
 
-                public void TestExpressionFunctions ()
+               [Test]
+                public void ExpressionFunctions ()
                 {
                        DataTable T = new DataTable ("test");
                        DataColumn C = new DataColumn ("name");
@@ -298,19 +302,19 @@ namespace MonoTests.System.Data
                        Row [1] = DBNull.Value;
                        T.Rows.Add (Row);
                                                
-                       AssertEquals ("DC29", "hum710", T.Rows [10] [2]);
-                       AssertEquals ("DC30", "hum64", T.Rows [4] [2]);
+                       Assertion.AssertEquals ("DC29", "hum710", T.Rows [10] [2]);
+                       Assertion.AssertEquals ("DC30", "hum64", T.Rows [4] [2]);
                        C = T.Columns [2];
                        C.Expression = "isnull (age, 'succ[[]]ess')";
-                       AssertEquals ("DC31", "succ[[]]ess", T.Rows [100] [2]);
+                       Assertion.AssertEquals ("DC31", "succ[[]]ess", T.Rows [100] [2]);
                        
                        C.Expression = "iif (age = 24, 'hurrey', 'boo')";
-                       AssertEquals ("DC32", "boo", T.Rows [50] [2]);
-                       AssertEquals ("DC33", "hurrey", T.Rows [24] [2]);
+                       Assertion.AssertEquals ("DC32", "boo", T.Rows [50] [2]);
+                       Assertion.AssertEquals ("DC33", "hurrey", T.Rows [24] [2]);
                        
                        C.Expression = "convert (age, 'System.Boolean')";
-                       AssertEquals ("DC32", Boolean.TrueString, T.Rows [50] [2]);
-                       AssertEquals ("DC32", Boolean.FalseString, T.Rows [0] [2]);
+                       Assertion.AssertEquals ("DC32", Boolean.TrueString, T.Rows [50] [2]);
+                       Assertion.AssertEquals ("DC32", Boolean.FalseString, T.Rows [0] [2]);
                        
                        //
                        // Exceptions
@@ -318,41 +322,42 @@ namespace MonoTests.System.Data
                        
                        try {
                                C.Expression = "iff (age = 24, 'hurrey', 'boo')";
-                               Fail ("DC34");
+                               Assertion.Fail ("DC34");
                        } catch (Exception e) {
                                                        
                                // The expression contains undefined function call iff().
-                               AssertEquals ("DC35", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("DC35", typeof (EvaluateException), e.GetType ());
                        }
                        
                        try {
                                C.Expression = "iif (nimi = 24, 'hurrey', 'boo')";
-                               Fail ("DC36");
+                               Assertion.Fail ("DC36");
                        } catch (Exception e) {                                         
-                               AssertEquals ("DC37", typeof (EvaluateException), e.GetType ());
-                               AssertEquals ("DC38", "Cannot find column [nimi].", e.Message);
+                               Assertion.AssertEquals ("DC37", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("DC38", "Cannot find column [nimi].", e.Message);
                        }
                        
                        try {
                                C.Expression = "iif (name = 24, 'hurrey', 'boo')";
-                               Fail ("DC39");
+                               Assertion.Fail ("DC39");
                        } catch (Exception e) {
-                               AssertEquals ("DC40", typeof (EvaluateException), e.GetType ());
-                               AssertEquals ("DC41", "Cannot perform '=' operation on System.String and System.Int32.", e.Message);
+                               Assertion.AssertEquals ("DC40", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("DC41", "Cannot perform '=' operation on System.String and System.Int32.", e.Message);
                        }
                        
 
                        try {
                                C.Expression = "convert (age, Boolean)";        
-                               Fail ("DC42");
+                               Assertion.Fail ("DC42");
                        } catch (Exception e) {
-                               AssertEquals ("DC43", typeof (EvaluateException), e.GetType ());
-                               AssertEquals ("DC44", "Invalid type name 'Boolean'.", e.Message);
+                               Assertion.AssertEquals ("DC43", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("DC44", "Invalid type name 'Boolean'.", e.Message);
                        }
                        
                 }
 
-                public void TestExpressionAggregates ()
+               [Test]
+                public void ExpressionAggregates ()
                 {
                        DataTable T = new DataTable ("test");
                        DataTable T2 = new DataTable ("test2");
@@ -408,35 +413,36 @@ namespace MonoTests.System.Data
                        
                        C = T.Columns [3];
                        C.Expression = "Sum (Child.age)";
-                       AssertEquals ("DC45", "-2", T.Rows [0] [3]);
-                       AssertEquals ("DC46", "98", T.Rows [50] [3]);
+                       Assertion.AssertEquals ("DC45", "-2", T.Rows [0] [3]);
+                       Assertion.AssertEquals ("DC46", "98", T.Rows [50] [3]);
                        
                        C.Expression = "Count (Child.age)";
-                       AssertEquals ("DC47", "2", T.Rows [0] [3]);
-                       AssertEquals ("DC48", "2", T.Rows [60] [3]);                                    
+                       Assertion.AssertEquals ("DC47", "2", T.Rows [0] [3]);
+                       Assertion.AssertEquals ("DC48", "2", T.Rows [60] [3]);                                  
                
                        C.Expression = "Avg (Child.age)";
-                       AssertEquals ("DC49", "-1", T.Rows [0] [3]);
-                       AssertEquals ("DC50", "59", T.Rows [60] [3]);                                   
+                       Assertion.AssertEquals ("DC49", "-1", T.Rows [0] [3]);
+                       Assertion.AssertEquals ("DC50", "59", T.Rows [60] [3]);                                 
 
                        C.Expression = "Min (Child.age)";
-                       AssertEquals ("DC51", "-2", T.Rows [0] [3]);
-                       AssertEquals ("DC52", "58", T.Rows [60] [3]);                                   
+                       Assertion.AssertEquals ("DC51", "-2", T.Rows [0] [3]);
+                       Assertion.AssertEquals ("DC52", "58", T.Rows [60] [3]);                                 
 
                        C.Expression = "Max (Child.age)";
-                       AssertEquals ("DC53", "0", T.Rows [0] [3]);
-                       AssertEquals ("DC54", "60", T.Rows [60] [3]);                                   
+                       Assertion.AssertEquals ("DC53", "0", T.Rows [0] [3]);
+                       Assertion.AssertEquals ("DC54", "60", T.Rows [60] [3]);                                 
 
                        C.Expression = "stdev (Child.age)";
-                       AssertEquals ("DC55", "1,4142135623731", T.Rows [0] [3]);
-                       AssertEquals ("DC56", "1,4142135623731", T.Rows [60] [3]);                                      
+                       Assertion.AssertEquals ("DC55", "1,4142135623731", T.Rows [0] [3]);
+                       Assertion.AssertEquals ("DC56", "1,4142135623731", T.Rows [60] [3]);                                    
 
                        C.Expression = "var (Child.age)";
-                       AssertEquals ("DC57", "2", T.Rows [0] [3]);
-                       AssertEquals ("DC58", "2", T.Rows [60] [3]);                                    
+                       Assertion.AssertEquals ("DC57", "2", T.Rows [0] [3]);
+                       Assertion.AssertEquals ("DC58", "2", T.Rows [60] [3]);                                  
                 }
 
-               public void TestExpressionOperator ()
+               [Test]
+               public void ExpressionOperator ()
                {
                        DataTable T = new DataTable ("test");
                        DataColumn C = new DataColumn ("name");
@@ -466,51 +472,51 @@ namespace MonoTests.System.Data
                        
                        C = T.Columns [2];
                        C.Expression = "age + 4";
-                       AssertEquals ("DC59", "68", T.Rows [64] [2]);
+                       Assertion.AssertEquals ("DC59", "68", T.Rows [64] [2]);
                        
                        C.Expression = "age - 4";
-                       AssertEquals ("DC60", "60", T.Rows [64] [2]);
+                       Assertion.AssertEquals ("DC60", "60", T.Rows [64] [2]);
                        
                        C.Expression = "age * 4";
-                       AssertEquals ("DC61", "256", T.Rows [64] [2]);
+                       Assertion.AssertEquals ("DC61", "256", T.Rows [64] [2]);
                        
                        C.Expression = "age / 4";
-                       AssertEquals ("DC62", "16", T.Rows [64] [2]);
+                       Assertion.AssertEquals ("DC62", "16", T.Rows [64] [2]);
                        
                        C.Expression = "age % 5";
-                       AssertEquals ("DC63", "4", T.Rows [64] [2]);
+                       Assertion.AssertEquals ("DC63", "4", T.Rows [64] [2]);
                        
                        C.Expression = "age in (5, 10, 15, 20, 25)";
-                       AssertEquals ("DC64", "False", T.Rows [64] [2]);
-                       AssertEquals ("DC65", "True", T.Rows [25] [2]);
+                       Assertion.AssertEquals ("DC64", "False", T.Rows [64] [2]);
+                       Assertion.AssertEquals ("DC65", "True", T.Rows [25] [2]);
                        
                        C.Expression = "name like 'human1%'";
-                       AssertEquals ("DC66", "True", T.Rows [1] [2]);
-                       AssertEquals ("DC67", "False", T.Rows [25] [2]);
+                       Assertion.AssertEquals ("DC66", "True", T.Rows [1] [2]);
+                       Assertion.AssertEquals ("DC67", "False", T.Rows [25] [2]);
 
                        C.Expression = "age < 4";
-                       AssertEquals ("DC68", "False", T.Rows [4] [2]);
-                       AssertEquals ("DC69", "True", T.Rows [3] [2]);
+                       Assertion.AssertEquals ("DC68", "False", T.Rows [4] [2]);
+                       Assertion.AssertEquals ("DC69", "True", T.Rows [3] [2]);
 
                        C.Expression = "age <= 4";
-                       AssertEquals ("DC70", "True", T.Rows [4] [2]);
-                       AssertEquals ("DC71", "False", T.Rows [5] [2]);
+                       Assertion.AssertEquals ("DC70", "True", T.Rows [4] [2]);
+                       Assertion.AssertEquals ("DC71", "False", T.Rows [5] [2]);
 
                        C.Expression = "age > 4";
-                       AssertEquals ("DC72", "False", T.Rows [4] [2]);
-                       AssertEquals ("DC73", "True", T.Rows [5] [2]);
+                       Assertion.AssertEquals ("DC72", "False", T.Rows [4] [2]);
+                       Assertion.AssertEquals ("DC73", "True", T.Rows [5] [2]);
 
                        C.Expression = "age >= 4";
-                       AssertEquals ("DC74", "True", T.Rows [4] [2]);
-                       AssertEquals ("DC75", "False", T.Rows [1] [2]);
+                       Assertion.AssertEquals ("DC74", "True", T.Rows [4] [2]);
+                       Assertion.AssertEquals ("DC75", "False", T.Rows [1] [2]);
 
                        C.Expression = "age = 4";
-                       AssertEquals ("DC76", "True", T.Rows [4] [2]);
-                       AssertEquals ("DC77", "False", T.Rows [1] [2]);
+                       Assertion.AssertEquals ("DC76", "True", T.Rows [4] [2]);
+                       Assertion.AssertEquals ("DC77", "False", T.Rows [1] [2]);
 
                        C.Expression = "age <> 4";
-                       AssertEquals ("DC76", "False", T.Rows [4] [2]);
-                       AssertEquals ("DC77", "True", T.Rows [1] [2]);
+                       Assertion.AssertEquals ("DC76", "False", T.Rows [4] [2]);
+                       Assertion.AssertEquals ("DC77", "True", T.Rows [1] [2]);
                }
        }
 }
index c398065e9de1493b48535e51a6d905d0c2646d67..58cde4e3c198729eda23f4e6181e3b6188b47bfa 100644 (file)
@@ -1,9 +1,12 @@
 //\r
 // DataRelationTest.cs - NUnit Test Cases for  DataRelation\r
 //\r
-// Ville Palo (vi64pa@koti.soon.fi)\r
+// Authors:\r
+//   Ville Palo (vi64pa@koti.soon.fi)\r
+//   Martin Willemoes Hansen (mwh@sysrq.dk)\r
 //\r
-// (C) Ville Palo 2003\r
+// (C) 2003 Ville Palo\r
+// (C) 2003 Martin Willemoes Hansen\r
 // \r
 \r
 using NUnit.Framework;\r
@@ -12,17 +15,15 @@ using System.Data;
 \r
 namespace MonoTests.System.Data\r
 {\r
-\r
-        public class DataRelationTest : TestCase \r
+       [TestFixture]\r
+        public class DataRelationTest\r
         {\r
-                public DataRelationTest() : base ("MonoTests.System.Data.DataRelation") {}\r
-                public DataRelationTest(string name) : base(name) {}\r
-\r
                private DataSet Set = null;\r
                private DataTable Mom = null;\r
                private DataTable Child = null;         \r
 \r
-                protected override void SetUp() \r
+               [SetUp]\r
+                public void GetReady() \r
                {\r
                        Set = new DataSet ();\r
                        Mom = new DataTable ("Mom");\r
@@ -42,15 +43,8 @@ namespace MonoTests.System.Data
                        Child.Columns.Add (Col4);\r
                }  \r
                 \r
-                protected override void TearDown() {}\r
-\r
-                public static ITest Suite {\r
-                        get { \r
-                                return new TestSuite(typeof(DataRelationTest)); \r
-                        }\r
-                }\r
-\r
-                public void TestForeign ()\r
+               [Test]\r
+                public void Foreign ()\r
                 {\r
                        DataRelation Relation = new DataRelation ("Rel", Mom.Columns [1], Child.Columns [0]);\r
                        Set.Relations.Add (Relation);\r
@@ -79,12 +73,12 @@ namespace MonoTests.System.Data
                        Row [1] = 56;\r
                        Child.Rows.Add (Row);\r
                        \r
-                       AssertEquals ("test#01", 2, Child.Rows.Count);\r
+                       Assertion.AssertEquals ("test#01", 2, Child.Rows.Count);\r
                        \r
                        Row = Mom.Rows [0];\r
                        Row.Delete ();\r
                        \r
-                       AssertEquals ("test#02", 1, Child.Rows.Count);\r
+                       Assertion.AssertEquals ("test#02", 1, Child.Rows.Count);\r
                        \r
                        Row = Mom.NewRow ();\r
                        Row [0] = "Teresa";\r
@@ -92,17 +86,17 @@ namespace MonoTests.System.Data
                        \r
                        try {\r
                                Mom.Rows.Add (Row);\r
-                               Fail ("test#03");\r
+                               Assertion.Fail ("test#03");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("test#04", typeof (ConstraintException), e.GetType ());\r
-                               AssertEquals ("test#05", "Column 'ChildName' is constrained to be unique.  Value 'Dick' is already present.", e.Message);\r
+                               Assertion.AssertEquals ("test#04", typeof (ConstraintException), e.GetType ());\r
+                               Assertion.AssertEquals ("test#05", "Column 'ChildName' is constrained to be unique.  Value 'Dick' is already present.", e.Message);\r
                        }                       \r
 \r
                        Row = Mom.NewRow ();                                 \r
                         Row [0] = "Teresa";                                  \r
                         Row [1] = "Mich";                                    \r
                         Mom.Rows.Add (Row);                                  \r
-                        AssertEquals ("test#06", 1, Child.Rows.Count);       \r
+                        Assertion.AssertEquals ("test#06", 1, Child.Rows.Count);       \r
                        \r
                         Row = Child.NewRow ();                               \r
                         Row [0] = "Jack";                                    \r
@@ -110,24 +104,25 @@ namespace MonoTests.System.Data
                        \r
                         try {                                                \r
                                 Child.Rows.Add (Row);                               \r
-                                Fail ("test#07");                                   \r
+                                Assertion.Fail ("test#07");                                   \r
                         } catch (Exception e) {                              \r
-                                AssertEquals ("test#08", typeof (InvalidConstraintException), e.GetType ());\r
-                                AssertEquals ("test#09", "ForeignKeyConstraint Rel requires the child key values (Jack) to exist in the parent table.", e.Message);                                                                      \r
+                                Assertion.AssertEquals ("test#08", typeof (InvalidConstraintException), e.GetType ());\r
+                                Assertion.AssertEquals ("test#09", "ForeignKeyConstraint Rel requires the child key values (Jack) to exist in the parent table.", e.Message);                                                                      \r
                         }                                                    \r
 \r
                 }\r
 \r
-               public void TestInvalidConstraintException ()\r
+               [Test]\r
+               public void InvalidConstraintException ()\r
                {\r
                        \r
                        DataRelation Relation = null;\r
                        try {\r
                                Relation = new DataRelation ("Rel", Mom.Columns [1], Child.Columns [1], true);\r
-                               Fail ("test#01");\r
+                               Assertion.Fail ("test#01");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("test#02", typeof (InvalidConstraintException), e.GetType ());\r
-                               AssertEquals ("test#03", "Parent Columns and Child Columns don't have type-matching columns.", e.Message);\r
+                               Assertion.AssertEquals ("test#02", typeof (InvalidConstraintException), e.GetType ());\r
+                               Assertion.AssertEquals ("test#03", "Parent Columns and Child Columns don't have type-matching columns.", e.Message);\r
                        }\r
                        \r
                        Child.Columns [1].DataType = Mom.Columns [1].DataType;\r
@@ -137,80 +132,84 @@ namespace MonoTests.System.Data
                        \r
                        try {\r
                                Child.Columns [1].DataType = Type.GetType ("System.Double");\r
-                               Fail ("test#04");\r
+                               Assertion.Fail ("test#04");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("test#05", typeof (InvalidConstraintException), e.GetType ());\r
-                               AssertEquals ("test#06", "Parent Columns and Child Columns don't have type-matching columns.", e.Message);\r
+                               Assertion.AssertEquals ("test#05", typeof (InvalidConstraintException), e.GetType ());\r
+                               Assertion.AssertEquals ("test#06", "Parent Columns and Child Columns don't have type-matching columns.", e.Message);\r
                        }                                                                       \r
                }\r
                \r
-               public void TestDataSetRelations ()\r
+               [Test]\r
+               public void DataSetRelations ()\r
                {\r
                        DataRelation Relation;\r
-                       AssertEquals ("test#01", 0, Set.Relations.Count);\r
-                       AssertEquals ("test#02", 0, Mom.ParentRelations.Count);\r
-                       AssertEquals ("test#03", 0, Mom.ChildRelations.Count);\r
-                       AssertEquals ("test#04", 0, Child.ParentRelations.Count);\r
-                       AssertEquals ("test#05", 0, Child.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#01", 0, Set.Relations.Count);\r
+                       Assertion.AssertEquals ("test#02", 0, Mom.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#03", 0, Mom.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#04", 0, Child.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#05", 0, Child.ChildRelations.Count);\r
                        \r
                        Relation = new DataRelation ("Rel", Mom.Columns [1], Child.Columns [0]);\r
                        Set.Relations.Add (Relation);\r
                        \r
-                       AssertEquals ("test#06", 1, Set.Relations.Count);\r
-                       AssertEquals ("test#07", 0, Mom.ParentRelations.Count);\r
-                       AssertEquals ("test#08", 1, Mom.ChildRelations.Count);\r
-                       AssertEquals ("test#09", 1, Child.ParentRelations.Count);\r
-                       AssertEquals ("test#10", 0, Child.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#06", 1, Set.Relations.Count);\r
+                       Assertion.AssertEquals ("test#07", 0, Mom.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#08", 1, Mom.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#09", 1, Child.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#10", 0, Child.ChildRelations.Count);\r
                                                \r
                        Relation = Set.Relations [0];\r
-                       AssertEquals ("test#11", 1, Relation.ParentColumns.Length);\r
-                       AssertEquals ("test#12", 1, Relation.ChildColumns.Length);\r
-                       AssertEquals ("test#13", "Rel", Relation.ChildKeyConstraint.ConstraintName);\r
-                       AssertEquals ("test#14", "Constraint1", Relation.ParentKeyConstraint.ConstraintName);\r
+                       Assertion.AssertEquals ("test#11", 1, Relation.ParentColumns.Length);\r
+                       Assertion.AssertEquals ("test#12", 1, Relation.ChildColumns.Length);\r
+                       Assertion.AssertEquals ("test#13", "Rel", Relation.ChildKeyConstraint.ConstraintName);\r
+                       Assertion.AssertEquals ("test#14", "Constraint1", Relation.ParentKeyConstraint.ConstraintName);\r
                }\r
                \r
-               public void TestConstraints ()\r
+               [Test]\r
+               public void Constraints ()\r
                {\r
                                \r
-                       AssertEquals ("test#01", 0, Mom.Constraints.Count);\r
-                       AssertEquals ("test#02", 0, Child.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#01", 0, Mom.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#02", 0, Child.Constraints.Count);\r
 \r
                        DataRelation Relation = new DataRelation ("Rel", Mom.Columns [1], Child.Columns [0]);\r
                        Set.Relations.Add (Relation);\r
                        \r
-                       AssertEquals ("test#03", 1, Mom.Constraints.Count);\r
-                       AssertEquals ("test#04", 1, Child.Constraints.Count);\r
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Child.Constraints [0].GetType ());\r
-                       AssertEquals ("test#05", typeof (UniqueConstraint), Mom.Constraints [0].GetType ());\r
+                       Assertion.AssertEquals ("test#03", 1, Mom.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#04", 1, Child.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#05", typeof (ForeignKeyConstraint), Child.Constraints [0].GetType ());\r
+                       Assertion.AssertEquals ("test#05", typeof (UniqueConstraint), Mom.Constraints [0].GetType ());\r
                        \r
                }\r
 \r
-               public void TestCreation ()\r
+               [Test]\r
+               public void Creation ()\r
                {\r
                        \r
                        DataRelation Relation = new DataRelation ("Rel", Mom.Columns [1], Child.Columns [0]);\r
                        Set.Relations.Add (Relation);\r
                        DataRelation Test = null;\r
-                       AssertEquals ("test#01", 1, Mom.ChildRelations.Count);\r
-                       AssertEquals ("test#02", 0, Child.ChildRelations.Count);\r
-                       AssertEquals ("test#03", 0, Mom.ParentRelations.Count);\r
-                       AssertEquals ("test#04", 1, Child.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#01", 1, Mom.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#02", 0, Child.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#03", 0, Mom.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#04", 1, Child.ParentRelations.Count);\r
                                \r
                        Test = Child.ParentRelations [0];\r
-                       AssertEquals ("test#05", "Rel", Test.ToString ());\r
-                       AssertEquals ("test#06", "Rel", Test.RelationName);\r
-                       AssertEquals ("test#07", "Mom", Test.ParentTable.TableName);\r
-                       AssertEquals ("test#08", 1, Test.ParentKeyConstraint.Columns.Length);\r
-                       AssertEquals ("test#09", false, Test.ParentKeyConstraint.IsPrimaryKey);\r
-                       AssertEquals ("test#10", 1, Test.ParentColumns.Length);\r
-                       AssertEquals ("test#11", false, Test.Nested);\r
-                       AssertEquals ("test#12", 0, Test.ExtendedProperties.Count);\r
-                       AssertEquals ("test#13", "Child", Test.ChildTable.TableName);\r
-                       AssertEquals ("test#14", "Rel", Test.ChildKeyConstraint.ConstraintName);\r
-                       AssertEquals ("test#15", 1, Test.ChildColumns.Length);\r
+                       Assertion.AssertEquals ("test#05", "Rel", Test.ToString ());\r
+                       Assertion.AssertEquals ("test#06", "Rel", Test.RelationName);\r
+                       Assertion.AssertEquals ("test#07", "Mom", Test.ParentTable.TableName);\r
+                       Assertion.AssertEquals ("test#08", 1, Test.ParentKeyConstraint.Columns.Length);\r
+                       Assertion.AssertEquals ("test#09", false, Test.ParentKeyConstraint.IsPrimaryKey);\r
+                       Assertion.AssertEquals ("test#10", 1, Test.ParentColumns.Length);\r
+                       Assertion.AssertEquals ("test#11", false, Test.Nested);\r
+                       Assertion.AssertEquals ("test#12", 0, Test.ExtendedProperties.Count);\r
+                       Assertion.AssertEquals ("test#13", "Child", Test.ChildTable.TableName);\r
+                       Assertion.AssertEquals ("test#14", "Rel", Test.ChildKeyConstraint.ConstraintName);\r
+                       Assertion.AssertEquals ("test#15", 1, Test.ChildColumns.Length);\r
                }\r
                \r
-               public void TestCreation2 ()\r
+               [Test]\r
+               public void Creation2 ()\r
                {\r
                        DataSet Set = new DataSet ();\r
                        DataTable Mom2 = new DataTable ("Mom");\r
@@ -251,10 +250,10 @@ namespace MonoTests.System.Data
                        DataRelation Relation = null;\r
                        try {\r
                                Relation = new DataRelation ("Rel", Parents, Childs);\r
-                               Fail ("test#01");\r
+                               Assertion.Fail ("test#01");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("test#02", typeof (InvalidConstraintException), e.GetType ());                            \r
-                               AssertEquals ("test#03", "Cannot create a Key from Columns that belong to different tables.", e.Message);\r
+                               Assertion.AssertEquals ("test#02", typeof (InvalidConstraintException), e.GetType ());                          \r
+                               Assertion.AssertEquals ("test#03", "Cannot create a Key from Columns that belong to different tables.", e.Message);\r
                        }\r
                        \r
                        Childs [1] = Col6;\r
@@ -263,65 +262,67 @@ namespace MonoTests.System.Data
                        Set.Relations.Add (Relation);\r
                        \r
                        DataRelation Test = null;\r
-                       AssertEquals ("test#01", 1, Mom2.ChildRelations.Count);\r
-                       AssertEquals ("test#02", 0, Child2.ChildRelations.Count);\r
-                       AssertEquals ("test#03", 0, Mom2.ParentRelations.Count);\r
-                       AssertEquals ("test#04", 1, Child2.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#01", 1, Mom2.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#02", 0, Child2.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#03", 0, Mom2.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#04", 1, Child2.ParentRelations.Count);\r
                                \r
                        Test = Child2.ParentRelations [0];\r
-                       AssertEquals ("test#05", "Rel", Test.ToString ());\r
-                       AssertEquals ("test#06", "Rel", Test.RelationName);\r
-                       AssertEquals ("test#07", "Mom", Test.ParentTable.TableName);\r
-                       AssertEquals ("test#08", 2, Test.ParentKeyConstraint.Columns.Length);\r
-                       AssertEquals ("test#09", false, Test.ParentKeyConstraint.IsPrimaryKey);\r
-                       AssertEquals ("test#10", 2, Test.ParentColumns.Length);\r
-                       AssertEquals ("test#11", false, Test.Nested);\r
-                       AssertEquals ("test#12", 0, Test.ExtendedProperties.Count);\r
-                       AssertEquals ("test#13", "Child", Test.ChildTable.TableName);\r
-                       AssertEquals ("test#14", "Rel", Test.ChildKeyConstraint.ConstraintName);\r
-                       AssertEquals ("test#15", 2, Test.ChildColumns.Length);\r
-                       AssertEquals ("test#16", 1, Mom2.Constraints.Count);\r
-                       AssertEquals ("test#17", "Constraint1", Mom2.Constraints [0].ToString ());\r
-                       AssertEquals ("test#18", 1, Child2.Constraints.Count);                  \r
-                       AssertEquals ("test#19", 0, Hubby.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#05", "Rel", Test.ToString ());\r
+                       Assertion.AssertEquals ("test#06", "Rel", Test.RelationName);\r
+                       Assertion.AssertEquals ("test#07", "Mom", Test.ParentTable.TableName);\r
+                       Assertion.AssertEquals ("test#08", 2, Test.ParentKeyConstraint.Columns.Length);\r
+                       Assertion.AssertEquals ("test#09", false, Test.ParentKeyConstraint.IsPrimaryKey);\r
+                       Assertion.AssertEquals ("test#10", 2, Test.ParentColumns.Length);\r
+                       Assertion.AssertEquals ("test#11", false, Test.Nested);\r
+                       Assertion.AssertEquals ("test#12", 0, Test.ExtendedProperties.Count);\r
+                       Assertion.AssertEquals ("test#13", "Child", Test.ChildTable.TableName);\r
+                       Assertion.AssertEquals ("test#14", "Rel", Test.ChildKeyConstraint.ConstraintName);\r
+                       Assertion.AssertEquals ("test#15", 2, Test.ChildColumns.Length);\r
+                       Assertion.AssertEquals ("test#16", 1, Mom2.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#17", "Constraint1", Mom2.Constraints [0].ToString ());\r
+                       Assertion.AssertEquals ("test#18", 1, Child2.Constraints.Count);                        \r
+                       Assertion.AssertEquals ("test#19", 0, Hubby.Constraints.Count);\r
                }\r
                \r
-               public void TestCreation3 ()\r
+               [Test]\r
+               public void Creation3 ()\r
                {\r
 \r
                        DataRelation Relation = new DataRelation ("Rel", Mom.Columns [1], Child.Columns [0], false);\r
                        Set.Relations.Add (Relation);\r
                        DataRelation Test = null;\r
        \r
-                       AssertEquals ("test#01", 1, Mom.ChildRelations.Count);\r
-                       AssertEquals ("test#02", 0, Child.ChildRelations.Count);\r
-                       AssertEquals ("test#03", 0, Mom.ParentRelations.Count);\r
-                       AssertEquals ("test#04", 1, Child.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#01", 1, Mom.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#02", 0, Child.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#03", 0, Mom.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#04", 1, Child.ParentRelations.Count);\r
                                \r
                        Test = Child.ParentRelations [0];\r
                        \r
-                       AssertEquals ("test#05", "Rel", Test.ToString ());\r
+                       Assertion.AssertEquals ("test#05", "Rel", Test.ToString ());\r
                        \r
-                       AssertEquals ("test#06", "Rel", Test.RelationName);\r
-                       AssertEquals ("test#07", "Mom", Test.ParentTable.TableName);\r
+                       Assertion.AssertEquals ("test#06", "Rel", Test.RelationName);\r
+                       Assertion.AssertEquals ("test#07", "Mom", Test.ParentTable.TableName);\r
                        \r
-                       Assert ("test#08", Test.ParentKeyConstraint == null);\r
+                       Assertion.Assert ("test#08", Test.ParentKeyConstraint == null);\r
                        \r
-                       Assert ("test#09", Test.ParentKeyConstraint == null);\r
+                       Assertion.Assert ("test#09", Test.ParentKeyConstraint == null);\r
                        \r
-                       AssertEquals ("test#10", 1, Test.ParentColumns.Length);\r
-                       AssertEquals ("test#11", false, Test.Nested);\r
-                       AssertEquals ("test#12", 0, Test.ExtendedProperties.Count);\r
-                       AssertEquals ("test#13", "Child", Test.ChildTable.TableName);\r
+                       Assertion.AssertEquals ("test#10", 1, Test.ParentColumns.Length);\r
+                       Assertion.AssertEquals ("test#11", false, Test.Nested);\r
+                       Assertion.AssertEquals ("test#12", 0, Test.ExtendedProperties.Count);\r
+                       Assertion.AssertEquals ("test#13", "Child", Test.ChildTable.TableName);\r
                        \r
-                       Assert ("test#14", Test.ChildKeyConstraint == null);\r
-                       AssertEquals ("test#15", 1, Test.ChildColumns.Length);\r
-                       AssertEquals ("test#16", 0, Mom.Constraints.Count);                     \r
-                       AssertEquals ("test#17", 0, Child.Constraints.Count);                   \r
+                       Assertion.Assert ("test#14", Test.ChildKeyConstraint == null);\r
+                       Assertion.AssertEquals ("test#15", 1, Test.ChildColumns.Length);\r
+                       Assertion.AssertEquals ("test#16", 0, Mom.Constraints.Count);                   \r
+                       Assertion.AssertEquals ("test#17", 0, Child.Constraints.Count);                 \r
 \r
                }\r
 \r
-               public void TestCreation4 ()\r
+               [Test]\r
+               public void Creation4 ()\r
                {\r
                        \r
                        DataRelation Relation = new DataRelation ("Rel", "Mom", "Child", \r
@@ -330,16 +331,16 @@ namespace MonoTests.System.Data
                        \r
                        try {\r
                                Set.Relations.Add (Relation);\r
-                               Fail ("test#01");\r
+                               Assertion.Fail ("test#01");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("test#02", typeof (NullReferenceException), e.GetType ());\r
+                               Assertion.AssertEquals ("test#02", typeof (NullReferenceException), e.GetType ());\r
                        }\r
                        \r
                        try {\r
                                Set.Relations.AddRange (new DataRelation [] {Relation});\r
-                               Fail ("test#03");\r
+                               Assertion.Fail ("test#03");\r
                        } catch (Exception e) {\r
-                               AssertEquals ("test#04", typeof (NullReferenceException), e.GetType ());\r
+                               Assertion.AssertEquals ("test#04", typeof (NullReferenceException), e.GetType ());\r
                        }\r
                        \r
                        //Set.BeginInit ();\r
@@ -347,91 +348,93 @@ namespace MonoTests.System.Data
                        //Set.EndInit ();\r
                        \r
                        DataRelation Test = null;\r
-                       AssertEquals ("test#01", 1, Mom.ChildRelations.Count);\r
-                       AssertEquals ("test#02", 0, Child.ChildRelations.Count);\r
-                       AssertEquals ("test#03", 0, Mom.ParentRelations.Count);\r
-                       AssertEquals ("test#04", 1, Child.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#01", 1, Mom.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#02", 0, Child.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#03", 0, Mom.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#04", 1, Child.ParentRelations.Count);\r
                                \r
                        Test = Child.ParentRelations [0];\r
-                       AssertEquals ("test#05", "Rel", Test.ToString ());\r
-                       AssertEquals ("test#06", "Rel", Test.RelationName);\r
-                       AssertEquals ("test#07", "Mom", Test.ParentTable.TableName);\r
+                       Assertion.AssertEquals ("test#05", "Rel", Test.ToString ());\r
+                       Assertion.AssertEquals ("test#06", "Rel", Test.RelationName);\r
+                       Assertion.AssertEquals ("test#07", "Mom", Test.ParentTable.TableName);\r
                        \r
-                       AssertEquals ("test#08", true, Test.ParentKeyConstraint == null);\r
+                       Assertion.AssertEquals ("test#08", true, Test.ParentKeyConstraint == null);\r
                                                \r
-                       AssertEquals ("test#10", 1, Test.ParentColumns.Length);\r
-                       AssertEquals ("test#11", true, Test.Nested);\r
-                       AssertEquals ("test#12", 0, Test.ExtendedProperties.Count);\r
-                       AssertEquals ("test#13", "Child", Test.ChildTable.TableName);\r
-                       AssertEquals ("test#14", true, Test.ChildKeyConstraint == null);\r
-                       AssertEquals ("test#15", 1, Test.ChildColumns.Length);\r
+                       Assertion.AssertEquals ("test#10", 1, Test.ParentColumns.Length);\r
+                       Assertion.AssertEquals ("test#11", true, Test.Nested);\r
+                       Assertion.AssertEquals ("test#12", 0, Test.ExtendedProperties.Count);\r
+                       Assertion.AssertEquals ("test#13", "Child", Test.ChildTable.TableName);\r
+                       Assertion.AssertEquals ("test#14", true, Test.ChildKeyConstraint == null);\r
+                       Assertion.AssertEquals ("test#15", 1, Test.ChildColumns.Length);\r
                        \r
                }\r
 \r
-               public void TestRelationFromSchema ()\r
+               [Test]\r
+               public void RelationFromSchema ()\r
                {\r
                        DataSet Set = new DataSet ();\r
                        Set.ReadXmlSchema ("System.Data/store.xsd");\r
                        DataTable Table = Set.Tables [0];\r
                        \r
-                       AssertEquals ("test#01", false, Table.CaseSensitive);\r
-                       AssertEquals ("test#02", 1, Table.ChildRelations.Count);\r
-                       AssertEquals ("test#03", 0, Table.ParentRelations.Count);\r
-                       AssertEquals ("test#04", 1, Table.Constraints.Count);\r
-                       AssertEquals ("test#05", 1, Table.PrimaryKey.Length);\r
-                       AssertEquals ("test#06", 0, Table.Rows.Count);\r
-                       AssertEquals ("test#07", "bookstore", Table.TableName);\r
-                       AssertEquals ("test#08", 1, Table.Columns.Count);\r
+                       Assertion.AssertEquals ("test#01", false, Table.CaseSensitive);\r
+                       Assertion.AssertEquals ("test#02", 1, Table.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#03", 0, Table.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#04", 1, Table.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#05", 1, Table.PrimaryKey.Length);\r
+                       Assertion.AssertEquals ("test#06", 0, Table.Rows.Count);\r
+                       Assertion.AssertEquals ("test#07", "bookstore", Table.TableName);\r
+                       Assertion.AssertEquals ("test#08", 1, Table.Columns.Count);\r
                                                \r
                        DataRelation Relation = Table.ChildRelations [0];\r
-                       AssertEquals ("test#09", 1, Relation.ChildColumns.Length);\r
-                       AssertEquals ("test#10", "bookstore_book", Relation.ChildKeyConstraint.ConstraintName);\r
-                       AssertEquals ("test#11", 1, Relation.ChildKeyConstraint.Columns.Length);\r
-                       AssertEquals ("test#12", "book", Relation.ChildTable.TableName);\r
-                       AssertEquals ("test#13", "NewDataSet", Relation.DataSet.DataSetName);\r
-                       AssertEquals ("test#14", 0, Relation.ExtendedProperties.Count);\r
-                       AssertEquals ("test#15", true, Relation.Nested);\r
-                       AssertEquals ("test#16", 1, Relation.ParentColumns.Length);\r
-                       AssertEquals ("test#17", "Constraint1", Relation.ParentKeyConstraint.ConstraintName);\r
-                       AssertEquals ("test#18", "bookstore", Relation.ParentTable.TableName);\r
-                       AssertEquals ("test#19", "bookstore_book", Relation.RelationName);\r
+                       Assertion.AssertEquals ("test#09", 1, Relation.ChildColumns.Length);\r
+                       Assertion.AssertEquals ("test#10", "bookstore_book", Relation.ChildKeyConstraint.ConstraintName);\r
+                       Assertion.AssertEquals ("test#11", 1, Relation.ChildKeyConstraint.Columns.Length);\r
+                       Assertion.AssertEquals ("test#12", "book", Relation.ChildTable.TableName);\r
+                       Assertion.AssertEquals ("test#13", "NewDataSet", Relation.DataSet.DataSetName);\r
+                       Assertion.AssertEquals ("test#14", 0, Relation.ExtendedProperties.Count);\r
+                       Assertion.AssertEquals ("test#15", true, Relation.Nested);\r
+                       Assertion.AssertEquals ("test#16", 1, Relation.ParentColumns.Length);\r
+                       Assertion.AssertEquals ("test#17", "Constraint1", Relation.ParentKeyConstraint.ConstraintName);\r
+                       Assertion.AssertEquals ("test#18", "bookstore", Relation.ParentTable.TableName);\r
+                       Assertion.AssertEquals ("test#19", "bookstore_book", Relation.RelationName);\r
 \r
                        Table = Set.Tables [1];\r
                        \r
-                       AssertEquals ("test#20", false, Table.CaseSensitive);\r
-                       AssertEquals ("test#21", 1, Table.ChildRelations.Count);\r
-                       AssertEquals ("test#22", 1, Table.ParentRelations.Count);\r
-                       AssertEquals ("test#23", 2, Table.Constraints.Count);\r
-                       AssertEquals ("test#24", 1, Table.PrimaryKey.Length);\r
-                       AssertEquals ("test#25", 0, Table.Rows.Count);\r
-                       AssertEquals ("test#26", "book", Table.TableName);\r
-                       AssertEquals ("test#27", 5, Table.Columns.Count);\r
+                       Assertion.AssertEquals ("test#20", false, Table.CaseSensitive);\r
+                       Assertion.AssertEquals ("test#21", 1, Table.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#22", 1, Table.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#23", 2, Table.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#24", 1, Table.PrimaryKey.Length);\r
+                       Assertion.AssertEquals ("test#25", 0, Table.Rows.Count);\r
+                       Assertion.AssertEquals ("test#26", "book", Table.TableName);\r
+                       Assertion.AssertEquals ("test#27", 5, Table.Columns.Count);\r
                \r
                        Relation = Table.ChildRelations [0];\r
-                       AssertEquals ("test#28", 1, Relation.ChildColumns.Length);\r
-                       AssertEquals ("test#29", "book_author", Relation.ChildKeyConstraint.ConstraintName);\r
-                       AssertEquals ("test#30", 1, Relation.ChildKeyConstraint.Columns.Length);\r
-                       AssertEquals ("test#31", "author", Relation.ChildTable.TableName);\r
-                       AssertEquals ("test#32", "NewDataSet", Relation.DataSet.DataSetName);\r
-                       AssertEquals ("test#33", 0, Relation.ExtendedProperties.Count);\r
-                       AssertEquals ("test#34", true, Relation.Nested);\r
-                       AssertEquals ("test#35", 1, Relation.ParentColumns.Length);\r
-                       AssertEquals ("test#36", "Constraint1", Relation.ParentKeyConstraint.ConstraintName);\r
-                       AssertEquals ("test#37", "book", Relation.ParentTable.TableName);\r
-                       AssertEquals ("test#38", "book_author", Relation.RelationName);\r
+                       Assertion.AssertEquals ("test#28", 1, Relation.ChildColumns.Length);\r
+                       Assertion.AssertEquals ("test#29", "book_author", Relation.ChildKeyConstraint.ConstraintName);\r
+                       Assertion.AssertEquals ("test#30", 1, Relation.ChildKeyConstraint.Columns.Length);\r
+                       Assertion.AssertEquals ("test#31", "author", Relation.ChildTable.TableName);\r
+                       Assertion.AssertEquals ("test#32", "NewDataSet", Relation.DataSet.DataSetName);\r
+                       Assertion.AssertEquals ("test#33", 0, Relation.ExtendedProperties.Count);\r
+                       Assertion.AssertEquals ("test#34", true, Relation.Nested);\r
+                       Assertion.AssertEquals ("test#35", 1, Relation.ParentColumns.Length);\r
+                       Assertion.AssertEquals ("test#36", "Constraint1", Relation.ParentKeyConstraint.ConstraintName);\r
+                       Assertion.AssertEquals ("test#37", "book", Relation.ParentTable.TableName);\r
+                       Assertion.AssertEquals ("test#38", "book_author", Relation.RelationName);\r
                        \r
                        Table = Set.Tables [2];\r
-                       AssertEquals ("test#39", false, Table.CaseSensitive);\r
-                       AssertEquals ("test#40", 0, Table.ChildRelations.Count);\r
-                       AssertEquals ("test#41", 1, Table.ParentRelations.Count);\r
-                       AssertEquals ("test#42", 1, Table.Constraints.Count);\r
-                       AssertEquals ("test#43", 0, Table.PrimaryKey.Length);\r
-                       AssertEquals ("test#44", 0, Table.Rows.Count);\r
-                       AssertEquals ("test#45", "author", Table.TableName);\r
-                       AssertEquals ("test#46", 3, Table.Columns.Count);\r
+                       Assertion.AssertEquals ("test#39", false, Table.CaseSensitive);\r
+                       Assertion.AssertEquals ("test#40", 0, Table.ChildRelations.Count);\r
+                       Assertion.AssertEquals ("test#41", 1, Table.ParentRelations.Count);\r
+                       Assertion.AssertEquals ("test#42", 1, Table.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#43", 0, Table.PrimaryKey.Length);\r
+                       Assertion.AssertEquals ("test#44", 0, Table.Rows.Count);\r
+                       Assertion.AssertEquals ("test#45", "author", Table.TableName);\r
+                       Assertion.AssertEquals ("test#46", 3, Table.Columns.Count);\r
                }\r
                \r
-               public void TestChildRows ()\r
+               [Test]\r
+               public void ChildRows ()\r
                {\r
                        \r
                        DataRelation Relation = new DataRelation ("Rel", Mom.Columns [1], Child.Columns [0]);\r
@@ -459,16 +462,16 @@ namespace MonoTests.System.Data
                        \r
                        DataRow Row = Mom.Rows [1];                     \r
                        TempRow = Row.GetChildRows ("Rel") [0];\r
-                       AssertEquals ("test#01", "Dick", TempRow [0]);\r
-                       AssertEquals ("test#02", "10", TempRow [1].ToString ());\r
+                       Assertion.AssertEquals ("test#01", "Dick", TempRow [0]);\r
+                       Assertion.AssertEquals ("test#02", "10", TempRow [1].ToString ());\r
                        TempRow = TempRow.GetParentRow ("Rel");\r
-                       AssertEquals ("test#03", "teresa", TempRow [0]);\r
-                       AssertEquals ("test#04", "Dick", TempRow [1]);\r
+                       Assertion.AssertEquals ("test#03", "teresa", TempRow [0]);\r
+                       Assertion.AssertEquals ("test#04", "Dick", TempRow [1]);\r
                        \r
                        Row = Child.Rows [0];\r
                        TempRow = Row.GetParentRows ("Rel") [0];\r
-                       AssertEquals ("test#05", "teresa", TempRow [0]);\r
-                       AssertEquals ("test#06", "john", TempRow [1]);                                          \r
+                       Assertion.AssertEquals ("test#05", "teresa", TempRow [0]);\r
+                       Assertion.AssertEquals ("test#06", "john", TempRow [1]);                                                \r
                }\r
 \r
         }\r
index b2b8622700c0fdb4005facb1873fcce08bfbd3c0..4eea30b79e875e84c1e2439f48509539a431d7f3 100644 (file)
@@ -1,8 +1,11 @@
 // DataRowCollectionTest.cs - NUnit Test Cases for System.DataRowCollection
 //
-// Franklin Wise (gracenote@earthlink.net)
+// Authors:
+//   Franklin Wise (gracenote@earthlink.net)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
 // (C) Copyright 2002 Franklin Wise
+// (C) Copyright 2003 Martin Willemoes Hansen
 // 
 
 
@@ -12,32 +15,20 @@ using System.Data;
 
 namespace MonoTests.System.Data
 {
-
-       public class DataRowCollectionTest : TestCase 
+       [TestFixture]
+       public class DataRowCollectionTest
        {
-       
-               public DataRowCollectionTest() : base ("MonoTests.System.Data.DataRowCollectionTest") {}
-               public DataRowCollectionTest(string name) : base(name) {}
-
                private DataTable _tbl; 
 
-               protected override void SetUp()
+               [SetUp]
+               public void GetReady()
                {
                        _tbl = new DataTable();
                }
 
-               protected override void TearDown() {}
-
-               public static ITest Suite 
-               {
-                       get 
-                       { 
-                               return new TestSuite(typeof(DataRowCollectionTest)); 
-                       }
-               }
-
                //FINISHME
-               public void TestAutoIncrement()
+               [Test]
+               public void AutoIncrement()
                {
                        DataColumn col = new DataColumn();
                        col.AutoIncrement = true;
@@ -47,13 +38,14 @@ namespace MonoTests.System.Data
                        _tbl.Columns.Add(col);
                        _tbl.Rows.Add(_tbl.NewRow());
 
-                       //Assertion.AssertEquals("Inc 0" , 0, Convert.ToInt32(_tbl.Rows[0]["Auto"] ));
+                       //Assertion.Assertion.Assertion.AssertEquals("Inc 0" , 0, Convert.ToInt32(_tbl.Rows[0]["Auto"] ));
                                
                        _tbl.Rows.Add(_tbl.NewRow());
-                       //Assertion.AssertEquals("Inc 1" , 1, Convert.ToInt32(_tbl.Rows[0]["Auto"] ));
+                       //Assertion.Assertion.Assertion.AssertEquals("Inc 1" , 1, Convert.ToInt32(_tbl.Rows[0]["Auto"] ));
                }
 
-               public void TestAdd ()
+               [Test]
+               public void Add ()
                {
                        _tbl.Columns.Add ();
                        _tbl.Columns.Add ();
@@ -61,10 +53,10 @@ namespace MonoTests.System.Data
                        DataRowCollection Rows = _tbl.Rows;
                        
                        Rows.Add (Row);
-                       AssertEquals ("test#01", 1, Rows.Count);
-                       AssertEquals ("test#02", false, Rows.IsReadOnly);
-                       AssertEquals ("test#03", false, Rows.IsSynchronized);
-                       AssertEquals ("test#04", "System.Data.DataRowCollection", Rows.ToString ());
+                       Assertion.AssertEquals ("test#01", 1, Rows.Count);
+                       Assertion.AssertEquals ("test#02", false, Rows.IsReadOnly);
+                       Assertion.AssertEquals ("test#03", false, Rows.IsSynchronized);
+                       Assertion.AssertEquals ("test#04", "System.Data.DataRowCollection", Rows.ToString ());
                        
                        string [] cols = new string [2];
                        cols [0] = "first";
@@ -75,30 +67,30 @@ namespace MonoTests.System.Data
                        cols [1] = "else";
                        Rows.Add (cols);
                        
-                       AssertEquals ("test#05", 3, Rows.Count);
-                       AssertEquals ("test#06", "System.Data.DataRow",  Rows [0].ToString ());
-                       AssertEquals ("test#07", DBNull.Value, Rows [0] [0]);
-                       AssertEquals ("test#08", DBNull.Value, Rows [0] [1]);
-                       AssertEquals ("test#09", "first", Rows [1] [0]);
-                       AssertEquals ("test#10", "something", Rows [2] [0]);
-                       AssertEquals ("test#11", "second", Rows [1] [1]);
-                       AssertEquals ("test#12", "else", Rows [2] [1]);
+                       Assertion.AssertEquals ("test#05", 3, Rows.Count);
+                       Assertion.AssertEquals ("test#06", "System.Data.DataRow",  Rows [0].ToString ());
+                       Assertion.AssertEquals ("test#07", DBNull.Value, Rows [0] [0]);
+                       Assertion.AssertEquals ("test#08", DBNull.Value, Rows [0] [1]);
+                       Assertion.AssertEquals ("test#09", "first", Rows [1] [0]);
+                       Assertion.AssertEquals ("test#10", "something", Rows [2] [0]);
+                       Assertion.AssertEquals ("test#11", "second", Rows [1] [1]);
+                       Assertion.AssertEquals ("test#12", "else", Rows [2] [1]);
                        
                        try {
                                Rows.Add (Row);
-                               Fail ("test#13");
+                               Assertion.Fail ("test#13");
                        } catch (Exception e) {
-                               AssertEquals ("test#14", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#15", "This row already belongs to this table.", e.Message);
+                               Assertion.AssertEquals ("test#14", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#15", "This row already belongs to this table.", e.Message);
                        }
                        
                        try {
                                Row = null;
                                Rows.Add (Row);
-                               Fail ("test#16");
+                               Assertion.Fail ("test#16");
                        } catch (Exception e) {
-                               AssertEquals ("test#17", typeof (ArgumentNullException), e.GetType ());
-                               AssertEquals ("test#18", "'row' argument cannot be null.\r\nParameter name: row", e.Message);
+                               Assertion.AssertEquals ("test#17", typeof (ArgumentNullException), e.GetType ());
+                               Assertion.AssertEquals ("test#18", "'row' argument cannot be null.\r\nParameter name: row", e.Message);
                        }
                        
                        DataColumn Column = new DataColumn ("not_null");
@@ -112,10 +104,10 @@ namespace MonoTests.System.Data
                        
                        try {
                                Rows.Add (cols);
-                               Fail ("test#19");
+                               Assertion.Fail ("test#19");
                        } catch (Exception e) {
-                               AssertEquals ("test#20", typeof (NoNullAllowedException), e.GetType ());
-                               AssertEquals ("test#21", "Column 'not_null' does not allow nulls.", e.Message);
+                               Assertion.AssertEquals ("test#20", typeof (NoNullAllowedException), e.GetType ());
+                               Assertion.AssertEquals ("test#21", "Column 'not_null' does not allow nulls.", e.Message);
                        }
                        
                        Column = _tbl.Columns [0];
@@ -128,10 +120,10 @@ namespace MonoTests.System.Data
                        
                        try {
                                Rows.Add (cols);
-                               Fail ("test#22");
+                               Assertion.Fail ("test#22");
                        } catch (Exception e) {
-                               AssertEquals ("test#23", typeof (ConstraintException), e.GetType ());
-                               AssertEquals ("test#24", "Column 'Column1' is constrained to be unique.  Value 'first' is already present.", e.Message);
+                               Assertion.AssertEquals ("test#23", typeof (ConstraintException), e.GetType ());
+                               Assertion.AssertEquals ("test#24", "Column 'Column1' is constrained to be unique.  Value 'first' is already present.", e.Message);
                        }
                        
                        Column = new DataColumn ("integer");
@@ -146,14 +138,15 @@ namespace MonoTests.System.Data
 
                        try {
                                Rows.Add (obs);
-                               Fail ("test#25");
+                               Assertion.Fail ("test#25");
                        } catch (Exception e) {
                                // LAMESPEC: MSDN says this exception is InvalidCastException
-                               AssertEquals ("test#26", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#26", typeof (ArgumentException), e.GetType ());
                        }
                }
                
-               public void TestClear ()
+               [Test]
+               public void Clear ()
                {
                        DataRowCollection Rows = _tbl.Rows;
                        DataTable Table = new DataTable ("child");
@@ -176,11 +169,11 @@ namespace MonoTests.System.Data
                        cols [1] = "3,1";
                        Rows.Add (cols);
                        
-                       AssertEquals ("test#01", 3, Rows.Count);
+                       Assertion.AssertEquals ("test#01", 3, Rows.Count);
                        Rows.Clear ();
                        
                        // hmm... TODO: better tests
-                       AssertEquals ("test#02", 0, Rows.Count);
+                       Assertion.AssertEquals ("test#02", 0, Rows.Count);
                        
                        cols [0] = "1";
                        cols [1] = "1,1";
@@ -214,18 +207,19 @@ namespace MonoTests.System.Data
                        
                        try {
                                Rows.Clear ();
-                               Fail ("test#03");
+                               Assertion.Fail ("test#03");
                        } catch (Exception e) {
-                               AssertEquals ("test#04", typeof (InvalidConstraintException), e.GetType ());
-                               AssertEquals ("test#05", "Cannot clear table Table1 because ForeignKeyConstraint REL enforces constraints and there are child rows in child.", e.Message);
+                               Assertion.AssertEquals ("test#04", typeof (InvalidConstraintException), e.GetType ());
+                               Assertion.AssertEquals ("test#05", "Cannot clear table Table1 because ForeignKeyConstraint REL enforces constraints and there are child rows in child.", e.Message);
                        }
                        
-                       AssertEquals ("test#06", 3, Table.Rows.Count);
+                       Assertion.AssertEquals ("test#06", 3, Table.Rows.Count);
                        Table.Rows.Clear ();
-                       AssertEquals ("test#07", 0, Table.Rows.Count);
+                       Assertion.AssertEquals ("test#07", 0, Table.Rows.Count);
                }
                
-               public void TestContains ()
+               [Test]
+               public void Contains ()
                {
                        DataColumn C = new DataColumn ("key");
                        C.Unique = true;                        
@@ -257,50 +251,51 @@ namespace MonoTests.System.Data
                        Rows [3] [1] = "test3";
                        Rows [3] [2] = 3;
                        
-                       AssertEquals ("test#01", 3, _tbl.Columns.Count);
-                       AssertEquals ("test#02", 4, _tbl.Rows.Count);
-                       AssertEquals ("test#03", 0, _tbl.Rows [0] [0]);
-                       AssertEquals ("test#04", 1, _tbl.Rows [1] [0]);
-                       AssertEquals ("test#05", 2, _tbl.Rows [2] [0]);
-                       AssertEquals ("test#06", 3, _tbl.Rows [3] [0]);
+                       Assertion.AssertEquals ("test#01", 3, _tbl.Columns.Count);
+                       Assertion.AssertEquals ("test#02", 4, _tbl.Rows.Count);
+                       Assertion.AssertEquals ("test#03", 0, _tbl.Rows [0] [0]);
+                       Assertion.AssertEquals ("test#04", 1, _tbl.Rows [1] [0]);
+                       Assertion.AssertEquals ("test#05", 2, _tbl.Rows [2] [0]);
+                       Assertion.AssertEquals ("test#06", 3, _tbl.Rows [3] [0]);
                        
                        try {
                                Rows.Contains (1);
-                               Fail ("test#07");
+                               Assertion.Fail ("test#07");
                        } catch (Exception e) {
-                               AssertEquals ("test#08", typeof (MissingPrimaryKeyException), e.GetType ());
-                               AssertEquals ("test#09", "Table doesn't have a primary key.", e.Message);                       
+                               Assertion.AssertEquals ("test#08", typeof (MissingPrimaryKeyException), e.GetType ());
+                               Assertion.AssertEquals ("test#09", "Table doesn't have a primary key.", e.Message);                     
                        }
                        
                        _tbl.PrimaryKey = new DataColumn [] {_tbl.Columns [0]};
-                       AssertEquals ("test#10", true, Rows.Contains (1));
-                       AssertEquals ("test#11", true, Rows.Contains (2));
-                       AssertEquals ("test#12", false, Rows.Contains (4));
+                       Assertion.AssertEquals ("test#10", true, Rows.Contains (1));
+                       Assertion.AssertEquals ("test#11", true, Rows.Contains (2));
+                       Assertion.AssertEquals ("test#12", false, Rows.Contains (4));
                        
                        try {
                                Rows.Contains (new object [] {64, "test0"});
-                               Fail ("test#13");
+                               Assertion.Fail ("test#13");
                        } catch (Exception e) {
-                               AssertEquals ("test#14", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#15", "Expecting 1 value(s) for the key being indexed, but received 2 value(s).", e.Message);
+                               Assertion.AssertEquals ("test#14", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#15", "Expecting 1 value(s) for the key being indexed, but received 2 value(s).", e.Message);
                        }
                        
                        _tbl.PrimaryKey = new DataColumn [] {_tbl.Columns [0], _tbl.Columns [1]};
-                       AssertEquals ("test#16", false, Rows.Contains (new object [] {64, "test0"}));
-                       AssertEquals ("test#17", false, Rows.Contains (new object [] {0, "test1"}));
-                       AssertEquals ("test#18", true, Rows.Contains (new object [] {1, "test1"}));
-                       AssertEquals ("test#19", true, Rows.Contains (new object [] {2, "test2"}));
+                       Assertion.AssertEquals ("test#16", false, Rows.Contains (new object [] {64, "test0"}));
+                       Assertion.AssertEquals ("test#17", false, Rows.Contains (new object [] {0, "test1"}));
+                       Assertion.AssertEquals ("test#18", true, Rows.Contains (new object [] {1, "test1"}));
+                       Assertion.AssertEquals ("test#19", true, Rows.Contains (new object [] {2, "test2"}));
                        
                        try {
                                Rows.Contains (new object [] {2});
-                               Fail ("test#20");
+                               Assertion.Fail ("test#20");
                        } catch (Exception e) {
-                               AssertEquals ("test#21", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#22", "Expecting 2 value(s) for the key being indexed, but received 1 value(s).", e.Message);
+                               Assertion.AssertEquals ("test#21", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#22", "Expecting 2 value(s) for the key being indexed, but received 1 value(s).", e.Message);
                        }
                }
                
-               public void TestCopyTo ()
+               [Test]
+               public void CopyTo ()
                {
                        _tbl.Columns.Add ();
                        _tbl.Columns.Add ();
@@ -320,28 +315,29 @@ namespace MonoTests.System.Data
                        
                        try {
                                Rows.CopyTo (dr, 4);
-                               Fail ("test#01");
+                               Assertion.Fail ("test#01");
                        } catch (Exception e) {                 
-                               AssertEquals ("test#02", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#03", "Destination array was not long enough.  Check destIndex and length, and the array's lower bounds.", e.Message);
+                               Assertion.AssertEquals ("test#02", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#03", "Destination array was not long enough.  Check destIndex and length, and the array's lower bounds.", e.Message);
                        }
                        
                        dr = new DataRow [11];
                        Rows.CopyTo (dr, 4);
                        
-                       AssertEquals ("test#04", null, dr [0]);
-                       AssertEquals ("test#05", null, dr [1]);
-                       AssertEquals ("test#06", null, dr [2]);
-                       AssertEquals ("test#07", null, dr [3]);
-                       AssertEquals ("test#08", "1", dr [4] [0]);
-                       AssertEquals ("test#09", "2", dr [5] [0]);
-                       AssertEquals ("test#10", "3", dr [6] [0]);
-                       AssertEquals ("test#11", "4", dr [7] [0]);
-                       AssertEquals ("test#12", "5", dr [8] [0]);
-                       AssertEquals ("test#13", "6", dr [9] [0]);
+                       Assertion.AssertEquals ("test#04", null, dr [0]);
+                       Assertion.AssertEquals ("test#05", null, dr [1]);
+                       Assertion.AssertEquals ("test#06", null, dr [2]);
+                       Assertion.AssertEquals ("test#07", null, dr [3]);
+                       Assertion.AssertEquals ("test#08", "1", dr [4] [0]);
+                       Assertion.AssertEquals ("test#09", "2", dr [5] [0]);
+                       Assertion.AssertEquals ("test#10", "3", dr [6] [0]);
+                       Assertion.AssertEquals ("test#11", "4", dr [7] [0]);
+                       Assertion.AssertEquals ("test#12", "5", dr [8] [0]);
+                       Assertion.AssertEquals ("test#13", "6", dr [9] [0]);
                }
                
-               public void TestEquals ()
+               [Test]
+               public void Equals ()
                {
                        _tbl.Columns.Add ();
                        _tbl.Columns.Add ();
@@ -359,9 +355,9 @@ namespace MonoTests.System.Data
                        
                        DataRowCollection Rows2 = _tbl.Rows;
                        
-                       AssertEquals ("test#01", true, Rows2.Equals (Rows1));
-                       AssertEquals ("test#02", true, Rows1.Equals (Rows2));
-                       AssertEquals ("test#03", true, Rows1.Equals (Rows1));
+                       Assertion.AssertEquals ("test#01", true, Rows2.Equals (Rows1));
+                       Assertion.AssertEquals ("test#02", true, Rows1.Equals (Rows2));
+                       Assertion.AssertEquals ("test#03", true, Rows1.Equals (Rows1));
                        
                        DataTable Table = new DataTable ();
                        Table.Columns.Add ();
@@ -377,13 +373,14 @@ namespace MonoTests.System.Data
                        Rows3.Add (new object [] {"6", "6", "6"});
                        Rows3.Add (new object [] {"7", "7", "7"});
                        
-                       AssertEquals ("test#04", false, Rows3.Equals (Rows1));
-                       AssertEquals ("test#05", false, Rows3.Equals (Rows2));
-                       AssertEquals ("test#06", false, Rows1.Equals (Rows3));
-                       AssertEquals ("test#07", false, Rows2.Equals (Rows3));
+                       Assertion.AssertEquals ("test#04", false, Rows3.Equals (Rows1));
+                       Assertion.AssertEquals ("test#05", false, Rows3.Equals (Rows2));
+                       Assertion.AssertEquals ("test#06", false, Rows1.Equals (Rows3));
+                       Assertion.AssertEquals ("test#07", false, Rows2.Equals (Rows3));
                }
                
-               public void TestFind ()
+               [Test]
+               public void Find ()
                {
                        DataColumn Col = new DataColumn ("test_1");
                        Col.AllowDBNull = false;
@@ -405,60 +402,61 @@ namespace MonoTests.System.Data
                        
                        try {
                                Rows.Find (1);
-                               Fail ("test#01");
+                               Assertion.Fail ("test#01");
                        } catch (Exception e) {
-                               AssertEquals ("test#02", typeof (MissingPrimaryKeyException), e.GetType ());
-                               AssertEquals ("test#03", "Table doesn't have a primary key.", e.Message);              
+                               Assertion.AssertEquals ("test#02", typeof (MissingPrimaryKeyException), e.GetType ());
+                               Assertion.AssertEquals ("test#03", "Table doesn't have a primary key.", e.Message);              
                        }
                        
                        _tbl.PrimaryKey = new DataColumn [] {_tbl.Columns [0]};
                        
                        DataRow row = Rows.Find (1);
-                       AssertEquals ("test#04", 1L, row [0]);
+                       Assertion.AssertEquals ("test#04", 1L, row [0]);
                        row = Rows.Find (2);
-                       AssertEquals ("test#05", 2L, row [0]);
+                       Assertion.AssertEquals ("test#05", 2L, row [0]);
                        row = Rows.Find ("2");
-                       AssertEquals ("test#06", 2L, row [0]);
+                       Assertion.AssertEquals ("test#06", 2L, row [0]);
                        
                        try {
                                row = Rows.Find ("test");
-                               Fail ("test#07");
+                               Assertion.Fail ("test#07");
                        } catch (Exception e) {
-                               AssertEquals ("test#08", typeof (FormatException), e.GetType ());
-                               AssertEquals ("test#09", "Input string was not in a correct format.", e.Message);
+                               Assertion.AssertEquals ("test#08", typeof (FormatException), e.GetType ());
+                               Assertion.AssertEquals ("test#09", "Input string was not in a correct format.", e.Message);
                        }
                        
                        String tes = null;
                        row = Rows.Find (tes);
-                       AssertEquals ("test#10", null, row);
+                       Assertion.AssertEquals ("test#10", null, row);
                        
                        _tbl.PrimaryKey = null;
                        
                        try {
                                Rows.Find (new object [] {1, "fir"});
-                               Fail ("test#11");
+                               Assertion.Fail ("test#11");
                        } catch (Exception e) {
-                               AssertEquals ("test#12", typeof (MissingPrimaryKeyException), e.GetType ());
-                               AssertEquals ("tets#13", "Table doesn't have a primary key.", e.Message);
+                               Assertion.AssertEquals ("test#12", typeof (MissingPrimaryKeyException), e.GetType ());
+                               Assertion.AssertEquals ("tets#13", "Table doesn't have a primary key.", e.Message);
                        }
                        
                        _tbl.PrimaryKey = new DataColumn [] {_tbl.Columns [0], _tbl.Columns [1]};
                        
                        try {
                                Rows.Find (1);
-                               Fail ("test#11");
+                               Assertion.Fail ("test#11");
                        } catch (Exception e) {
-                               AssertEquals ("test#12", typeof (ArgumentException), e.GetType ());
-                               AssertEquals ("test#13", "Expecting 2 value(s) for the key being indexed, but received 1 value(s).", e.Message);
+                               Assertion.AssertEquals ("test#12", typeof (ArgumentException), e.GetType ());
+                               Assertion.AssertEquals ("test#13", "Expecting 2 value(s) for the key being indexed, but received 1 value(s).", e.Message);
                        }
                        
                        row = Rows.Find (new object [] {1, "fir"});
-                       AssertEquals ("test#14", null, row);
+                       Assertion.AssertEquals ("test#14", null, row);
                        row = Rows.Find (new object [] {1, "first"});
-                       AssertEquals ("test#15", 1L, row [0]);
+                       Assertion.AssertEquals ("test#15", 1L, row [0]);
                }
                
-               public void TestInsertAt ()
+               [Test]
+               public void InsertAt ()
                {
                        _tbl.Columns.Add ();
                        _tbl.Columns.Add ();
@@ -477,15 +475,15 @@ namespace MonoTests.System.Data
                        
                        try {
                                Rows.InsertAt (Row, -1);
-                               Fail ("test#01");
+                               Assertion.Fail ("test#01");
                        } catch (Exception e) {
-                               AssertEquals ("test#02", typeof (IndexOutOfRangeException), e.GetType ());
-                               AssertEquals ("test#03", "The row insert position -1 is invalid.", e.Message);
+                               Assertion.AssertEquals ("test#02", typeof (IndexOutOfRangeException), e.GetType ());
+                               Assertion.AssertEquals ("test#03", "The row insert position -1 is invalid.", e.Message);
                        }
                        
                        Rows.InsertAt (Row, 0);
-                       AssertEquals ("test#04", "e", Rows [0][0]);
-                       AssertEquals ("test#05", "a", Rows [1][0]);
+                       Assertion.AssertEquals ("test#04", "e", Rows [0][0]);
+                       Assertion.AssertEquals ("test#05", "a", Rows [1][0]);
                        
                        Row = _tbl.NewRow ();
                        Row [0] = "f";
@@ -493,7 +491,7 @@ namespace MonoTests.System.Data
                        Row [2] = "fff";
                        
                        Rows.InsertAt (Row, 5);
-                       AssertEquals ("test#06", "f", Rows [5][0]);
+                       Assertion.AssertEquals ("test#06", "f", Rows [5][0]);
                
                        Row = _tbl.NewRow ();
                        Row [0] = "g";
@@ -501,10 +499,11 @@ namespace MonoTests.System.Data
                        Row [2] = "ggg";
                        
                        Rows.InsertAt (Row, 500);
-                       AssertEquals ("test#07", "g", Rows [6][0]);
+                       Assertion.AssertEquals ("test#07", "g", Rows [6][0]);
                }
                
-               public void TestRemove ()
+               [Test]
+               public void Remove ()
                {
                        _tbl.Columns.Add ();
                        _tbl.Columns.Add ();
@@ -516,52 +515,52 @@ namespace MonoTests.System.Data
                        Rows.Add (new object [] {"c", "cc", "ccc"});
                        Rows.Add (new object [] {"d", "dd", "ddd"});
                        
-                       AssertEquals ("test#01", 4, _tbl.Rows.Count);
+                       Assertion.AssertEquals ("test#01", 4, _tbl.Rows.Count);
                        
                        Rows.Remove (_tbl.Rows [1]);
-                       AssertEquals ("test#02", 3, _tbl.Rows.Count);
-                       AssertEquals ("test#03", "a", _tbl.Rows [0] [0]);
-                       AssertEquals ("test#04", "c", _tbl.Rows [1] [0]);
-                       AssertEquals ("test#05", "d", _tbl.Rows [2] [0]);
+                       Assertion.AssertEquals ("test#02", 3, _tbl.Rows.Count);
+                       Assertion.AssertEquals ("test#03", "a", _tbl.Rows [0] [0]);
+                       Assertion.AssertEquals ("test#04", "c", _tbl.Rows [1] [0]);
+                       Assertion.AssertEquals ("test#05", "d", _tbl.Rows [2] [0]);
                        
                        try {
                                Rows.Remove (null);
-                               Fail ("test#06");
+                               Assertion.Fail ("test#06");
                        } catch (Exception e) {
-                               AssertEquals ("test#07", typeof (IndexOutOfRangeException), e.GetType ());
-                               AssertEquals ("test#08", "The given datarow is not in the current DataRowCollection.", e.Message);
+                               Assertion.AssertEquals ("test#07", typeof (IndexOutOfRangeException), e.GetType ());
+                               Assertion.AssertEquals ("test#08", "The given datarow is not in the current DataRowCollection.", e.Message);
                        }
                        
                        DataRow Row = new DataTable ().NewRow ();
                        
                        try {
                                Rows.Remove (Row);
-                               Fail ("test#09");
+                               Assertion.Fail ("test#09");
                        } catch (Exception e) {
-                               AssertEquals ("test#10", typeof (IndexOutOfRangeException), e.GetType ());
-                               AssertEquals ("test#11", "The given datarow is not in the current DataRowCollection.", e.Message);
+                               Assertion.AssertEquals ("test#10", typeof (IndexOutOfRangeException), e.GetType ());
+                               Assertion.AssertEquals ("test#11", "The given datarow is not in the current DataRowCollection.", e.Message);
                        }
                        
                        try {
                                Rows.RemoveAt (-1);
-                               Fail ("test#12");
+                               Assertion.Fail ("test#12");
                        } catch (Exception e) {
-                               AssertEquals ("test#13", typeof (IndexOutOfRangeException), e.GetType ());
-                               AssertEquals ("test#14", "There is no row at position -1.", e.Message);
+                               Assertion.AssertEquals ("test#13", typeof (IndexOutOfRangeException), e.GetType ());
+                               Assertion.AssertEquals ("test#14", "There is no row at position -1.", e.Message);
                        }
                        
                        try { 
                                Rows.RemoveAt (64);
-                               Fail ("test#15");
+                               Assertion.Fail ("test#15");
                        } catch (Exception e) {
-                               AssertEquals ("test#16", typeof (IndexOutOfRangeException), e.GetType ());
-                               AssertEquals ("test#17", "There is no row at position 64.", e.Message);
+                               Assertion.AssertEquals ("test#16", typeof (IndexOutOfRangeException), e.GetType ());
+                               Assertion.AssertEquals ("test#17", "There is no row at position 64.", e.Message);
                        }
                        
                        Rows.RemoveAt (0);
                        Rows.RemoveAt (1);
-                       AssertEquals ("test#18", 1, Rows.Count);
-                       AssertEquals ("test#19", "c", Rows [0] [0]);
+                       Assertion.AssertEquals ("test#18", 1, Rows.Count);
+                       Assertion.AssertEquals ("test#19", "c", Rows [0] [0]);
                }
        }
 }
index a04f3fc76c49f63ad051d6f51b6dec7aeec19c78..075adf2712c731836f8a5945bc031ba2826b0dc8 100644 (file)
 // DataRowTest.cs - NUnit Test Cases for System.DataRow
 //
-// Franklin Wise (gracenote@earthlink.net)
-// Daniel Morgan <danmorg@sc.rr.com>
+// Authors:
+//   Franklin Wise (gracenote@earthlink.net)
+//   Daniel Morgan <danmorg@sc.rr.com>
 //
 // (C) Copyright 2002 Franklin Wise
 // (C) Copyright 2003 Daniel Morgan
+// (C) Copyright 2003 Martin Willemoes Hansen
 // 
 
-
 using NUnit.Framework;
 using System;
 using System.Data;
 
 namespace MonoTests.System.Data
 {
-
-       public class DataRowTest : TestCase {
+       [TestFixture]
+       public class DataRowTest {
        
-               public DataRowTest() : base ("MonoTests.System.Data.DataRowTest") {}
-               public DataRowTest(string name) : base(name) {}
-
                private DataTable _tbl; 
 
-               protected override void SetUp() {
+               [SetUp]
+               public void GetReady() {
                        _tbl = new DataTable();
                }
 
-               protected override void TearDown() {}
-
-               public static ITest Suite {
-                       get { 
-                               return new TestSuite(typeof(DataRowTest)); 
-                       }
-               }
-
                // tests item at row, column in table to be DBNull.Value
-               private void TestDBNull(string message, DataTable dt, int row, int column) 
+               private void DBNullTest (string message, DataTable dt, int row, int column) 
                {
                        object val = dt.Rows[row].ItemArray[column];
                        Assertion.AssertEquals(message, DBNull.Value, val);
                }
 
                // tests item at row, column in table to be null
-               private void TestNull(string message, DataTable dt, int row, int column) 
+               private void NullTest (string message, DataTable dt, int row, int column) 
                {
                        object val = dt.Rows[row].ItemArray[column];
                        Assertion.AssertEquals(message, null, val);
                }
 
                // tests item at row, column in table to be 
-               private void TestValue(string message, DataTable dt, int row, int column, object value) 
+               private void ValueTest (string message, DataTable dt, int row, int column, object value) 
                {
                        object val = dt.Rows[row].ItemArray[column];
                        Assertion.AssertEquals(message, value, val);
                }
 
                // test set null, DBNull.Value, and ItemArray short count
-               public void TestNullInItemArray () 
+               [Test]
+               public void NullInItemArray () 
                {
                        string zero = "zero";
                        string one = "one";
                        string two = "two";
 
-                       DataTable table = new DataTable();\r
-                       table.Columns.Add(new DataColumn(zero, typeof(string)));\r
-                       table.Columns.Add(new DataColumn(one, typeof(string)));\r
-                       table.Columns.Add(new DataColumn(two, typeof(string)));\r
-\r
-                       object[] obj = new object[3];\r
-                       // -- normal -----------------\r
-                       obj[0] = zero;\r
-                       obj[1] = one;\r
-                       obj[2] = two;\r
-                       // results:\r
-                       //   table.Rows[0].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[0].ItemArray.ItemArray[1] = "one"\r
-                       //   table.Rows[0].ItemArray.ItemArray[2] = "two"\r
-                       \r
-                       DataRow row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e1) {\r
-                               Assertion.Fail("DR1: Exception Caught: " + e1);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- null ----------\r
-                       obj[1] = null;\r
-                       // results:\r
-                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[1].ItemArray.ItemArray[1] = DBNull.Value\r
-                       //   table.Rows[1].ItemArray.ItemArray[2] = "two"\r
-\r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e2) {\r
-                               Assertion.Fail("DR2: Exception Caught: " + e2);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- DBNull.Value -------------\r
-                       obj[1] = DBNull.Value;\r
-                       // results:\r
-                       //   table.Rows[2].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[2].ItemArray.ItemArray[1] = DBNull.Value\r
-                       //   table.Rows[2].ItemArray.ItemArray[2] = "two"\r
-\r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e3) {\r
-                               Assertion.Fail("DR3: Exception Caught: " + e3);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- object array smaller than number of columns -----\r
-                       string abc = "abc";\r
-                       string def = "def";\r
-                       obj = new object[2];\r
-                       obj[0] = abc;\r
-                       obj[1] = def;\r
-                       // results:\r
-                       //   table.Rows[3].ItemArray.ItemArray[0] = "abc"\r
-                       //   table.Rows[3].ItemArray.ItemArray[1] = "def"\r
-                       //   table.Rows[3].ItemArray.ItemArray[2] = DBNull.Value;\r
-                       \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e3) {\r
-                               Assertion.Fail("DR4: Exception Caught: " + e3);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- normal -----------------\r
-                       TestValue("DR5: normal value test", table, 0, 0, zero);\r
-                       TestValue("DR6: normal value test", table, 0, 1, one);\r
-                       TestValue("DR7: normal value test", table, 0, 2, two);\r
-\r
-                       // -- null ----------\r
-                       TestValue("DR8: null value test", table, 1, 0, zero);\r
-                       TestValue("DR9: null value test", table, 1, 1, DBNull.Value);\r
-                       TestValue("DR10: null value test", table, 1, 2, two);\r
-\r
-                       // -- DBNull.Value -------------\r
-                       TestValue("DR11: DBNull.Value value test", table, 2, 0, zero);\r
-                       TestValue("DR12: DBNull.Value value test", table, 2, 1, DBNull.Value);\r
-                       TestValue("DR13: DBNull.Value value test", table, 2, 2, two);\r
-\r
-                       // -- object array smaller than number of columns -----\r
-                       TestValue("DR14: array smaller value test", table, 3, 0, abc);\r
-                       TestValue("DR15: array smaller value test", table, 3, 1, def);\r
-                       TestValue("DR16: array smaller value test", table, 3, 2, DBNull.Value);\r
+                       DataTable table = new DataTable();
+                       table.Columns.Add(new DataColumn(zero, typeof(string)));
+                       table.Columns.Add(new DataColumn(one, typeof(string)));
+                       table.Columns.Add(new DataColumn(two, typeof(string)));
+
+                       object[] obj = new object[3];
+                       // -- normal -----------------
+                       obj[0] = zero;
+                       obj[1] = one;
+                       obj[2] = two;
+                       // results:
+                       //   table.Rows[0].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[0].ItemArray.ItemArray[1] = "one"
+                       //   table.Rows[0].ItemArray.ItemArray[2] = "two"
+                       
+                       DataRow row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e1) {
+                               Assertion.Fail("DR1: Exception Caught: " + e1);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- null ----------
+                       obj[1] = null;
+                       // results:
+                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[1].ItemArray.ItemArray[1] = DBNull.Value
+                       //   table.Rows[1].ItemArray.ItemArray[2] = "two"
+
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e2) {
+                               Assertion.Fail("DR2: Exception Caught: " + e2);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- DBNull.Value -------------
+                       obj[1] = DBNull.Value;
+                       // results:
+                       //   table.Rows[2].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[2].ItemArray.ItemArray[1] = DBNull.Value
+                       //   table.Rows[2].ItemArray.ItemArray[2] = "two"
+
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e3) {
+                               Assertion.Fail("DR3: Exception Caught: " + e3);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- object array smaller than number of columns -----
+                       string abc = "abc";
+                       string def = "def";
+                       obj = new object[2];
+                       obj[0] = abc;
+                       obj[1] = def;
+                       // results:
+                       //   table.Rows[3].ItemArray.ItemArray[0] = "abc"
+                       //   table.Rows[3].ItemArray.ItemArray[1] = "def"
+                       //   table.Rows[3].ItemArray.ItemArray[2] = DBNull.Value;
+                       
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e3) {
+                               Assertion.Fail("DR4: Exception Caught: " + e3);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- normal -----------------
+                       ValueTest("DR5: normal value test", table, 0, 0, zero);
+                       ValueTest("DR6: normal value test", table, 0, 1, one);
+                       ValueTest("DR7: normal value test", table, 0, 2, two);
+
+                       // -- null ----------
+                       ValueTest("DR8: null value test", table, 1, 0, zero);
+                       ValueTest("DR9: null value test", table, 1, 1, DBNull.Value);
+                       ValueTest("DR10: null value test", table, 1, 2, two);
+
+                       // -- DBNull.Value -------------
+                       ValueTest("DR11: DBNull.Value value test", table, 2, 0, zero);
+                       ValueTest("DR12: DBNull.Value value test", table, 2, 1, DBNull.Value);
+                       ValueTest("DR13: DBNull.Value value test", table, 2, 2, two);
+
+                       // -- object array smaller than number of columns -----
+                       ValueTest("DR14: array smaller value test", table, 3, 0, abc);
+                       ValueTest("DR15: array smaller value test", table, 3, 1, def);
+                       ValueTest("DR16: array smaller value test", table, 3, 2, DBNull.Value);
                }
        
                // test DefaultValue when setting ItemArray
-               public void TestDefaultValueInItemArray () {            
+               [Test]
+               public void DefaultValueInItemArray () {                
                        string zero = "zero";
 
-                       DataTable table = new DataTable();\r
-                       table.Columns.Add(new DataColumn("zero", typeof(string)));              \r
-                       \r
-                       DataColumn column = new DataColumn("num", typeof(int));\r
-                       column.DefaultValue = 15;\r
-                       table.Columns.Add(column);\r
-                       \r
-                       object[] obj = new object[2];\r
-                       // -- normal -----------------\r
-                       obj[0] = "zero";\r
-                       obj[1] = 8;\r
-                       // results:\r
-                       //   table.Rows[0].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[0].ItemArray.ItemArray[1] = 8\r
-                                               \r
-                       DataRow row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e1) {\r
-                               Assertion.Fail("DR17: Exception Caught: " + e1);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- null ----------\r
-                       obj[1] = null;\r
-                       // results:\r
-                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[1].ItemArray.ItemArray[1] = 15\r
-                       \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e2) {\r
-                               Assertion.Fail("DR18: Exception Caught: " + e2);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- DBNull.Value -------------\r
-                       obj[1] = DBNull.Value;\r
-                       // results:\r
-                       //   table.Rows[2].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[2].ItemArray.ItemArray[1] = DBNull.Value\r
-                       //      even though internally, the v\r
-                       \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e3) {\r
-                               Assertion.Fail("DR19: Exception Caught: " + e3);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- object array smaller than number of columns -----\r
-                       string abc = "abc";\r
-                       string def = "def";\r
-                       obj = new object[2];\r
-                       obj[0] = abc;\r
-                       // results:\r
-                       //   table.Rows[3].ItemArray.ItemArray[0] = "abc"\r
-                       //   table.Rows[3].ItemArray.ItemArray[1] = DBNull.Value\r
-                                               \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e3) {\r
-                               Assertion.Fail("DR20: Exception Caught: " + e3);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- normal -----------------\r
-                       TestValue("DR20: normal value test", table, 0, 0, zero);\r
-                       TestValue("DR21: normal value test", table, 0, 1, 8);\r
-                       \r
-                       // -- null ----------\r
-                       TestValue("DR22: null value test", table, 1, 0, zero);\r
-                       TestValue("DR23: null value test", table, 1, 1, 15);\r
-                       \r
-                       // -- DBNull.Value -------------\r
-                       TestValue("DR24: DBNull.Value value test", table, 2, 0, zero);\r
-                       TestDBNull("DR25: DBNull.Value value test", table, 2, 1);\r
-                       \r
-                       // -- object array smaller than number of columns -----\r
-                       TestValue("DR26: array smaller value test", table, 3, 0, abc);\r
-                       TestValue("DR27: array smaller value test", table, 3, 1, 15);\r
+                       DataTable table = new DataTable();
+                       table.Columns.Add(new DataColumn("zero", typeof(string)));              
+                       
+                       DataColumn column = new DataColumn("num", typeof(int));
+                       column.DefaultValue = 15;
+                       table.Columns.Add(column);
+                       
+                       object[] obj = new object[2];
+                       // -- normal -----------------
+                       obj[0] = "zero";
+                       obj[1] = 8;
+                       // results:
+                       //   table.Rows[0].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[0].ItemArray.ItemArray[1] = 8
+                                               
+                       DataRow row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e1) {
+                               Assertion.Fail("DR17: Exception Caught: " + e1);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- null ----------
+                       obj[1] = null;
+                       // results:
+                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[1].ItemArray.ItemArray[1] = 15
+                       
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e2) {
+                               Assertion.Fail("DR18: Exception Caught: " + e2);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- DBNull.Value -------------
+                       obj[1] = DBNull.Value;
+                       // results:
+                       //   table.Rows[2].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[2].ItemArray.ItemArray[1] = DBNull.Value
+                       //      even though internally, the v
+                       
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e3) {
+                               Assertion.Fail("DR19: Exception Caught: " + e3);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- object array smaller than number of columns -----
+                       string abc = "abc";
+                       string def = "def";
+                       obj = new object[2];
+                       obj[0] = abc;
+                       // results:
+                       //   table.Rows[3].ItemArray.ItemArray[0] = "abc"
+                       //   table.Rows[3].ItemArray.ItemArray[1] = DBNull.Value
+                                               
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e3) {
+                               Assertion.Fail("DR20: Exception Caught: " + e3);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- normal -----------------
+                       ValueTest("DR20: normal value test", table, 0, 0, zero);
+                       ValueTest("DR21: normal value test", table, 0, 1, 8);
+                       
+                       // -- null ----------
+                       ValueTest("DR22: null value test", table, 1, 0, zero);
+                       ValueTest("DR23: null value test", table, 1, 1, 15);
+                       
+                       // -- DBNull.Value -------------
+                       ValueTest("DR24: DBNull.Value value test", table, 2, 0, zero);
+                       DBNullTest("DR25: DBNull.Value value test", table, 2, 1);
+                       
+                       // -- object array smaller than number of columns -----
+                       ValueTest("DR26: array smaller value test", table, 3, 0, abc);
+                       ValueTest("DR27: array smaller value test", table, 3, 1, 15);
                }
 
                // test AutoIncrement when setting ItemArray
-               public void TestAutoIncrementInItemArray () {
+               [Test]
+               public void AutoIncrementInItemArray () {
                        string zero = "zero";
                        string num = "num";
                        
-                       DataTable table = new DataTable();\r
-                       table.Columns.Add(new DataColumn(zero, typeof(string)));                \r
-                       \r
-                       DataColumn column = new DataColumn("num", typeof(int));\r
-                       column.AutoIncrement = true;\r
-                       table.Columns.Add(column);\r
-                       \r
-                       object[] obj = new object[2];\r
-                       // -- normal -----------------\r
-                       obj[0] = "zero";\r
-                       obj[1] = 8;\r
-                       // results:\r
-                       //   table.Rows[0].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[0].ItemArray.ItemArray[1] = 8\r
-                                               \r
-                       DataRow row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e1) {\r
-                               Assertion.Fail("DR28:  Exception Caught: " + e1);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- null 1----------\r
-                       obj[1] = null;\r
-                       // results:\r
-                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[1].ItemArray.ItemArray[1] = 9\r
-                       \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e2) {\r
-                               Assertion.Fail("DR29:  Exception Caught: " + e2);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- null 2----------\r
-                       obj[1] = null;\r
-                       // results:\r
-                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[1].ItemArray.ItemArray[1] = 10\r
-                       \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e2) {\r
-                               Assertion.Fail("DR30: Exception Caught: " + e2);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- null 3----------\r
-                       obj[1] = null;\r
-                       // results:\r
-                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[1].ItemArray.ItemArray[1] = 11\r
-                       \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e2) {\r
-                               Assertion.Fail("DR31: Exception Caught: " + e2);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- DBNull.Value -------------\r
-                       obj[1] = DBNull.Value;\r
-                       // results:\r
-                       //   table.Rows[2].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[2].ItemArray.ItemArray[1] = DBNull.Value\r
-                       //      even though internally, the AutoIncrement value\r
-                       //      is incremented\r
-                       \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e3) {\r
-                               Assertion.Fail("DR32: Exception Caught: " + e3);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- null 4----------\r
-                       obj[1] = null;\r
-                       // results:\r
-                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"\r
-                       //   table.Rows[1].ItemArray.ItemArray[1] = 13\r
-                       \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e2) {\r
-                               Assertion.Fail("DR48: Exception Caught: " + e2);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- object array smaller than number of columns -----\r
-                       string abc = "abc";\r
-                       string def = "def";\r
-                       obj = new object[2];\r
-                       obj[0] = abc;\r
-                       // results:\r
-                       //   table.Rows[3].ItemArray.ItemArray[0] = "abc"\r
-                       //   table.Rows[3].ItemArray.ItemArray[1] = 14\r
-                                               \r
-                       row = table.NewRow();\r
-                       \r
-                       try {\r
-                               row.ItemArray = obj;\r
-                       }\r
-                       catch(Exception e3) {\r
-                               Assertion.Fail("DR33: Exception Caught: " + e3);\r
-                       }\r
-                       \r
-                       table.Rows.Add(row);\r
-\r
-                       // -- normal -----------------\r
-                       TestValue("DR34: normal value test", table, 0, 0, zero);\r
-                       TestValue("DR35: normal value test", table, 0, 1, 8);\r
-                       \r
-                       // -- null 1----------\r
-                       TestValue("DR36: null value test", table, 1, 0, zero);\r
-                       TestValue("DR37: null value test", table, 1, 1, 9);\r
-\r
-                       // -- null 2----------\r
-                       TestValue("DR38: null value test", table, 2, 0, zero);\r
-                       TestValue("DR39: null value test", table, 2, 1, 10);\r
-\r
-                       // -- null 3----------\r
-                       TestValue("DR40: null value test", table, 3, 0, zero);\r
-                       TestValue("DR41: null value test", table, 3, 1, 11);\r
-\r
-                       // -- DBNull.Value -------------\r
-                       TestValue("DR42: DBNull.Value value test", table, 4, 0, zero);\r
-                       TestValue("DR43: DBNull.Value value test", table, 4, 1, DBNull.Value);\r
-\r
-                       // -- null 4----------\r
-                       TestValue("DR44: null value test", table, 5, 0, zero);\r
-                       TestValue("DR45: null value test", table, 5, 1, 13);\r
-\r
-                       // -- object array smaller than number of columns -----\r
-                       TestValue("DR46: array smaller value test", table, 6, 0, abc);\r
-                       TestValue("DR47: array smaller value test", table, 6, 1, 14);\r
+                       DataTable table = new DataTable();
+                       table.Columns.Add(new DataColumn(zero, typeof(string)));                
+                       
+                       DataColumn column = new DataColumn("num", typeof(int));
+                       column.AutoIncrement = true;
+                       table.Columns.Add(column);
+                       
+                       object[] obj = new object[2];
+                       // -- normal -----------------
+                       obj[0] = "zero";
+                       obj[1] = 8;
+                       // results:
+                       //   table.Rows[0].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[0].ItemArray.ItemArray[1] = 8
+                                               
+                       DataRow row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e1) {
+                               Assertion.Fail("DR28:  Exception Caught: " + e1);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- null 1----------
+                       obj[1] = null;
+                       // results:
+                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[1].ItemArray.ItemArray[1] = 9
+                       
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e2) {
+                               Assertion.Fail("DR29:  Exception Caught: " + e2);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- null 2----------
+                       obj[1] = null;
+                       // results:
+                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[1].ItemArray.ItemArray[1] = 10
+                       
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e2) {
+                               Assertion.Fail("DR30: Exception Caught: " + e2);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- null 3----------
+                       obj[1] = null;
+                       // results:
+                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[1].ItemArray.ItemArray[1] = 11
+                       
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e2) {
+                               Assertion.Fail("DR31: Exception Caught: " + e2);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- DBNull.Value -------------
+                       obj[1] = DBNull.Value;
+                       // results:
+                       //   table.Rows[2].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[2].ItemArray.ItemArray[1] = DBNull.Value
+                       //      even though internally, the AutoIncrement value
+                       //      is incremented
+                       
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e3) {
+                               Assertion.Fail("DR32: Exception Caught: " + e3);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- null 4----------
+                       obj[1] = null;
+                       // results:
+                       //   table.Rows[1].ItemArray.ItemArray[0] = "zero"
+                       //   table.Rows[1].ItemArray.ItemArray[1] = 13
+                       
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e2) {
+                               Assertion.Fail("DR48: Exception Caught: " + e2);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- object array smaller than number of columns -----
+                       string abc = "abc";
+                       string def = "def";
+                       obj = new object[2];
+                       obj[0] = abc;
+                       // results:
+                       //   table.Rows[3].ItemArray.ItemArray[0] = "abc"
+                       //   table.Rows[3].ItemArray.ItemArray[1] = 14
+                                               
+                       row = table.NewRow();
+                       
+                       try {
+                               row.ItemArray = obj;
+                       }
+                       catch(Exception e3) {
+                               Assertion.Fail("DR33: Exception Caught: " + e3);
+                       }
+                       
+                       table.Rows.Add(row);
+
+                       // -- normal -----------------
+                       ValueTest("DR34: normal value test", table, 0, 0, zero);
+                       ValueTest("DR35: normal value test", table, 0, 1, 8);
+                       
+                       // -- null 1----------
+                       ValueTest("DR36: null value test", table, 1, 0, zero);
+                       ValueTest("DR37: null value test", table, 1, 1, 9);
+
+                       // -- null 2----------
+                       ValueTest("DR38: null value test", table, 2, 0, zero);
+                       ValueTest("DR39: null value test", table, 2, 1, 10);
+
+                       // -- null 3----------
+                       ValueTest("DR40: null value test", table, 3, 0, zero);
+                       ValueTest("DR41: null value test", table, 3, 1, 11);
+
+                       // -- DBNull.Value -------------
+                       ValueTest("DR42: DBNull.Value value test", table, 4, 0, zero);
+                       ValueTest("DR43: DBNull.Value value test", table, 4, 1, DBNull.Value);
+
+                       // -- null 4----------
+                       ValueTest("DR44: null value test", table, 5, 0, zero);
+                       ValueTest("DR45: null value test", table, 5, 1, 13);
+
+                       // -- object array smaller than number of columns -----
+                       ValueTest("DR46: array smaller value test", table, 6, 0, abc);
+                       ValueTest("DR47: array smaller value test", table, 6, 1, 14);
                }
        }
 }
index d50ee6cc33b0fca484414bb635dbaf86b97021ec..13688599ebd69552ef60f8a355f4b9456ebc026f 100644 (file)
@@ -1,9 +1,11 @@
 // MonoTests.System.Data.DataSetTest.cs\r
 //\r
-// Author:\r
+// Authors:\r
 //   Ville Palo <vi64pa@koti.soon.fi>\r
+//   Martin Willemoes Hansen <mwh@sysrq.dk>\r
 //\r
 // (C) Copyright 2002 Ville Palo\r
+// (C) Copyright 2003 Martin Willemoes Hansen\r
 //\r
 \r
 using NUnit.Framework;\r
@@ -17,115 +19,105 @@ using System.Threading;
 \r
 namespace MonoTests.System.Data\r
 {\r
-\r
-        public class DataSetTest : TestCase \r
+       [TestFixture]\r
+        public class DataSetTest\r
         {\r
         \r
-                public DataSetTest() : base ("MonoTests.System.Data.DataSetTest") {}\r
-                public DataSetTest(string name) : base(name) {}\r
-\r
-                protected override void SetUp()\r
+               [SetUp]\r
+                public void GetReady()\r
                 {\r
                        Thread.CurrentThread.CurrentCulture = new CultureInfo ("fi-FI");\r
                 }\r
 \r
-                protected override void TearDown() {}\r
-\r
-                public static ITest Suite \r
-                {\r
-                        get \r
-                        { \r
-                                return new TestSuite(typeof(DataSetTest)); \r
-                        }\r
-                }\r
-\r
-               public void TestReadXmlSchema ()\r
+               [Test]\r
+               public void ReadXmlSchema ()\r
                {\r
                        DataSet ds = new DataSet ();\r
                        ds.ReadXmlSchema ("System.Data/own_schema.xsd");\r
                        \r
-                       AssertEquals ("test#01", 2, ds.Tables.Count);\r
+                       Assertion.AssertEquals ("test#01", 2, ds.Tables.Count);\r
                        DataTable Table = ds.Tables [0];\r
-                       AssertEquals ("test#02", "test_table", Table.TableName);\r
-                       AssertEquals ("test#03", "", Table.Namespace);\r
-                       AssertEquals ("test#04", 2, Table.Columns.Count);\r
-                       AssertEquals ("test#05", 0, Table.Rows.Count);\r
-                       AssertEquals ("test#06", false, Table.CaseSensitive);\r
-                       AssertEquals ("test#07", 1, Table.Constraints.Count);\r
-                       AssertEquals ("test#08", "", Table.Prefix);\r
+                       Assertion.AssertEquals ("test#02", "test_table", Table.TableName);\r
+                       Assertion.AssertEquals ("test#03", "", Table.Namespace);\r
+                       Assertion.AssertEquals ("test#04", 2, Table.Columns.Count);\r
+                       Assertion.AssertEquals ("test#05", 0, Table.Rows.Count);\r
+                       Assertion.AssertEquals ("test#06", false, Table.CaseSensitive);\r
+                       Assertion.AssertEquals ("test#07", 1, Table.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#08", "", Table.Prefix);\r
                        \r
                        Constraint cons = Table.Constraints [0];\r
-                       AssertEquals ("test#09", "Constraint1", cons.ConstraintName.ToString ());\r
-                       AssertEquals ("test#10", "Constraint1", cons.ToString ());\r
+                       Assertion.AssertEquals ("test#09", "Constraint1", cons.ConstraintName.ToString ());\r
+                       Assertion.AssertEquals ("test#10", "Constraint1", cons.ToString ());\r
                        \r
                        DataColumn column = Table.Columns [0];\r
-                       AssertEquals ("test#11", true, column.AllowDBNull);\r
-                       AssertEquals ("test#12", false, column.AutoIncrement);\r
-                       AssertEquals ("test#13", 0L, column.AutoIncrementSeed);\r
-                       AssertEquals ("test#14", 1L, column.AutoIncrementStep);\r
-                       AssertEquals ("test#15", "test", column.Caption);\r
-                       AssertEquals ("test#16", "Element", column.ColumnMapping.ToString ());\r
-                       AssertEquals ("test#17", "first", column.ColumnName);\r
-                       AssertEquals ("test#18", "System.String", column.DataType.ToString ());\r
-                       AssertEquals ("test#19", "test_default_value", column.DefaultValue.ToString ());\r
-                       AssertEquals ("test#20", false, column.DesignMode);\r
-                       AssertEquals ("test#21", "", column.Expression);\r
-                       AssertEquals ("test#22", 100, column.MaxLength);\r
-                       AssertEquals ("test#23", "", column.Namespace);\r
-                       AssertEquals ("test#24", 0, column.Ordinal);\r
-                       AssertEquals ("test#25", "", column.Prefix);\r
-                       AssertEquals ("test#26", false, column.ReadOnly);\r
-                       AssertEquals ("test#27", true, column.Unique);\r
+                       Assertion.AssertEquals ("test#11", true, column.AllowDBNull);\r
+                       Assertion.AssertEquals ("test#12", false, column.AutoIncrement);\r
+                       Assertion.AssertEquals ("test#13", 0L, column.AutoIncrementSeed);\r
+                       Assertion.AssertEquals ("test#14", 1L, column.AutoIncrementStep);\r
+                       Assertion.AssertEquals ("test#15", "test", column.Caption);\r
+                       Assertion.AssertEquals ("test#16", "Element", column.ColumnMapping.ToString ());\r
+                       Assertion.AssertEquals ("test#17", "first", column.ColumnName);\r
+                       Assertion.AssertEquals ("test#18", "System.String", column.DataType.ToString ());\r
+                       Assertion.AssertEquals ("test#19", "test_default_value", column.DefaultValue.ToString ());\r
+                       Assertion.AssertEquals ("test#20", false, column.DesignMode);\r
+                       Assertion.AssertEquals ("test#21", "", column.Expression);\r
+                       Assertion.AssertEquals ("test#22", 100, column.MaxLength);\r
+                       Assertion.AssertEquals ("test#23", "", column.Namespace);\r
+                       Assertion.AssertEquals ("test#24", 0, column.Ordinal);\r
+                       Assertion.AssertEquals ("test#25", "", column.Prefix);\r
+                       Assertion.AssertEquals ("test#26", false, column.ReadOnly);\r
+                       Assertion.AssertEquals ("test#27", true, column.Unique);\r
                                                \r
                        DataColumn column2 = Table.Columns [1];\r
-                       AssertEquals ("test#28", true, column2.AllowDBNull);\r
-                       AssertEquals ("test#29", false, column2.AutoIncrement);\r
-                       AssertEquals ("test#30", 0L, column2.AutoIncrementSeed);\r
-                       AssertEquals ("test#31", 1L, column2.AutoIncrementStep);\r
-                       AssertEquals ("test#32", "second", column2.Caption);\r
-                       AssertEquals ("test#33", "Element", column2.ColumnMapping.ToString ());\r
-                       AssertEquals ("test#34", "second", column2.ColumnName);\r
-                       AssertEquals ("test#35", "System.Data.SqlTypes.SqlGuid", column2.DataType.ToString ());\r
-                       AssertEquals ("test#36", "", column2.DefaultValue.ToString ());\r
-                       AssertEquals ("test#37", false, column2.DesignMode);\r
-                       AssertEquals ("test#38", "", column2.Expression);\r
-                       AssertEquals ("test#39", -1, column2.MaxLength);\r
-                       AssertEquals ("test#40", "", column2.Namespace);\r
-                       AssertEquals ("test#41", 1, column2.Ordinal);\r
-                       AssertEquals ("test#42", "", column2.Prefix);\r
-                       AssertEquals ("test#43", false, column2.ReadOnly);\r
-                       AssertEquals ("test#44", false, column2.Unique);\r
+                       Assertion.AssertEquals ("test#28", true, column2.AllowDBNull);\r
+                       Assertion.AssertEquals ("test#29", false, column2.AutoIncrement);\r
+                       Assertion.AssertEquals ("test#30", 0L, column2.AutoIncrementSeed);\r
+                       Assertion.AssertEquals ("test#31", 1L, column2.AutoIncrementStep);\r
+                       Assertion.AssertEquals ("test#32", "second", column2.Caption);\r
+                       Assertion.AssertEquals ("test#33", "Element", column2.ColumnMapping.ToString ());\r
+                       Assertion.AssertEquals ("test#34", "second", column2.ColumnName);\r
+                       Assertion.AssertEquals ("test#35", "System.Data.SqlTypes.SqlGuid", column2.DataType.ToString ());\r
+                       Assertion.AssertEquals ("test#36", "", column2.DefaultValue.ToString ());\r
+                       Assertion.AssertEquals ("test#37", false, column2.DesignMode);\r
+                       Assertion.AssertEquals ("test#38", "", column2.Expression);\r
+                       Assertion.AssertEquals ("test#39", -1, column2.MaxLength);\r
+                       Assertion.AssertEquals ("test#40", "", column2.Namespace);\r
+                       Assertion.AssertEquals ("test#41", 1, column2.Ordinal);\r
+                       Assertion.AssertEquals ("test#42", "", column2.Prefix);\r
+                       Assertion.AssertEquals ("test#43", false, column2.ReadOnly);\r
+                       Assertion.AssertEquals ("test#44", false, column2.Unique);\r
                        \r
                        DataTable Table2 = ds.Tables [1];\r
-                       AssertEquals ("test#45", "second_test_table", Table2.TableName);\r
-                       AssertEquals ("test#46", "", Table2.Namespace);\r
-                       AssertEquals ("test#47", 1, Table2.Columns.Count);\r
-                       AssertEquals ("test#48", 0, Table2.Rows.Count);\r
-                       AssertEquals ("test#49", false, Table2.CaseSensitive);\r
-                       AssertEquals ("test#50", 1, Table2.Constraints.Count);\r
-                       AssertEquals ("test#51", "", Table2.Prefix);\r
+                       Assertion.AssertEquals ("test#45", "second_test_table", Table2.TableName);\r
+                       Assertion.AssertEquals ("test#46", "", Table2.Namespace);\r
+                       Assertion.AssertEquals ("test#47", 1, Table2.Columns.Count);\r
+                       Assertion.AssertEquals ("test#48", 0, Table2.Rows.Count);\r
+                       Assertion.AssertEquals ("test#49", false, Table2.CaseSensitive);\r
+                       Assertion.AssertEquals ("test#50", 1, Table2.Constraints.Count);\r
+                       Assertion.AssertEquals ("test#51", "", Table2.Prefix);\r
                        \r
                        DataColumn column3 = Table2.Columns [0];\r
-                       AssertEquals ("test#52", true, column3.AllowDBNull);\r
-                       AssertEquals ("test#53", false, column3.AutoIncrement);\r
-                       AssertEquals ("test#54", 0L, column3.AutoIncrementSeed);\r
-                       AssertEquals ("test#55", 1L, column3.AutoIncrementStep);\r
-                       AssertEquals ("test#56", "second_first", column3.Caption);\r
-                       AssertEquals ("test#57", "Element", column3.ColumnMapping.ToString ());\r
-                       AssertEquals ("test#58", "second_first", column3.ColumnName);\r
-                       AssertEquals ("test#59", "System.String", column3.DataType.ToString ());\r
-                       AssertEquals ("test#60", "default_value", column3.DefaultValue.ToString ());\r
-                       AssertEquals ("test#61", false, column3.DesignMode);\r
-                       AssertEquals ("test#62", "", column3.Expression);\r
-                       AssertEquals ("test#63", 100, column3.MaxLength);\r
-                       AssertEquals ("test#64", "", column3.Namespace);\r
-                       AssertEquals ("test#65", 0, column3.Ordinal);\r
-                       AssertEquals ("test#66", "", column3.Prefix);\r
-                       AssertEquals ("test#67", false, column3.ReadOnly);\r
-                       AssertEquals ("test#68", true, column3.Unique);\r
+                       Assertion.AssertEquals ("test#52", true, column3.AllowDBNull);\r
+                       Assertion.AssertEquals ("test#53", false, column3.AutoIncrement);\r
+                       Assertion.AssertEquals ("test#54", 0L, column3.AutoIncrementSeed);\r
+                       Assertion.AssertEquals ("test#55", 1L, column3.AutoIncrementStep);\r
+                       Assertion.AssertEquals ("test#56", "second_first", column3.Caption);\r
+                       Assertion.AssertEquals ("test#57", "Element", column3.ColumnMapping.ToString ());\r
+                       Assertion.AssertEquals ("test#58", "second_first", column3.ColumnName);\r
+                       Assertion.AssertEquals ("test#59", "System.String", column3.DataType.ToString ());\r
+                       Assertion.AssertEquals ("test#60", "default_value", column3.DefaultValue.ToString ());\r
+                       Assertion.AssertEquals ("test#61", false, column3.DesignMode);\r
+                       Assertion.AssertEquals ("test#62", "", column3.Expression);\r
+                       Assertion.AssertEquals ("test#63", 100, column3.MaxLength);\r
+                       Assertion.AssertEquals ("test#64", "", column3.Namespace);\r
+                       Assertion.AssertEquals ("test#65", 0, column3.Ordinal);\r
+                       Assertion.AssertEquals ("test#66", "", column3.Prefix);\r
+                       Assertion.AssertEquals ("test#67", false, column3.ReadOnly);\r
+                       Assertion.AssertEquals ("test#68", true, column3.Unique);\r
                }\r
 \r
-               public void TestOwnWriteXmlSchema ()\r
+               [Test]\r
+               public void OwnWriteXmlSchema ()\r
                {\r
                        DataSet ds = new DataSet ("test_dataset");\r
                        DataTable table = new DataTable ("test_table");\r
@@ -157,179 +149,180 @@ namespace MonoTests.System.Data
                        string TextString = writer.ToString ();\r
                        string substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);\r
+                       Assertion.AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#02", "<xs:schema id=\"test_dataset\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);\r
+                       Assertion.AssertEquals ("test#02", "<xs:schema id=\"test_dataset\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#03", "  <xs:element name=\"test_dataset\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);\r
+                       Assertion.AssertEquals ("test#03", "  <xs:element name=\"test_dataset\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#04", "    <xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#04", "    <xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#05", "      <xs:choice maxOccurs=\"unbounded\">", substring);\r
+                       Assertion.AssertEquals ("test#05", "      <xs:choice maxOccurs=\"unbounded\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#06", "        <xs:element name=\"test_table\">", substring);\r
+                       Assertion.AssertEquals ("test#06", "        <xs:element name=\"test_table\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#07", "          <xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#07", "          <xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#08", "            <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#08", "            <xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#09", "              <xs:element name=\"first\" msdata:Caption=\"test\" default=\"test_default_value\" minOccurs=\"0\">", substring);\r
+                       Assertion.AssertEquals ("test#09", "              <xs:element name=\"first\" msdata:Caption=\"test\" default=\"test_default_value\" minOccurs=\"0\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#10", "                <xs:simpleType>", substring);\r
+                       Assertion.AssertEquals ("test#10", "                <xs:simpleType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#11", "                  <xs:restriction base=\"xs:string\">", substring);\r
+                       Assertion.AssertEquals ("test#11", "                  <xs:restriction base=\"xs:string\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#12", "                    <xs:maxLength value=\"100\" />", substring);\r
+                       Assertion.AssertEquals ("test#12", "                    <xs:maxLength value=\"100\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#13", "                  </xs:restriction>", substring);\r
+                       Assertion.AssertEquals ("test#13", "                  </xs:restriction>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#14", "                </xs:simpleType>", substring);\r
+                       Assertion.AssertEquals ("test#14", "                </xs:simpleType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#15", "              </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#15", "              </xs:element>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#16", "              <xs:element name=\"second\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
+                       Assertion.AssertEquals ("test#16", "              <xs:element name=\"second\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#17", "            </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#17", "            </xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#18", "          </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#18", "          </xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#19", "        </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#19", "        </xs:element>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#20", "        <xs:element name=\"second_test_table\">", substring);\r
+                       Assertion.AssertEquals ("test#20", "        <xs:element name=\"second_test_table\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#21", "          <xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#21", "          <xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#22", "            <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#22", "            <xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#23", "              <xs:element name=\"second_first\" default=\"default_value\" minOccurs=\"0\">", substring);\r
+                       Assertion.AssertEquals ("test#23", "              <xs:element name=\"second_first\" default=\"default_value\" minOccurs=\"0\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#24", "                <xs:simpleType>", substring);\r
+                       Assertion.AssertEquals ("test#24", "                <xs:simpleType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#25", "                  <xs:restriction base=\"xs:string\">", substring);\r
+                       Assertion.AssertEquals ("test#25", "                  <xs:restriction base=\"xs:string\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#26", "                    <xs:maxLength value=\"100\" />", substring);\r
+                       Assertion.AssertEquals ("test#26", "                    <xs:maxLength value=\"100\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#27", "                  </xs:restriction>", substring);\r
+                       Assertion.AssertEquals ("test#27", "                  </xs:restriction>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#28", "                </xs:simpleType>", substring);\r
+                       Assertion.AssertEquals ("test#28", "                </xs:simpleType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#29", "              </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#29", "              </xs:element>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#30", "            </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#30", "            </xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#31", "          </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#31", "          </xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#32", "        </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#32", "        </xs:element>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#33", "      </xs:choice>", substring);\r
+                       Assertion.AssertEquals ("test#33", "      </xs:choice>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#34", "    </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#34", "    </xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#36", "    <xs:unique name=\"Constraint1\">", substring);\r
+                       Assertion.AssertEquals ("test#36", "    <xs:unique name=\"Constraint1\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#37", "      <xs:selector xpath=\".//test_table\" />", substring);\r
+                       Assertion.AssertEquals ("test#37", "      <xs:selector xpath=\".//test_table\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#38", "      <xs:field xpath=\"first\" />", substring);\r
+                       Assertion.AssertEquals ("test#38", "      <xs:field xpath=\"first\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#39", "    </xs:unique>", substring);\r
+                       Assertion.AssertEquals ("test#39", "    </xs:unique>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#40", "    <xs:unique name=\"second_test_table_Constraint1\" msdata:ConstraintName=\"Constraint1\">", substring);\r
+                       Assertion.AssertEquals ("test#40", "    <xs:unique name=\"second_test_table_Constraint1\" msdata:ConstraintName=\"Constraint1\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#41", "      <xs:selector xpath=\".//second_test_table\" />", substring);\r
+                       Assertion.AssertEquals ("test#41", "      <xs:selector xpath=\".//second_test_table\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#42", "      <xs:field xpath=\"second_first\" />", substring);\r
+                       Assertion.AssertEquals ("test#42", "      <xs:field xpath=\"second_first\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#43", "    </xs:unique>", substring);\r
+                       Assertion.AssertEquals ("test#43", "    </xs:unique>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                        TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#44", "  </xs:element>", substring);                 \r
-                       AssertEquals ("test#45", "</xs:schema>", TextString);\r
+                       Assertion.AssertEquals ("test#44", "  </xs:element>", substring);                       \r
+                       Assertion.AssertEquals ("test#45", "</xs:schema>", TextString);\r
                }\r
                \r
-               public void TestReadWriteXml ()\r
+               [Test]\r
+               public void ReadWriteXml ()\r
                {\r
                        DataSet ds = new DataSet ();\r
                        ds.ReadXml ("System.Data/region.xml");\r
@@ -339,52 +332,53 @@ namespace MonoTests.System.Data
                        string TextString = writer.ToString ();\r
                         string substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#01", "<Root>", substring);\r
+                        Assertion.AssertEquals ("test#01", "<Root>", substring);\r
 \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#02", "  <Region>", substring);\r
+                        Assertion.AssertEquals ("test#02", "  <Region>", substring);\r
                        \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#03", "    <RegionID>1</RegionID>", substring);\r
+                        Assertion.AssertEquals ("test#03", "    <RegionID>1</RegionID>", substring);\r
 \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#04", "    <RegionDescription>Eastern", substring);\r
+                        Assertion.AssertEquals ("test#04", "    <RegionDescription>Eastern", substring);\r
 \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#05", "   </RegionDescription>", substring);\r
+                        Assertion.AssertEquals ("test#05", "   </RegionDescription>", substring);\r
 \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#06", "  </Region>", substring);\r
+                        Assertion.AssertEquals ("test#06", "  </Region>", substring);\r
 \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#07", "  <Region>", substring);\r
+                        Assertion.AssertEquals ("test#07", "  <Region>", substring);\r
                        \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#08", "    <RegionID>2</RegionID>", substring);\r
+                        Assertion.AssertEquals ("test#08", "    <RegionID>2</RegionID>", substring);\r
 \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#09", "    <RegionDescription>Western", substring);\r
+                        Assertion.AssertEquals ("test#09", "    <RegionDescription>Western", substring);\r
 \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#10", "   </RegionDescription>", substring);\r
+                        Assertion.AssertEquals ("test#10", "   </RegionDescription>", substring);\r
 \r
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                        AssertEquals ("test#11", "  </Region>", substring);\r
+                        Assertion.AssertEquals ("test#11", "  </Region>", substring);\r
 \r
-                        AssertEquals ("test#11", "</Root>", TextString);\r
+                        Assertion.AssertEquals ("test#11", "</Root>", TextString);\r
                }\r
 \r
-               public void TestReadWriteXmlDiffGram ()\r
+               [Test]\r
+               public void ReadWriteXmlDiffGram ()\r
                {\r
                        DataSet ds = new DataSet ();\r
                        ds.ReadXml ("System.Data/region.xml", XmlReadMode.DiffGram);\r
@@ -392,12 +386,12 @@ namespace MonoTests.System.Data
                        ds.WriteXml (writer);\r
                \r
                        string TextString = writer.ToString ();\r
-                        AssertEquals ("test#01", "<NewDataSet />", TextString);\r
+                        Assertion.AssertEquals ("test#01", "<NewDataSet />", TextString);\r
 \r
                        ds.WriteXml (writer, XmlWriteMode.DiffGram);\r
                        TextString = writer.ToString ();\r
                        \r
-                       AssertEquals ("test#02", "<NewDataSet /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\" />", TextString);\r
+                       Assertion.AssertEquals ("test#02", "<NewDataSet /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\" />", TextString);\r
 \r
                        \r
                        ds = new DataSet ();\r
@@ -410,60 +404,61 @@ namespace MonoTests.System.Data
                        TextString = writer.ToString ();\r
                         string substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#03", "<NewDataSet /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\" /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\">",substring);\r
+                       Assertion.AssertEquals ("test#03", "<NewDataSet /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\" /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\">",substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#04", "  <Root>", substring);\r
+                       Assertion.AssertEquals ("test#04", "  <Root>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#05", "    <Region diffgr:id=\"Region1\" msdata:rowOrder=\"0\" diffgr:hasChanges=\"inserted\">", substring);\r
+                       Assertion.AssertEquals ("test#05", "    <Region diffgr:id=\"Region1\" msdata:rowOrder=\"0\" diffgr:hasChanges=\"inserted\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#06", "      <RegionID>64</RegionID>", substring);\r
+                       Assertion.AssertEquals ("test#06", "      <RegionID>64</RegionID>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#07", "      <RegionDescription>Eastern", substring);\r
+                       Assertion.AssertEquals ("test#07", "      <RegionDescription>Eastern", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#07", "   </RegionDescription>", substring);\r
+                       Assertion.AssertEquals ("test#07", "   </RegionDescription>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#08", "    </Region>", substring);\r
+                       Assertion.AssertEquals ("test#08", "    </Region>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#09", "    <Region diffgr:id=\"Region2\" msdata:rowOrder=\"1\" diffgr:hasChanges=\"inserted\">", substring);\r
+                       Assertion.AssertEquals ("test#09", "    <Region diffgr:id=\"Region2\" msdata:rowOrder=\"1\" diffgr:hasChanges=\"inserted\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#10", "      <RegionID>2</RegionID>", substring);\r
+                       Assertion.AssertEquals ("test#10", "      <RegionID>2</RegionID>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#11", "      <RegionDescription>Western", substring);\r
+                       Assertion.AssertEquals ("test#11", "      <RegionDescription>Western", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#12", "   </RegionDescription>", substring);\r
+                       Assertion.AssertEquals ("test#12", "   </RegionDescription>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#13", "    </Region>", substring);\r
+                       Assertion.AssertEquals ("test#13", "    </Region>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#14", "  </Root>", substring);\r
+                       Assertion.AssertEquals ("test#14", "  </Root>", substring);\r
                        \r
-                       AssertEquals ("test#15", "</diffgr:diffgram>", TextString);\r
+                       Assertion.AssertEquals ("test#15", "</diffgr:diffgram>", TextString);\r
                }\r
 \r
-               public void TestWriteXmlSchema ()\r
+               [Test]\r
+               public void WriteXmlSchema ()\r
                {\r
                        DataSet ds = new DataSet ();                    \r
                        ds.ReadXml ("System.Data/region.xml");\r
@@ -474,72 +469,73 @@ namespace MonoTests.System.Data
                        \r
                        string substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);\r
+                       Assertion.AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#02", "<xs:schema id=\"Root\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);\r
+                       Assertion.AssertEquals ("test#02", "<xs:schema id=\"Root\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#03", "  <xs:element name=\"Root\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);\r
+                       Assertion.AssertEquals ("test#03", "  <xs:element name=\"Root\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#04", "    <xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#04", "    <xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#05", "      <xs:choice maxOccurs=\"unbounded\">", substring);\r
+                       Assertion.AssertEquals ("test#05", "      <xs:choice maxOccurs=\"unbounded\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#06", "        <xs:element name=\"Region\">", substring);\r
+                       Assertion.AssertEquals ("test#06", "        <xs:element name=\"Region\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#07", "          <xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#07", "          <xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#08", "            <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#08", "            <xs:sequence>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#09", "              <xs:element name=\"RegionID\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
+                       Assertion.AssertEquals ("test#09", "              <xs:element name=\"RegionID\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#10", "              <xs:element name=\"RegionDescription\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
+                       Assertion.AssertEquals ("test#10", "              <xs:element name=\"RegionDescription\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#11", "            </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#11", "            </xs:sequence>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#12", "          </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#12", "          </xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#13", "        </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#13", "        </xs:element>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#14", "      </xs:choice>", substring);\r
+                       Assertion.AssertEquals ("test#14", "      </xs:choice>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#15", "    </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#15", "    </xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#16", "  </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#16", "  </xs:element>", substring);\r
 \r
-                       AssertEquals ("test#17", "</xs:schema>", TextString);\r
+                       Assertion.AssertEquals ("test#17", "</xs:schema>", TextString);\r
                }\r
                \r
-               public void TestReadWriteXmlSchemaIgnoreSchema ()\r
+               [Test]\r
+               public void ReadWriteXmlSchemaIgnoreSchema ()\r
                {\r
                        DataSet ds = new DataSet ();\r
                        ds.ReadXmlSchema ("System.Data/store.xsd");\r
@@ -551,124 +547,125 @@ namespace MonoTests.System.Data
                        \r
                        string substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);\r
+                       Assertion.AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#02", "<xs:schema id=\"NewDataSet\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);\r
+                       Assertion.AssertEquals ("test#02", "<xs:schema id=\"NewDataSet\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#03", "  <xs:complexType name=\"bookstoreType\">", substring);\r
+                       Assertion.AssertEquals ("test#03", "  <xs:complexType name=\"bookstoreType\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#04", "    <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#04", "    <xs:sequence>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#05", "      <xs:element name=\"book\" type=\"bookType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);\r
+                       Assertion.AssertEquals ("test#05", "      <xs:element name=\"book\" type=\"bookType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#06", "    </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#06", "    </xs:sequence>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#07", "  </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#07", "  </xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#08", "  <xs:complexType name=\"bookType\">", substring);\r
+                       Assertion.AssertEquals ("test#08", "  <xs:complexType name=\"bookType\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#09", "    <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#09", "    <xs:sequence>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#10", "      <xs:element name=\"title\" type=\"xs:string\" msdata:Ordinal=\"1\" />", substring);\r
+                       Assertion.AssertEquals ("test#10", "      <xs:element name=\"title\" type=\"xs:string\" msdata:Ordinal=\"1\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#11", "      <xs:element name=\"price\" type=\"xs:decimal\" msdata:Ordinal=\"2\" />", substring);\r
+                       Assertion.AssertEquals ("test#11", "      <xs:element name=\"price\" type=\"xs:decimal\" msdata:Ordinal=\"2\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#12", "      <xs:element name=\"author\" type=\"authorName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);\r
+                       Assertion.AssertEquals ("test#12", "      <xs:element name=\"author\" type=\"authorName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#13", "    </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#13", "    </xs:sequence>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#14", "    <xs:attribute name=\"genre\" type=\"xs:string\" />", substring);\r
+                       Assertion.AssertEquals ("test#14", "    <xs:attribute name=\"genre\" type=\"xs:string\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#15", "  </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#15", "  </xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#16", "  <xs:complexType name=\"authorName\">", substring);\r
+                       Assertion.AssertEquals ("test#16", "  <xs:complexType name=\"authorName\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#17", "    <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#17", "    <xs:sequence>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#18", "      <xs:element name=\"first-name\" type=\"xs:string\" />", substring);\r
+                       Assertion.AssertEquals ("test#18", "      <xs:element name=\"first-name\" type=\"xs:string\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#19", "      <xs:element name=\"last-name\" type=\"xs:string\" />", substring);\r
+                       Assertion.AssertEquals ("test#19", "      <xs:element name=\"last-name\" type=\"xs:string\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#20", "    </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#20", "    </xs:sequence>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#21", "  </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#21", "  </xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#22", "  <xs:element name=\"bookstore\" type=\"bookstoreType\" />", substring);\r
+                       Assertion.AssertEquals ("test#22", "  <xs:element name=\"bookstore\" type=\"bookstoreType\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#23", "  <xs:element name=\"NewDataSet\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);\r
+                       Assertion.AssertEquals ("test#23", "  <xs:element name=\"NewDataSet\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#24", "    <xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#24", "    <xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#25", "      <xs:choice maxOccurs=\"unbounded\">", substring);\r
+                       Assertion.AssertEquals ("test#25", "      <xs:choice maxOccurs=\"unbounded\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#26", "        <xs:element ref=\"bookstore\" />", substring);\r
+                       Assertion.AssertEquals ("test#26", "        <xs:element ref=\"bookstore\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#27", "      </xs:choice>", substring);\r
+                       Assertion.AssertEquals ("test#27", "      </xs:choice>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#28", "    </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#28", "    </xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#29", "  </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#29", "  </xs:element>", substring);\r
 \r
-                       AssertEquals ("test#30", "</xs:schema>", TextString);\r
+                       Assertion.AssertEquals ("test#30", "</xs:schema>", TextString);\r
                }\r
                \r
-               public void TestReadWriteXmlSchema ()\r
+               [Test]\r
+               public void ReadWriteXmlSchema ()\r
                {\r
                        DataSet ds = new DataSet ();\r
                        ds.ReadXmlSchema ("System.Data/store.xsd");\r
@@ -680,153 +677,153 @@ namespace MonoTests.System.Data
                        \r
                        string substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);\r
+                       Assertion.AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#02", "<xs:schema id=\"Root\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);\r
+                       Assertion.AssertEquals ("test#02", "<xs:schema id=\"Root\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#03", "  <xs:complexType name=\"bookstoreType\">", substring);\r
+                       Assertion.AssertEquals ("test#03", "  <xs:complexType name=\"bookstoreType\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#04", "    <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#04", "    <xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#05", "      <xs:element name=\"book\" type=\"bookType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);\r
+                       Assertion.AssertEquals ("test#05", "      <xs:element name=\"book\" type=\"bookType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#06", "    </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#06", "    </xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#07", "  </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#07", "  </xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#08", "  <xs:complexType name=\"bookType\">", substring);\r
+                       Assertion.AssertEquals ("test#08", "  <xs:complexType name=\"bookType\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#09", "    <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#09", "    <xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#10", "      <xs:element name=\"title\" type=\"xs:string\" msdata:Ordinal=\"1\" />", substring);\r
+                       Assertion.AssertEquals ("test#10", "      <xs:element name=\"title\" type=\"xs:string\" msdata:Ordinal=\"1\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#11", "      <xs:element name=\"price\" type=\"xs:decimal\" msdata:Ordinal=\"2\" />", substring);\r
+                       Assertion.AssertEquals ("test#11", "      <xs:element name=\"price\" type=\"xs:decimal\" msdata:Ordinal=\"2\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#12", "      <xs:element name=\"author\" type=\"authorName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);\r
+                       Assertion.AssertEquals ("test#12", "      <xs:element name=\"author\" type=\"authorName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#13", "    </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#13", "    </xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#14", "    <xs:attribute name=\"genre\" type=\"xs:string\" />", substring);\r
+                       Assertion.AssertEquals ("test#14", "    <xs:attribute name=\"genre\" type=\"xs:string\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#15", "  </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#15", "  </xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#16", "  <xs:complexType name=\"authorName\">", substring);\r
+                       Assertion.AssertEquals ("test#16", "  <xs:complexType name=\"authorName\">", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#17", "    <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#17", "    <xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#18", "      <xs:element name=\"first-name\" type=\"xs:string\" />", substring);\r
+                       Assertion.AssertEquals ("test#18", "      <xs:element name=\"first-name\" type=\"xs:string\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#19", "      <xs:element name=\"last-name\" type=\"xs:string\" />", substring);\r
+                       Assertion.AssertEquals ("test#19", "      <xs:element name=\"last-name\" type=\"xs:string\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#20", "    </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#20", "    </xs:sequence>", substring);\r
                \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#21", "  </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#21", "  </xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#22", "  <xs:element name=\"bookstore\" type=\"bookstoreType\" />", substring);\r
+                       Assertion.AssertEquals ("test#22", "  <xs:element name=\"bookstore\" type=\"bookstoreType\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#23", "  <xs:element name=\"Root\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);\r
+                       Assertion.AssertEquals ("test#23", "  <xs:element name=\"Root\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#24", "    <xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#24", "    <xs:complexType>", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#25", "      <xs:choice maxOccurs=\"unbounded\">", substring);\r
+                       Assertion.AssertEquals ("test#25", "      <xs:choice maxOccurs=\"unbounded\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#26", "        <xs:element ref=\"bookstore\" />", substring);\r
+                       Assertion.AssertEquals ("test#26", "        <xs:element ref=\"bookstore\" />", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#27", "        <xs:element name=\"Region\">", substring);\r
+                       Assertion.AssertEquals ("test#27", "        <xs:element name=\"Region\">", substring);\r
 \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#28", "          <xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#28", "          <xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#29", "            <xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#29", "            <xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#30", "              <xs:element name=\"RegionID\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
+                       Assertion.AssertEquals ("test#30", "              <xs:element name=\"RegionID\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#31", "              <xs:element name=\"RegionDescription\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
+                       Assertion.AssertEquals ("test#31", "              <xs:element name=\"RegionDescription\" type=\"xs:string\" minOccurs=\"0\" />", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#32", "            </xs:sequence>", substring);\r
+                       Assertion.AssertEquals ("test#32", "            </xs:sequence>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#33", "          </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#33", "          </xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#34", "        </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#34", "        </xs:element>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#35", "      </xs:choice>", substring);\r
+                       Assertion.AssertEquals ("test#35", "      </xs:choice>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#36", "    </xs:complexType>", substring);\r
+                       Assertion.AssertEquals ("test#36", "    </xs:complexType>", substring);\r
                        \r
                        substring = TextString.Substring (0, TextString.IndexOf("\n"));\r
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);\r
-                       AssertEquals ("test#37", "  </xs:element>", substring);\r
+                       Assertion.AssertEquals ("test#37", "  </xs:element>", substring);\r
 \r
-                       AssertEquals ("test#38", "</xs:schema>", TextString);\r
+                       Assertion.AssertEquals ("test#38", "</xs:schema>", TextString);\r
                }\r
         }\r
 }\r
index a65598ab4d1f759104235d37399537470573d71e..f6e448d57d02a520326cde179ca9122440e0ff8f 100644 (file)
@@ -1,8 +1,11 @@
 // DataTableTest.cs - NUnit Test Cases for testing the DataTable 
 //
-// Franklin Wise (gracenote@earthlink.net)
+// Authors:
+//   Franklin Wise (gracenote@earthlink.net)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 // 
 // (C) Franklin Wise
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -11,26 +14,11 @@ using System.Data;
 
 namespace MonoTests.System.Data
 {
-
-       public class DataTableTest : TestCase 
+       [TestFixture]
+       public class DataTableTest
        {
-       
-               public DataTableTest() : base ("MonoTest.System.Data.DataTableTest") {}
-               public DataTableTest(string name) : base(name) {}
-
-               protected override void SetUp() {}
-
-               protected override void TearDown() {}
-
-               public static ITest Suite 
-               {
-                       get 
-                       { 
-                               return new TestSuite(typeof(DataTableTest)); 
-                       }
-               }
-
-               public void TestCtor()
+               [Test]
+               public void Ctor()
                {
                        DataTable dt = new DataTable();
 
@@ -55,7 +43,8 @@ namespace MonoTests.System.Data
                        
                }
 
-                public void TestSelect ()
+               [Test]
+                public void Select ()
                 {
                        DataSet Set = new DataSet ();
                        DataTable Mom = new DataTable ("Mom");
@@ -133,38 +122,39 @@ namespace MonoTests.System.Data
                        Child.Rows.Add (Row);
                        
                        DataRow [] Rows = Mom.Select ("Name = 'Teresa'");
-                       AssertEquals ("test#01", 2, Rows.Length);
+                       Assertion.AssertEquals ("test#01", 2, Rows.Length);
                        
                        Rows = Mom.Select ("Name = 'Teresa' and ChildName = 'Nick'");
-                       AssertEquals ("test#02", 0, Rows.Length);
+                       Assertion.AssertEquals ("test#02", 0, Rows.Length);
 
                        Rows = Mom.Select ("Name = 'Teresa' and ChildName = 'Jack'");
-                       AssertEquals ("test#03", 1, Rows.Length);
+                       Assertion.AssertEquals ("test#03", 1, Rows.Length);
 
                        Rows = Mom.Select ("Name = 'Teresa' and ChildName <> 'Jack'");
-                       AssertEquals ("test#04", "Mack", Rows [0] [1]);
+                       Assertion.AssertEquals ("test#04", "Mack", Rows [0] [1]);
                        
                        Rows = Mom.Select ("Name = 'Teresa' or ChildName <> 'Jack'");
-                       AssertEquals ("test#05", 5, Rows.Length);
+                       Assertion.AssertEquals ("test#05", 5, Rows.Length);
                        
                        Rows = Child.Select ("age = 20 - 1");
-                       AssertEquals ("test#06", 1, Rows.Length);
+                       Assertion.AssertEquals ("test#06", 1, Rows.Length);
                        
                        Rows = Child.Select ("age <= 20");
-                       AssertEquals ("test#07", 3, Rows.Length);
+                       Assertion.AssertEquals ("test#07", 3, Rows.Length);
                        
                        Rows = Child.Select ("age >= 20");
-                       AssertEquals ("test#08", 3, Rows.Length);
+                       Assertion.AssertEquals ("test#08", 3, Rows.Length);
                        
                        Rows = Child.Select ("age >= 20 and name = 'Mack' or name = 'Nick'");
-                       AssertEquals ("test#09", 2, Rows.Length);
+                       Assertion.AssertEquals ("test#09", 2, Rows.Length);
 
                        Rows = Child.Select ("age >= 20 and (name = 'Mack' or name = 'Nick')");
-                       AssertEquals ("test#10", 1, Rows.Length);
-                       AssertEquals ("test#11", "Mack", Rows [0] [0]);
+                       Assertion.AssertEquals ("test#10", 1, Rows.Length);
+                       Assertion.AssertEquals ("test#11", "Mack", Rows [0] [0]);
                 }
                 
-                public void TestSelect2 ()
+               [Test]
+                public void Select2 ()
                 {
                        DataSet Set = new DataSet ();
                        DataTable Child = new DataTable ("Child");                                              
@@ -207,32 +197,33 @@ namespace MonoTests.System.Data
                        Child.Rows.Add (Row);
 
                        DataRow [] Rows = Child.Select ("age >= 20", "age DESC");
-                       AssertEquals ("test#01", 3, Rows.Length);
-                       AssertEquals ("test#02", "Mack", Rows [0] [0]);
-                       AssertEquals ("test#03", "Mick", Rows [1] [0]);                 
-                       AssertEquals ("test#04", "Dick", Rows [2] [0]);                 
+                       Assertion.AssertEquals ("test#01", 3, Rows.Length);
+                       Assertion.AssertEquals ("test#02", "Mack", Rows [0] [0]);
+                       Assertion.AssertEquals ("test#03", "Mick", Rows [1] [0]);                       
+                       Assertion.AssertEquals ("test#04", "Dick", Rows [2] [0]);                       
                        
                        Rows = Child.Select ("age >= 20", "age asc");
-                       AssertEquals ("test#05", 3, Rows.Length);
-                       AssertEquals ("test#06", "Dick", Rows [0] [0]);
-                       AssertEquals ("test#07", "Mick", Rows [1] [0]);                 
-                       AssertEquals ("test#08", "Mack", Rows [2] [0]);                 
+                       Assertion.AssertEquals ("test#05", 3, Rows.Length);
+                       Assertion.AssertEquals ("test#06", "Dick", Rows [0] [0]);
+                       Assertion.AssertEquals ("test#07", "Mick", Rows [1] [0]);                       
+                       Assertion.AssertEquals ("test#08", "Mack", Rows [2] [0]);                       
                 
                        Rows = Child.Select ("age >= 20", "name asc");
-                       AssertEquals ("test#09", 3, Rows.Length);
-                       AssertEquals ("test#10", "Dick", Rows [0] [0]);
-                       AssertEquals ("test#11", "Mack", Rows [1] [0]);                 
-                       AssertEquals ("test#12", "Mick", Rows [2] [0]);                 
+                       Assertion.AssertEquals ("test#09", 3, Rows.Length);
+                       Assertion.AssertEquals ("test#10", "Dick", Rows [0] [0]);
+                       Assertion.AssertEquals ("test#11", "Mack", Rows [1] [0]);                       
+                       Assertion.AssertEquals ("test#12", "Mick", Rows [2] [0]);                       
 
                        Rows = Child.Select ("age >= 20", "name desc");
-                       AssertEquals ("test#09", 3, Rows.Length);
-                       AssertEquals ("test#10", "Mick", Rows [0] [0]);
-                       AssertEquals ("test#11", "Mack", Rows [1] [0]);                 
-                       AssertEquals ("test#12", "Dick", Rows [2] [0]);                 
+                       Assertion.AssertEquals ("test#09", 3, Rows.Length);
+                       Assertion.AssertEquals ("test#10", "Mick", Rows [0] [0]);
+                       Assertion.AssertEquals ("test#11", "Mack", Rows [1] [0]);                       
+                       Assertion.AssertEquals ("test#12", "Dick", Rows [2] [0]);                       
 
                 }
 
-               public void TestSelectParsing ()
+               [Test]
+               public void SelectParsing ()
                {
                        DataTable T = new DataTable ("test");
                        DataColumn C = new DataColumn ("name");
@@ -261,33 +252,34 @@ namespace MonoTests.System.Data
                        Row [2] = 1;
                        T.Rows.Add (Row);
 
-                       AssertEquals ("test#01", 12, T.Select ("age<=10").Length);
+                       Assertion.AssertEquals ("test#01", 12, T.Select ("age<=10").Length);
                        
-                       AssertEquals ("test#02", 12, T.Select ("age\n\t<\n\t=\t\n10").Length);
+                       Assertion.AssertEquals ("test#02", 12, T.Select ("age\n\t<\n\t=\t\n10").Length);
 
                        try {
                                T.Select ("name = 1human ");
-                               Fail ("test#03");
+                               Assertion.Fail ("test#03");
                        } catch (Exception e) {
                                
                                // missing operand after 'human' operand 
-                               AssertEquals ("test#04", typeof (SyntaxErrorException), e.GetType ());                          
+                               Assertion.AssertEquals ("test#04", typeof (SyntaxErrorException), e.GetType ());                                
                        }
                        
                        try {                   
                                T.Select ("name = 1");
-                               Fail ("test#05");
+                               Assertion.Fail ("test#05");
                        } catch (Exception e) {
                                
                                // Cannot perform '=' operation between string and Int32
-                               AssertEquals ("test#06", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("test#06", typeof (EvaluateException), e.GetType ());
                        }
                        
-                       AssertEquals ("test#07", 1, T.Select ("age = '13'").Length);
+                       Assertion.AssertEquals ("test#07", 1, T.Select ("age = '13'").Length);
 
                }
 
-               public void TestSelectOperators ()
+               [Test]
+               public void SelectOperators ()
                {
                        DataTable T = new DataTable ("test");
                        DataColumn C = new DataColumn ("name");
@@ -316,22 +308,23 @@ namespace MonoTests.System.Data
                        Row [2] = 1;
                        T.Rows.Add (Row);
                        
-                       AssertEquals ("test#01", 11, T.Select ("age < 10").Length);
-                       AssertEquals ("test#02", 12, T.Select ("age <= 10").Length);                    
-                       AssertEquals ("test#03", 12, T.Select ("age< =10").Length);                     
-                       AssertEquals ("test#04", 89, T.Select ("age > 10").Length);
-                       AssertEquals ("test#05", 90, T.Select ("age >= 10").Length);                    
-                       AssertEquals ("test#06", 100, T.Select ("age <> 10").Length);
-                       AssertEquals ("test#07", 3, T.Select ("name < 'human10'").Length);
-                       AssertEquals ("test#08", 3, T.Select ("id < '10'").Length);
+                       Assertion.AssertEquals ("test#01", 11, T.Select ("age < 10").Length);
+                       Assertion.AssertEquals ("test#02", 12, T.Select ("age <= 10").Length);                  
+                       Assertion.AssertEquals ("test#03", 12, T.Select ("age< =10").Length);                   
+                       Assertion.AssertEquals ("test#04", 89, T.Select ("age > 10").Length);
+                       Assertion.AssertEquals ("test#05", 90, T.Select ("age >= 10").Length);                  
+                       Assertion.AssertEquals ("test#06", 100, T.Select ("age <> 10").Length);
+                       Assertion.AssertEquals ("test#07", 3, T.Select ("name < 'human10'").Length);
+                       Assertion.AssertEquals ("test#08", 3, T.Select ("id < '10'").Length);
                        // FIXME: Somebody explain how this can be possible.
                        // it seems that it is no matter between 10 - 30. The
                        // result is allways 25 :-P
-                       AssertEquals ("test#09", 25, T.Select ("id < 10").Length);
+                       Assertion.AssertEquals ("test#09", 25, T.Select ("id < 10").Length);
                        
                }
 
-               public void TestSelectExceptions ()
+               [Test]
+               public void SelectExceptions ()
                {
                        DataTable T = new DataTable ("test");
                        DataColumn C = new DataColumn ("name");
@@ -352,27 +345,28 @@ namespace MonoTests.System.Data
                        
                        try {
                                T.Select ("name = human1");
-                               Fail ("test#01");
+                               Assertion.Fail ("test#01");
                        } catch (Exception e) {
                                
                                // column name human not found
-                               AssertEquals ("test#02", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("test#02", typeof (EvaluateException), e.GetType ());
                        }
                        
-                       AssertEquals ("test#04", 1, T.Select ("id = '12'").Length);
-                       AssertEquals ("test#05", 1, T.Select ("id = 12").Length);
+                       Assertion.AssertEquals ("test#04", 1, T.Select ("id = '12'").Length);
+                       Assertion.AssertEquals ("test#05", 1, T.Select ("id = 12").Length);
                        
                        try {
                                T.Select ("id = 1k3");
-                               Fail ("test#06");
+                               Assertion.Fail ("test#06");
                        } catch (Exception e) {
                                
                                // no operands after k3 operator
-                               AssertEquals ("test#07", typeof (SyntaxErrorException), e.GetType ());
+                               Assertion.AssertEquals ("test#07", typeof (SyntaxErrorException), e.GetType ());
                        }                                               
                }
                
-               public void TestSelectStringOperators ()
+               [Test]
+               public void SelectStringOperators ()
                {
                        DataTable T = new DataTable ("test");
                        DataColumn C = new DataColumn ("name");
@@ -400,59 +394,60 @@ namespace MonoTests.System.Data
                        Row [2] = 1;
                        T.Rows.Add (Row);
                                        
-                       AssertEquals ("test#01", 1, T.Select ("name = 'human' + 1").Length);
+                       Assertion.AssertEquals ("test#01", 1, T.Select ("name = 'human' + 1").Length);
                        
-                       AssertEquals ("test#02", "human1", T.Select ("name = 'human' + 1") [0] ["name"]);                       
-                       AssertEquals ("test#03", 1, T.Select ("name = 'human' + '1'").Length);
-                       AssertEquals ("test#04", "human1", T.Select ("name = 'human' + '1'") [0] ["name"]);                     
-                       AssertEquals ("test#05", 1, T.Select ("name = 'human' + 1 + 2").Length);
-                       AssertEquals ("test#06", "human12", T.Select ("name = 'human' + '1' + '2'") [0] ["name"]);
+                       Assertion.AssertEquals ("test#02", "human1", T.Select ("name = 'human' + 1") [0] ["name"]);                     
+                       Assertion.AssertEquals ("test#03", 1, T.Select ("name = 'human' + '1'").Length);
+                       Assertion.AssertEquals ("test#04", "human1", T.Select ("name = 'human' + '1'") [0] ["name"]);                   
+                       Assertion.AssertEquals ("test#05", 1, T.Select ("name = 'human' + 1 + 2").Length);
+                       Assertion.AssertEquals ("test#06", "human12", T.Select ("name = 'human' + '1' + '2'") [0] ["name"]);
                        
-                       AssertEquals ("test#07", 1, T.Select ("name = 'huMAn' + 1").Length);
+                       Assertion.AssertEquals ("test#07", 1, T.Select ("name = 'huMAn' + 1").Length);
                        
                        Set.CaseSensitive = true;
-                       AssertEquals ("test#08", 0, T.Select ("name = 'huMAn' + 1").Length);
+                       Assertion.AssertEquals ("test#08", 0, T.Select ("name = 'huMAn' + 1").Length);
                        
                        T.CaseSensitive = false;
-                       AssertEquals ("test#09", 1, T.Select ("name = 'huMAn' + 1").Length);
+                       Assertion.AssertEquals ("test#09", 1, T.Select ("name = 'huMAn' + 1").Length);
                        
                        T.CaseSensitive = true;
-                       AssertEquals ("test#10", 0, T.Select ("name = 'huMAn' + 1").Length);
+                       Assertion.AssertEquals ("test#10", 0, T.Select ("name = 'huMAn' + 1").Length);
                        
                        Set.CaseSensitive = false;
-                       AssertEquals ("test#11", 0, T.Select ("name = 'huMAn' + 1").Length);
+                       Assertion.AssertEquals ("test#11", 0, T.Select ("name = 'huMAn' + 1").Length);
                        
                        T.CaseSensitive = false;
-                       AssertEquals ("test#12", 1, T.Select ("name = 'huMAn' + 1").Length);
+                       Assertion.AssertEquals ("test#12", 1, T.Select ("name = 'huMAn' + 1").Length);
                        
-                       AssertEquals ("test#13", 0, T.Select ("name = 'human1*'").Length);
-                       AssertEquals ("test#14", 11, T.Select ("name like 'human1*'").Length);
-                       AssertEquals ("test#15", 11, T.Select ("name like 'human1%'").Length);
+                       Assertion.AssertEquals ("test#13", 0, T.Select ("name = 'human1*'").Length);
+                       Assertion.AssertEquals ("test#14", 11, T.Select ("name like 'human1*'").Length);
+                       Assertion.AssertEquals ("test#15", 11, T.Select ("name like 'human1%'").Length);
                        
                        try {
-                               AssertEquals ("test#16", 11, T.Select ("name like 'h*an1'").Length);
-                               Fail ("test#16");
+                               Assertion.AssertEquals ("test#16", 11, T.Select ("name like 'h*an1'").Length);
+                               Assertion.Fail ("test#16");
                        } catch (Exception e) {
                                
                                // 'h*an1' is invalid
-                               AssertEquals ("test#17", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("test#17", typeof (EvaluateException), e.GetType ());
                        }
                        
                        try {
-                               AssertEquals ("test#18", 11, T.Select ("name like 'h%an1'").Length);
-                               Fail ("test#19");
+                               Assertion.AssertEquals ("test#18", 11, T.Select ("name like 'h%an1'").Length);
+                               Assertion.Fail ("test#19");
                        } catch (Exception e) {
                                
                                // 'h%an1' is invalid
-                               AssertEquals ("test#20", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("test#20", typeof (EvaluateException), e.GetType ());
                        }
                        
-                       AssertEquals ("test#21", 0, T.Select ("name like 'h[%]an'").Length);
-                       AssertEquals ("test#22", 1, T.Select ("name like 'h[*]an'").Length);
+                       Assertion.AssertEquals ("test#21", 0, T.Select ("name like 'h[%]an'").Length);
+                       Assertion.AssertEquals ("test#22", 1, T.Select ("name like 'h[*]an'").Length);
                        
                }
 
-               public void TestSelectAggregates ()
+               [Test]
+               public void SelectAggregates ()
                {
                        DataTable T = new DataTable ("test");
                        DataColumn C = new DataColumn ("name");
@@ -472,16 +467,17 @@ namespace MonoTests.System.Data
                                T.Rows.Add (Row);
                        }
                        
-                       AssertEquals ("test#01", 1000, T.Select ("Sum(age) > 10").Length);
-                       AssertEquals ("test#02", 1000, T.Select ("avg(age) = 499").Length);
-                       AssertEquals ("test#03", 1000, T.Select ("min(age) = 0").Length);
-                       AssertEquals ("test#04", 1000, T.Select ("max(age) = 999").Length);
-                       AssertEquals ("test#05", 1000, T.Select ("count(age) = 1000").Length);
-                       AssertEquals ("test#06", 1000, T.Select ("stdev(age) > 287 and stdev(age) < 289").Length);
-                       AssertEquals ("test#07", 1000, T.Select ("var(age) < 83417 and var(age) > 83416").Length);
+                       Assertion.AssertEquals ("test#01", 1000, T.Select ("Sum(age) > 10").Length);
+                       Assertion.AssertEquals ("test#02", 1000, T.Select ("avg(age) = 499").Length);
+                       Assertion.AssertEquals ("test#03", 1000, T.Select ("min(age) = 0").Length);
+                       Assertion.AssertEquals ("test#04", 1000, T.Select ("max(age) = 999").Length);
+                       Assertion.AssertEquals ("test#05", 1000, T.Select ("count(age) = 1000").Length);
+                       Assertion.AssertEquals ("test#06", 1000, T.Select ("stdev(age) > 287 and stdev(age) < 289").Length);
+                       Assertion.AssertEquals ("test#07", 1000, T.Select ("var(age) < 83417 and var(age) > 83416").Length);
                }
                
-               public void TestSelectFunctions ()
+               [Test]
+               public void SelectFunctions ()
                {
                        DataTable T = new DataTable ("test");
                        DataColumn C = new DataColumn ("name");
@@ -508,20 +504,21 @@ namespace MonoTests.System.Data
                        T.Rows.Add (Row);
 
                        //TODO: How to test Convert-function
-                       AssertEquals ("test#01", 25, T.Select ("age = 5*5") [0]["age"]);                        
-                       AssertEquals ("test#02", 901, T.Select ("len(name) > 7").Length);
-                       AssertEquals ("test#03", 125, T.Select ("age = 5*5*5 AND len(name)>7") [0]["age"]);
-                       AssertEquals ("test#04", 1, T.Select ("isnull(id, 'test') = 'test'").Length);                   
-                       AssertEquals ("test#05", 1000, T.Select ("iif(id = '56', 'test', 'false') = 'false'").Length);                  
-                       AssertEquals ("test#06", 1, T.Select ("iif(id = '56', 'test', 'false') = 'test'").Length);
-                       AssertEquals ("test#07", 9, T.Select ("substring(id, 2, 3) = '23'").Length);
-                       AssertEquals ("test#08", "123", T.Select ("substring(id, 2, 3) = '23'") [0] ["id"]);
-                       AssertEquals ("test#09", "423", T.Select ("substring(id, 2, 3) = '23'") [3] ["id"]);
-                       AssertEquals ("test#10", "923", T.Select ("substring(id, 2, 3) = '23'") [8] ["id"]);
+                       Assertion.AssertEquals ("test#01", 25, T.Select ("age = 5*5") [0]["age"]);                      
+                       Assertion.AssertEquals ("test#02", 901, T.Select ("len(name) > 7").Length);
+                       Assertion.AssertEquals ("test#03", 125, T.Select ("age = 5*5*5 AND len(name)>7") [0]["age"]);
+                       Assertion.AssertEquals ("test#04", 1, T.Select ("isnull(id, 'test') = 'test'").Length);                 
+                       Assertion.AssertEquals ("test#05", 1000, T.Select ("iif(id = '56', 'test', 'false') = 'false'").Length);                        
+                       Assertion.AssertEquals ("test#06", 1, T.Select ("iif(id = '56', 'test', 'false') = 'test'").Length);
+                       Assertion.AssertEquals ("test#07", 9, T.Select ("substring(id, 2, 3) = '23'").Length);
+                       Assertion.AssertEquals ("test#08", "123", T.Select ("substring(id, 2, 3) = '23'") [0] ["id"]);
+                       Assertion.AssertEquals ("test#09", "423", T.Select ("substring(id, 2, 3) = '23'") [3] ["id"]);
+                       Assertion.AssertEquals ("test#10", "923", T.Select ("substring(id, 2, 3) = '23'") [8] ["id"]);
                        
                }
 
-               public void TestSelectRelations ()
+               [Test]
+               public void SelectRelations ()
                {
                         DataSet Set = new DataSet ();
                         DataTable Mom = new DataTable ("Mom");
@@ -600,21 +597,21 @@ namespace MonoTests.System.Data
                         Child.Rows.Add (Row);
                        
                        DataRow [] Rows = Child.Select ("name = Parent.Childname");
-                       AssertEquals ("test#01", 6, Rows.Length);
+                       Assertion.AssertEquals ("test#01", 6, Rows.Length);
                        Rows = Child.Select ("Parent.childname = 'Jack'");
-                       AssertEquals ("test#02", 1, Rows.Length);
+                       Assertion.AssertEquals ("test#02", 1, Rows.Length);
                        
                        try {
                                // FIXME: LAMESPEC: Why the exception is thrown why... why... 
                                Mom.Select ("Child.Name = 'Jack'");
-                               Fail ("test#03");
+                               Assertion.Fail ("test#03");
                        } catch (Exception e) {
-                               AssertEquals ("test#04", typeof (SyntaxErrorException), e.GetType ());
-                               AssertEquals ("test#05", "Cannot interpret token 'Child' at position 1.", e.Message);
+                               Assertion.AssertEquals ("test#04", typeof (SyntaxErrorException), e.GetType ());
+                               Assertion.AssertEquals ("test#05", "Cannot interpret token 'Child' at position 1.", e.Message);
                        }
                        
                        Rows = Child.Select ("Parent.name = 'Laura'");
-                       AssertEquals ("test#06", 3, Rows.Length);
+                       Assertion.AssertEquals ("test#06", 3, Rows.Length);
                        
                        DataTable Parent2 = new DataTable ("Parent2");
                         Col = new DataColumn ("Name");
@@ -654,28 +651,29 @@ namespace MonoTests.System.Data
                        
                        try {
                                Rows = Child.Select ("Parent.ChildName = 'Jack'");
-                               Fail ("test#07");
+                               Assertion.Fail ("test#07");
                        } catch (Exception e) {
-                               AssertEquals ("test#08", typeof (EvaluateException), e.GetType ());
-                               AssertEquals ("test#09", "The table [Child] involved in more than one relation. You must explicitly mention a relation name in the expression 'parent.[ChildName]'.", e.Message);
+                               Assertion.AssertEquals ("test#08", typeof (EvaluateException), e.GetType ());
+                               Assertion.AssertEquals ("test#09", "The table [Child] involved in more than one relation. You must explicitly mention a relation name in the expression 'parent.[ChildName]'.", e.Message);
                        }
                        
                        Rows = Child.Select ("Parent(rel).ChildName = 'Jack'");
-                       AssertEquals ("test#10", 1, Rows.Length);
+                       Assertion.AssertEquals ("test#10", 1, Rows.Length);
 
                        Rows = Child.Select ("Parent(Rel2).ChildName = 'Jack'");
-                       AssertEquals ("test#10", 1, Rows.Length);
+                       Assertion.AssertEquals ("test#10", 1, Rows.Length);
                        
                        try {
                                Mom.Select ("Parent.name  = 'John'");
                        } catch (Exception e) {
-                               AssertEquals ("test#11", typeof (IndexOutOfRangeException), e.GetType ());
-                               AssertEquals ("test#12", "Cannot find relation 0.", e.Message);
+                               Assertion.AssertEquals ("test#11", typeof (IndexOutOfRangeException), e.GetType ());
+                               Assertion.AssertEquals ("test#12", "Cannot find relation 0.", e.Message);
                        }
                        
                }
 
-               public void TestToString()
+               [Test]
+               public void ToStringTest()
                {
                        DataTable dt = new DataTable();
                        dt.Columns.Add("Col1",typeof(int));
index fbcbfe6024141f7a6b3034d5d5bb14d20f1ab201..2bf9623d43a268ed6809a52546c5647885abb12e 100644 (file)
@@ -1,28 +1,28 @@
 // ForeignKeyConstraintTest.cs - NUnit Test Cases for [explain here]
 //
-// Franklin Wise (gracenote@earthlink.net)
+// Authors:
+//   Franklin Wise (gracenote@earthlink.net)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
 // (C) Franklin Wise
+// (C) 2003 Martin Willemoes Hansen
 // 
 
-
 using NUnit.Framework;
 using System;
 using System.Data;
 
 namespace MonoTests.System.Data
 {
-
-       public class ForeignKeyConstraintTest : TestCase 
+       [TestFixture]
+       public class ForeignKeyConstraintTest
        {
                private DataSet _ds;
 
                //NOTE: fk constraints only work when the table is part of a DataSet
 
-               public ForeignKeyConstraintTest() : base ("MonoTests.System.Data.ForeignKeyConstraintTest") {}
-               public ForeignKeyConstraintTest(string name) : base(name) {}
-
-               protected override void SetUp() 
+               [SetUp]
+               public void GetReady() 
                {
                        _ds = new DataSet();
 
@@ -44,72 +44,65 @@ namespace MonoTests.System.Data
 
                }
 
-               protected override void TearDown() {}
-
-               public static ITest Suite 
-               {
-                       get 
-                       { 
-                               return new TestSuite(typeof(ForeignKeyConstraintTest)); 
-                       }
-               }
-
                // Tests ctor (string, DataColumn, DataColumn)
-               public void TestCtor1 ()
+               [Test]
+               public void Ctor1 ()
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#01", 0, Table.Constraints.Count);
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#02", 0, Table.Constraints.Count);
                        
                        // ctor (string, DataColumn, DataColumn
                        ForeignKeyConstraint Constraint = new ForeignKeyConstraint ("test", _ds.Tables [0].Columns [2], _ds.Tables [1].Columns [0]);
                        Table = _ds.Tables [1];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 1, Table.Constraints.Count);
-                       AssertEquals ("test#04", "test", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
+                       Assertion.AssertEquals ("test#03", 1, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#04", "test", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
 
                        Table = _ds.Tables [0];
-                       AssertEquals ("test#06", 1, Table.Constraints.Count);
-                       AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
+                       Assertion.AssertEquals ("test#06", 1, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
                }
                
                // Tests ctor (DataColumn, DataColumn)
-               public void TestCtor2 ()
+               [Test]
+               public void Ctor2 ()
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#01", 0, Table.Constraints.Count);
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#02", 0, Table.Constraints.Count);
                        
                        // ctor (string, DataColumn, DataColumn
                        ForeignKeyConstraint Constraint = new ForeignKeyConstraint (_ds.Tables [0].Columns [2], _ds.Tables [1].Columns [0]);
                        Table = _ds.Tables [1];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 1, Table.Constraints.Count);
-                       AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
+                       Assertion.AssertEquals ("test#03", 1, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
 
                        Table = _ds.Tables [0];
-                       AssertEquals ("test#06", 1, Table.Constraints.Count);
-                       AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
+                       Assertion.AssertEquals ("test#06", 1, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
                }
                
                // Test ctor (DataColumn [], DataColumn [])
-               public void TestCtor3 ()
+               [Test]
+               public void Ctor3 ()
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#01", 0, Table.Constraints.Count);
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#02", 0, Table.Constraints.Count);
                                                
                        DataColumn [] Cols1 = new DataColumn [2];
                        Cols1 [0] = _ds.Tables [0].Columns [1];
@@ -123,25 +116,26 @@ namespace MonoTests.System.Data
                        Table = _ds.Tables [1];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 1, Table.Constraints.Count);
-                       AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
+                       Assertion.AssertEquals ("test#03", 1, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
 
                        Table = _ds.Tables [0];
-                       AssertEquals ("test#06", 1, Table.Constraints.Count);
-                       AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
+                       Assertion.AssertEquals ("test#06", 1, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
 
                }
        
                // Tests ctor (string, DataColumn [], DataColumn [])    
-               public void TestCtor4 ()
+               [Test]
+               public void Ctor4 ()
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#01", 0, Table.Constraints.Count);
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#02", 0, Table.Constraints.Count);
                                                
                        DataColumn [] Cols1 = new DataColumn [2];
                        Cols1 [0] = _ds.Tables [0].Columns [1];
@@ -155,39 +149,41 @@ namespace MonoTests.System.Data
                        Table = _ds.Tables [1];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 1, Table.Constraints.Count);
-                       AssertEquals ("test#04", "Test", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
+                       Assertion.AssertEquals ("test#03", 1, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#04", "Test", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [0].GetType ());
 
                        Table = _ds.Tables [0];
-                       AssertEquals ("test#06", 1, Table.Constraints.Count);
-                       AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());                  
+                       Assertion.AssertEquals ("test#06", 1, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#07", "Constraint1", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#08", typeof (UniqueConstraint), Table.Constraints [0].GetType ());                        
                }
                
                //  If Childs and parents are in same table
-               public void TestKeyBetweenColumns ()
+               [Test]
+               public void KeyBetweenColumns ()
                {
                        DataTable Table =  _ds.Tables [0];
                        
-                       AssertEquals ("test#01", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#01", 0, Table.Constraints.Count);
                        Table =  _ds.Tables [1];
-                       AssertEquals ("test#02", 0, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#02", 0, Table.Constraints.Count);
                                                
                        
                        ForeignKeyConstraint Constraint = new ForeignKeyConstraint ("Test", _ds.Tables [0].Columns [0], _ds.Tables [0].Columns [2]);
                        Table = _ds.Tables [0];
                        Table.Constraints.Add (Constraint);
                        
-                       AssertEquals ("test#03", 2, Table.Constraints.Count);
-                       AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
-                       AssertEquals ("test#05", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
-                       AssertEquals ("test#04", "Test", Table.Constraints [1].ConstraintName);
-                       AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [1].GetType ());
+                       Assertion.AssertEquals ("test#03", 2, Table.Constraints.Count);
+                       Assertion.AssertEquals ("test#04", "Constraint1", Table.Constraints [0].ConstraintName);
+                       Assertion.AssertEquals ("test#05", typeof (UniqueConstraint), Table.Constraints [0].GetType ());
+                       Assertion.AssertEquals ("test#04", "Test", Table.Constraints [1].ConstraintName);
+                       Assertion.AssertEquals ("test#05", typeof (ForeignKeyConstraint), Table.Constraints [1].GetType ());
 
                }
 
-               public void TestCtorExceptions ()
+               [Test]
+               public void CtorExceptions ()
                {
                        ForeignKeyConstraint fkc;
 
@@ -202,7 +198,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("Failed to throw ArgumentNullException.");
                        }
                        catch (ArgumentNullException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
@@ -215,7 +211,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("B1: Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("A2: Wrong Exception type. " + exc.ToString());
@@ -228,7 +224,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("Failed to throw InvalidOperationException.");
                        }
                        catch (InvalidOperationException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("A3: Wrong Exception type. " + exc.ToString());
@@ -241,7 +237,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("Failed to throw InvalidOperationException.");
                        }
                        catch (InvalidOperationException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("A4: Wrong Exception type. " + exc.ToString());
@@ -253,14 +249,16 @@ namespace MonoTests.System.Data
                                 Assertion.Fail("Failed to throw InvalidOperationException.");                                         
                         }                                             
                         catch (InvalidConstraintException) {}         
-                        catch (AssertionFailedError exc) {throw exc;} 
+                        catch (AssertionException exc) {throw exc;} 
                         catch (Exception exc)                         
                         {                                             
                                 Assertion.Fail("A5: Wrong Exceptiontype. " + exc.ToString());
                         }                                             
 
                }
-               public void TestCtorExceptions2 () 
+
+               [Test]
+               public void CtorExceptions2 () 
                {
                        DataColumn col = new DataColumn("MyCol1",typeof(int));
 
@@ -273,7 +271,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("FTT1: Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("WET1: Wrong Exception type. " + exc.ToString());
@@ -293,7 +291,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("FTT2: Failed to throw InvalidConstraintException.");
                        }
                        catch (InvalidConstraintException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("WET2: Wrong Exception type. " + exc.ToString());
@@ -314,7 +312,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("FTT3: Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("WET3: Wrong Exception type. " + exc.ToString());
@@ -329,7 +327,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("FTT4: Failed to throw InvalidOperationException.");
                        }
                        catch (InvalidOperationException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch (Exception exc)
                        {
                                Assertion.Fail("WET4: Wrong Exception type. " + exc.ToString());
@@ -337,7 +335,8 @@ namespace MonoTests.System.Data
 
                }
 
-               public void TestEqualsAndHashCode()
+               [Test]
+               public void EqualsAndHashCode()
                {
                        DataTable tbl = _ds.Tables[0];
                        DataTable tbl2 = _ds.Tables[1];
@@ -361,10 +360,6 @@ namespace MonoTests.System.Data
 
                        Assertion.Assert( "Hash Code Failed. 1", fkc.GetHashCode() == fkc2.GetHashCode() );
                        Assertion.Assert( "Hash Code Failed. 2", fkc.GetHashCode() != fkcDiff.GetHashCode() );
-
-
-
-
        
                }
        }
index 2aa5a4ee31a29c8537145edf65e42503eb7cadec..977e2bb59b32bbaa61ccd620da0cbfa694f750e2 100644 (file)
@@ -1,8 +1,11 @@
 // UniqueConstraintTest.cs - NUnit Test Cases for testing the class System.Data.UniqueConstraint
 //
-// Franklin Wise <gracenote@earthlink.net>
+// Authors:
+//   Franklin Wise <gracenote@earthlink.net>
+//   Martin Willemoes Hansen <mwh@sysrq.dk>
 //
 // (C) 2002 Franklin Wise
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -11,15 +14,13 @@ using System.Data;
 
 namespace MonoTests.System.Data
 {
-       public class UniqueConstraintTest : TestCase 
+       [TestFixture]
+       public class UniqueConstraintTest
        {
                private DataTable _table;
 
-               public UniqueConstraintTest() : base ("MonoTests.System.Data.UniqueConstraintTest") {}
-               public UniqueConstraintTest(string name) : base(name) {}
-       
-               public void PublicSetup() {this.SetUp();}
-               protected override void SetUp() {
+               [SetUp]
+               public void GetReady() {
 
                        //Setup DataTable
                        _table = new DataTable("TestTable");
@@ -29,15 +30,8 @@ namespace MonoTests.System.Data
 
                }  
 
-               protected override void TearDown() {}
-
-               public static ITest Suite {
-                       get { 
-                               return new TestSuite(typeof(UniqueConstraintTest)); 
-                       }
-               }
-
-               public void TestCtorExceptions() {
+               [Test]
+               public void CtorExceptions() {
                        //UniqueConstraint(string name, DataColumn column, bool isPrimaryKey)
 
                        UniqueConstraint cst;
@@ -52,7 +46,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("Failed to throw ArgumentException.");
                        }
                        catch (ArgumentException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch {
                                Assertion.Fail("A1: Wrong Exception type.");
                        }       
@@ -63,7 +57,7 @@ namespace MonoTests.System.Data
                                cst = new UniqueConstraint((DataColumn)null);
                        }
                        catch (ArgumentNullException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch {
                                Assertion.Fail("A2: Wrong Exception type.");
                        }
@@ -78,7 +72,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("B1: Failed to throw InvalidConstraintException.");
                        }
                        catch (InvalidConstraintException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch {
                                Assertion.Fail("A3: Wrong Exception type.");
                        }
@@ -102,7 +96,7 @@ namespace MonoTests.System.Data
                                Assertion.Fail("B2: Failed to throw InvalidConstraintException");
                        }
                        catch (InvalidConstraintException) {}
-                       catch (AssertionFailedError exc) {throw exc;}
+                       catch (AssertionException exc) {throw exc;}
                        catch {
                                Assertion.Fail("A4: Wrong Exception type.");
                        }
@@ -111,8 +105,8 @@ namespace MonoTests.System.Data
                        
                }
 
-
-               public void TestCtor() {
+               [Test]
+               public void Ctor() {
                        
                        UniqueConstraint cst;
                
@@ -154,25 +148,26 @@ namespace MonoTests.System.Data
                
                }
 
-               public void TestUnique ()                             
+               [Test]
+               public void Unique ()                             
                {                                                     
                        UniqueConstraint U = new UniqueConstraint (_table.Columns [0]);
-                       AssertEquals ("test#01", false, _table.Columns [0].Unique); 
+                       Assertion.AssertEquals ("test#01", false, _table.Columns [0].Unique); 
                        
                         U = new UniqueConstraint (new DataColumn [] {_table.Columns [0],_table.Columns [1]});     
                        
-                        AssertEquals ("test#02", false, _table.Columns [0].Unique);
-                        AssertEquals ("test#03", false, _table.Columns [1].Unique);
-                        AssertEquals ("test#04", false, _table.Columns [2].Unique);
+                        Assertion.AssertEquals ("test#02", false, _table.Columns [0].Unique);
+                        Assertion.AssertEquals ("test#03", false, _table.Columns [1].Unique);
+                        Assertion.AssertEquals ("test#04", false, _table.Columns [2].Unique);
                        
                         _table.Constraints.Add (U);
-                        AssertEquals ("test#05", false, _table.Columns [0].Unique);
-                        AssertEquals ("test#06", false, _table.Columns [1].Unique);
-                        AssertEquals ("test#07", false, _table.Columns [2].Unique);
+                        Assertion.AssertEquals ("test#05", false, _table.Columns [0].Unique);
+                        Assertion.AssertEquals ("test#06", false, _table.Columns [1].Unique);
+                        Assertion.AssertEquals ("test#07", false, _table.Columns [2].Unique);
                 }                                                     
                
-
-               public void TestEqualsAndHashCode() {
+               [Test]
+               public void EqualsAndHashCode() {
                        UniqueConstraint cst = new UniqueConstraint( new DataColumn [] {
                                        _table.Columns[0], _table.Columns[1]});
                        UniqueConstraint cst2 = new UniqueConstraint( new DataColumn [] {
@@ -195,12 +190,6 @@ namespace MonoTests.System.Data
 
                        //false
                        Assertion.Assert("Hash Not Equals", (cst.GetHashCode() == cst3.GetHashCode()) == false);
-
-
                }
-
-
-       
-               
        }
 }
diff --git a/mcs/class/System.Data/Test/System.Xml/AllTests.cs b/mcs/class/System.Data/Test/System.Xml/AllTests.cs
deleted file mode 100644 (file)
index faa01ea..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-// Author:
-//   Ville Palo (vi64pa@koti.soon.fi)
-//
-// (C) Copyright 2002 Ville Palo
-//
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data.Xml
-{
-       public class AllTests : TestCase
-       {
-               public AllTests (string name) : base (name) {}
-
-               public static ITest Suite {
-                       get {
-                               TestSuite suite =  new TestSuite ();
-                               suite.AddTest (new TestSuite (typeof (XmlDataDocumentTest)));
-                               return suite;
-                       }
-               }
-       }
-}
index cddd2868d2636b595d927496f76d752603faafd8..d1003570b43f93d2c82fc0d475a2dd946eba775f 100755 (executable)
@@ -1,9 +1,12 @@
 //
 // XmlDataDocumentTestTest.cs - NUnit Test Cases for  XmlDataDocument
 //
-// Ville Palo (vi64pa@koti.soon.fi)
+// Authors:
+//   Ville Palo (vi64pa@koti.soon.fi)
+//   Martin Willemoes Hansen (mwh@sysrq.dk)
 //
-// (C) Ville Palo 2002
+// (C) 2002 Ville Palo
+// (C) 2003 Martin Willemoes Hansen
 // 
 
 using NUnit.Framework;
@@ -17,26 +20,18 @@ using System.Globalization;
 
 namespace MonoTests.System.Data.Xml
 {
-        public class XmlDataDocumentTest : TestCase {
+       [TestFixture]
+        public class XmlDataDocumentTest {
 
 
-                public XmlDataDocumentTest() : base ("System.Xml.XmlDataDocument") {}
-                public XmlDataDocumentTest(string name) : base(name) {}
-
-                protected override void TearDown() {}
-
-                protected override void SetUp() 
+               [SetUp]
+                public void GetReady() 
                 {
                        Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-US");
                 }
 
-                public static ITest Suite {
-                        get {
-                                return new TestSuite(typeof(XmlDataDocumentTest));
-                        }
-                }
-
-                public void TestCloneNode ()
+               [Test]
+                public void CloneNode ()
                 {
                        XmlDataDocument doc = new XmlDataDocument ();
                        
@@ -45,20 +40,21 @@ namespace MonoTests.System.Data.Xml
                 
                        XmlDataDocument doc2 = (XmlDataDocument)doc.CloneNode (false);
                        
-                       AssertEquals ("#I01", 0, doc2.ChildNodes.Count);
-                       AssertEquals ("#I02", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", doc2.DataSet.GetXmlSchema ().Substring (0, 39));
+                       Assertion.AssertEquals ("#I01", 0, doc2.ChildNodes.Count);
+                       Assertion.AssertEquals ("#I02", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", doc2.DataSet.GetXmlSchema ().Substring (0, 39));
                        
                        doc2 = (XmlDataDocument)doc.CloneNode (true);
                        
-                       AssertEquals ("#I03", 2, doc2.ChildNodes.Count);
-                       AssertEquals ("#I04", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", doc2.DataSet.GetXmlSchema ().Substring (0, 39));
+                       Assertion.AssertEquals ("#I03", 2, doc2.ChildNodes.Count);
+                       Assertion.AssertEquals ("#I04", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", doc2.DataSet.GetXmlSchema ().Substring (0, 39));
                        
                        doc.DataSet.Tables [0].Rows [0][0] = "64";
               
-                       AssertEquals ("#I05", "1", doc2.DataSet.Tables [0].Rows [0][0].ToString ());
+                       Assertion.AssertEquals ("#I05", "1", doc2.DataSet.Tables [0].Rows [0][0].ToString ());
                 }
 
-               public void TestEditingXmlTree ()
+               [Test]
+               public void EditingXmlTree ()
                {       
                        XmlDataDocument doc = new XmlDataDocument ();
                        doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
@@ -66,7 +62,7 @@ namespace MonoTests.System.Data.Xml
 
                        XmlElement Element = doc.GetElementFromRow (doc.DataSet.Tables [0].Rows [1]);
                        Element.FirstChild.InnerText = "64";
-                       AssertEquals ("test#01", "64", doc.DataSet.Tables [0].Rows [1] [0]);
+                       Assertion.AssertEquals ("test#01", "64", doc.DataSet.Tables [0].Rows [1] [0]);
                        
                        DataSet Set = new DataSet ();
                        Set.ReadXml ("System.Xml/region.xml");
@@ -76,42 +72,44 @@ namespace MonoTests.System.Data.Xml
                        
                        try {
                                Element.FirstChild.InnerText = "64";
-                               Fail ("test#02");
+                               Assertion.Fail ("test#02");
                        } catch (Exception e) {
-                               AssertEquals ("test#03", typeof (InvalidOperationException), e.GetType ());
-                               AssertEquals ("test#04", "Please set DataSet.EnforceConstraints == false before trying to edit XmlDataDocument using XML operations.", e.Message);
+                               Assertion.AssertEquals ("test#03", typeof (InvalidOperationException), e.GetType ());
+                               Assertion.AssertEquals ("test#04", "Please set DataSet.EnforceConstraints == false before trying to edit XmlDataDocument using XML operations.", e.Message);
                        }
                        
-                       AssertEquals ("test#05", "2", doc.DataSet.Tables [0].Rows [1] [0]);
+                       Assertion.AssertEquals ("test#05", "2", doc.DataSet.Tables [0].Rows [1] [0]);
                        
                        Set.EnforceConstraints = false;
                        Element.FirstChild.InnerText = "64";
-                       AssertEquals ("test#06", "64", doc.DataSet.Tables [0].Rows [1] [0]);                    
+                       Assertion.AssertEquals ("test#06", "64", doc.DataSet.Tables [0].Rows [1] [0]);                  
 
                }
                
-               public void TestEditingDataSet ()
+               [Test]
+               public void EditingDataSet ()
                {
                        XmlReader Reader = new XmlTextReader ("System.Xml/region.xml");
                        XmlDataDocument Doc = new XmlDataDocument ();
                        Doc.DataSet.ReadXml (Reader);
-                       AssertEquals ("test#01", "Interactive", Reader.ReadState.ToString ());
+                       Assertion.AssertEquals ("test#01", "Interactive", Reader.ReadState.ToString ());
 
                        DataSet Set = Doc.DataSet;
                        Set.Tables [0].Rows [1] [0] = "64";
-                       AssertEquals ("test#02", "64", Doc.FirstChild.FirstChild.NextSibling.FirstChild.InnerText);
+                       Assertion.AssertEquals ("test#02", "64", Doc.FirstChild.FirstChild.NextSibling.FirstChild.InnerText);
                }
                
-               public void TestCreateElement1 ()
+               [Test]
+               public void CreateElement1 ()
                {
                        XmlDataDocument doc = new XmlDataDocument ();
                        doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
                        doc.Load ("System.Xml/region.xml");
                        
                        XmlElement Element = doc.CreateElement ("prefix", "localname", "namespaceURI");                         
-                       AssertEquals ("test#01", "prefix", Element.Prefix);
-                       AssertEquals ("test#02", "localname", Element.LocalName);
-                       AssertEquals ("test#03", "namespaceURI", Element.NamespaceURI);
+                       Assertion.AssertEquals ("test#01", "prefix", Element.Prefix);
+                       Assertion.AssertEquals ("test#02", "localname", Element.LocalName);
+                       Assertion.AssertEquals ("test#03", "namespaceURI", Element.NamespaceURI);
                        doc.ImportNode (Element, false);
                        
                         TextWriter text = new StringWriter ();
@@ -123,19 +121,19 @@ namespace MonoTests.System.Data.Xml
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        //AssertEquals ("test#04", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
+                        //Assertion.AssertEquals ("test#04", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
                        
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("test#05", "<Root>", substring);
+                        Assertion.AssertEquals ("test#05", "<Root>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("test#06", "  <Region>", substring);
+                        Assertion.AssertEquals ("test#06", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("test#07", "    <RegionID>1</RegionID>", substring);
+                        Assertion.AssertEquals ("test#07", "    <RegionID>1</RegionID>", substring);
 
                        for (int i = 0; i < 26; i++) {
                                substring = TextString.Substring (0, TextString.IndexOf("\n"));
@@ -143,44 +141,47 @@ namespace MonoTests.System.Data.Xml
                        }
                        
                         substring = TextString.Substring (0, TextString.Length);                        
-                        AssertEquals ("test#07", "</Root>", substring);                        
+                        Assertion.AssertEquals ("test#07", "</Root>", substring);                      
                }
        
-               public void TestCreateElement2 ()
+               [Test]
+               public void CreateElement2 ()
                {
                        XmlDataDocument doc = new XmlDataDocument ();
                        doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
                        doc.Load ("System.Xml/region.xml");
                        
                        XmlElement Element = doc.CreateElement ("ElementName");                         
-                       AssertEquals ("test#01", "", Element.Prefix);
-                       AssertEquals ("test#02", "ElementName", Element.LocalName);
-                       AssertEquals ("test#03", "", Element.NamespaceURI);
+                       Assertion.AssertEquals ("test#01", "", Element.Prefix);
+                       Assertion.AssertEquals ("test#02", "ElementName", Element.LocalName);
+                       Assertion.AssertEquals ("test#03", "", Element.NamespaceURI);
                        
                        Element = doc.CreateElement ("prefix:ElementName");
-                       AssertEquals ("test#04", "prefix", Element.Prefix);
-                       AssertEquals ("test#05", "ElementName", Element.LocalName);
-                       AssertEquals ("test#06", "", Element.NamespaceURI);
+                       Assertion.AssertEquals ("test#04", "prefix", Element.Prefix);
+                       Assertion.AssertEquals ("test#05", "ElementName", Element.LocalName);
+                       Assertion.AssertEquals ("test#06", "", Element.NamespaceURI);
                }
 
-               public void TestCreateElement3 ()
+               [Test]
+               public void CreateElement3 ()
                {
                        XmlDataDocument doc = new XmlDataDocument ();
                        doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
                        doc.Load ("System.Xml/region.xml");
                        
                        XmlElement Element = doc.CreateElement ("ElementName", "namespace");                    
-                       AssertEquals ("test#01", "", Element.Prefix);
-                       AssertEquals ("test#02", "ElementName", Element.LocalName);
-                       AssertEquals ("test#03", "namespace", Element.NamespaceURI);
+                       Assertion.AssertEquals ("test#01", "", Element.Prefix);
+                       Assertion.AssertEquals ("test#02", "ElementName", Element.LocalName);
+                       Assertion.AssertEquals ("test#03", "namespace", Element.NamespaceURI);
                        
                        Element = doc.CreateElement ("prefix:ElementName", "namespace");
-                       AssertEquals ("test#04", "prefix", Element.Prefix);
-                       AssertEquals ("test#05", "ElementName", Element.LocalName);
-                       AssertEquals ("test#06", "namespace", Element.NamespaceURI);
+                       Assertion.AssertEquals ("test#04", "prefix", Element.Prefix);
+                       Assertion.AssertEquals ("test#05", "ElementName", Element.LocalName);
+                       Assertion.AssertEquals ("test#06", "namespace", Element.NamespaceURI);
                }
                
-               public void TestNavigator ()
+               [Test]
+               public void Navigator ()
                {       
                        XmlDataDocument doc = new XmlDataDocument ();
                        doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
@@ -191,25 +192,26 @@ namespace MonoTests.System.Data.Xml
                        Nav.MoveToRoot ();
                        Nav.MoveToFirstChild ();
 
-                       AssertEquals ("test#01", "Root", Nav.Name.ToString ());
-                       AssertEquals ("test#02", "", Nav.NamespaceURI.ToString ());
-                       AssertEquals ("test#03", "False", Nav.IsEmptyElement.ToString ());
-                       AssertEquals ("test#04", "Element", Nav.NodeType.ToString ());
-                       AssertEquals ("test#05", "", Nav.Prefix);
+                       Assertion.AssertEquals ("test#01", "Root", Nav.Name.ToString ());
+                       Assertion.AssertEquals ("test#02", "", Nav.NamespaceURI.ToString ());
+                       Assertion.AssertEquals ("test#03", "False", Nav.IsEmptyElement.ToString ());
+                       Assertion.AssertEquals ("test#04", "Element", Nav.NodeType.ToString ());
+                       Assertion.AssertEquals ("test#05", "", Nav.Prefix);
                        
                        Nav.MoveToFirstChild ();
                        Nav.MoveToNext ();
-                       AssertEquals ("test#06", "Region", Nav.Name.ToString ());
+                       Assertion.AssertEquals ("test#06", "Region", Nav.Name.ToString ());
                        
-                       AssertEquals ("test#07", "2Western", Nav.Value.Substring(0, Nav.Value.IndexOf ("\n") - 1));
+                       Assertion.AssertEquals ("test#07", "2Western", Nav.Value.Substring(0, Nav.Value.IndexOf ("\n") - 1));
                        Nav.MoveToFirstChild ();
-                       AssertEquals ("test#08", "2", Nav.Value);
+                       Assertion.AssertEquals ("test#08", "2", Nav.Value);
                        Nav.MoveToRoot ();
-                       AssertEquals ("test#09", "Root", Nav.NodeType.ToString ());
+                       Assertion.AssertEquals ("test#09", "Root", Nav.NodeType.ToString ());
                        
                }
 
                 // Test constructor
+               [Test]
                 public void Test1()
                 {
 
@@ -237,45 +239,46 @@ namespace MonoTests.System.Data.Xml
                         string TextString = text.ToString ();
                         string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
+                        Assertion.AssertEquals ("#A01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A02", "<!--sample XML fragment-->", substring);
+                        Assertion.AssertEquals ("#A02", "<!--sample XML fragment-->", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A03", "<bookstore>", substring);
+                        Assertion.AssertEquals ("#A03", "<bookstore>", substring);
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A04", "  <book genre=\"novel\" ISBN=\"10-861003-324\">", substring);
+                        Assertion.AssertEquals ("#A04", "  <book genre=\"novel\" ISBN=\"10-861003-324\">", substring);
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A05", "    <title>The Handmaid's Tale</title>", substring);
+                        Assertion.AssertEquals ("#A05", "    <title>The Handmaid's Tale</title>", substring);
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A06", "    <price>12.95</price>", substring);
+                        Assertion.AssertEquals ("#A06", "    <price>12.95</price>", substring);
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A07", "  </book>", substring);
+                        Assertion.AssertEquals ("#A07", "  </book>", substring);
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A08", "  <book genre=\"novel\" ISBN=\"1-861001-57-5\">", substring);
+                        Assertion.AssertEquals ("#A08", "  <book genre=\"novel\" ISBN=\"1-861001-57-5\">", substring);
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A09", "    <title>Pride And Prejudice</title>", substring);
+                        Assertion.AssertEquals ("#A09", "    <title>Pride And Prejudice</title>", substring);
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A10", "    <price>24.95</price>", substring);
+                        Assertion.AssertEquals ("#A10", "    <price>24.95</price>", substring);
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#A11", "  </book>", substring);
+                        Assertion.AssertEquals ("#A11", "  </book>", substring);
                         substring = TextString;
-                        AssertEquals ("#A12", "</bookstore>", substring);
+                        Assertion.AssertEquals ("#A12", "</bookstore>", substring);
                        
                 }
 
                 // Test public fields
+               [Test]
                 public void Test2()
                 {
                         DataSet RegionDS = new DataSet ();
@@ -300,121 +303,122 @@ namespace MonoTests.System.Data.Xml
                         string substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
                         
-                       //AssertEquals ("#B01", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
+                       //Assertion.AssertEquals ("#B01", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B02", "<Root>", substring);
+                        Assertion.AssertEquals ("#B02", "<Root>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B03", "  <Region>", substring);
+                        Assertion.AssertEquals ("#B03", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B04", "    <RegionID>1</RegionID>", substring);
+                        Assertion.AssertEquals ("#B04", "    <RegionID>1</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B05", "    <RegionDescription>Reeeeeaalllly Far East!</RegionDescription>", substring);
+                        Assertion.AssertEquals ("#B05", "    <RegionDescription>Reeeeeaalllly Far East!</RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B06", "  </Region>", substring);
+                        Assertion.AssertEquals ("#B06", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B07", "  <Region>", substring);
+                        Assertion.AssertEquals ("#B07", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B08", "    <RegionID>2</RegionID>", substring);
+                        Assertion.AssertEquals ("#B08", "    <RegionID>2</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B09", "    <RegionDescription>Western", substring);
+                        Assertion.AssertEquals ("#B09", "    <RegionDescription>Western", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B10", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#B10", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B11", "  </Region>", substring);
+                        Assertion.AssertEquals ("#B11", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B12", "  <Region>", substring);
+                        Assertion.AssertEquals ("#B12", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B13", "    <RegionID>3</RegionID>", substring);
+                        Assertion.AssertEquals ("#B13", "    <RegionID>3</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B14", "    <RegionDescription>Northern", substring);
+                        Assertion.AssertEquals ("#B14", "    <RegionDescription>Northern", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B15", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#B15", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B16", "  </Region>", substring);
+                        Assertion.AssertEquals ("#B16", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B17", "  <Region>", substring);
+                        Assertion.AssertEquals ("#B17", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B18", "    <RegionID>4</RegionID>", substring);
+                        Assertion.AssertEquals ("#B18", "    <RegionID>4</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B19", "    <RegionDescription>Southern", substring);
+                        Assertion.AssertEquals ("#B19", "    <RegionDescription>Southern", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B20", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#B20", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B21", "  </Region>", substring);
+                        Assertion.AssertEquals ("#B21", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B22", "  <MoreData>", substring);
+                        Assertion.AssertEquals ("#B22", "  <MoreData>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B23", "    <Column1>12</Column1>", substring);
+                        Assertion.AssertEquals ("#B23", "    <Column1>12</Column1>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B24", "    <Column2>Hi There</Column2>", substring);
+                        Assertion.AssertEquals ("#B24", "    <Column2>Hi There</Column2>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B25", "  </MoreData>", substring);
+                        Assertion.AssertEquals ("#B25", "  </MoreData>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B26", "  <MoreData>", substring);
+                        Assertion.AssertEquals ("#B26", "  <MoreData>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B27", "    <Column1>12</Column1>", substring);
+                        Assertion.AssertEquals ("#B27", "    <Column1>12</Column1>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B28", "    <Column2>Hi There</Column2>", substring);
+                        Assertion.AssertEquals ("#B28", "    <Column2>Hi There</Column2>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#B29", "  </MoreData>", substring);
+                        Assertion.AssertEquals ("#B29", "  </MoreData>", substring);
                 }
                 
+               [Test]
                 public void Test3()
                 {
                        XmlDataDocument DataDoc = new XmlDataDocument ();
@@ -431,78 +435,78 @@ namespace MonoTests.System.Data.Xml
                         string substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
 
-                        AssertEquals ("#C01", "<Root>", substring);
+                        Assertion.AssertEquals ("#C01", "<Root>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C02", "  <Region />", substring);
+                        Assertion.AssertEquals ("#C02", "  <Region />", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C03", "  <Region>", substring);
+                        Assertion.AssertEquals ("#C03", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C04", "    <RegionID>2</RegionID>", substring);
+                        Assertion.AssertEquals ("#C04", "    <RegionID>2</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n")- 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C05", "    <RegionDescription>Western", substring);
+                        Assertion.AssertEquals ("#C05", "    <RegionDescription>Western", substring);
                         
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C06", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#C06", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C07", "  </Region>", substring);
+                        Assertion.AssertEquals ("#C07", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C08", "  <Region>", substring);
+                        Assertion.AssertEquals ("#C08", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C09", "    <RegionID>3</RegionID>", substring);
+                        Assertion.AssertEquals ("#C09", "    <RegionID>3</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C10", "    <RegionDescription>Northern", substring);
+                        Assertion.AssertEquals ("#C10", "    <RegionDescription>Northern", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C11", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#C11", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C12", "  </Region>", substring);
+                        Assertion.AssertEquals ("#C12", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C13", "  <Region>", substring);
+                        Assertion.AssertEquals ("#C13", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C14", "    <RegionID>4</RegionID>", substring);
+                        Assertion.AssertEquals ("#C14", "    <RegionID>4</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C15", "    <RegionDescription>Southern", substring);
+                        Assertion.AssertEquals ("#C15", "    <RegionDescription>Southern", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C16", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#C16", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#C17", "  </Region>", substring);
+                        Assertion.AssertEquals ("#C17", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.Length);
-                        AssertEquals ("#C18", "</Root>", substring);
+                        Assertion.AssertEquals ("#C18", "</Root>", substring);
 
                 }
 
-                
+               [Test]
                public void Test4 ()
                {
                         DataSet RegionDS = new DataSet ();
@@ -524,145 +528,146 @@ namespace MonoTests.System.Data.Xml
                         string substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
 
-                        //AssertEquals ("#F01", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
+                        //Assertion.AssertEquals ("#F01", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F02", "<Root>", substring);
+                        Assertion.AssertEquals ("#F02", "<Root>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F03", "  <Region>", substring);
+                        Assertion.AssertEquals ("#F03", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F04", "    <RegionID>1</RegionID>", substring);
+                        Assertion.AssertEquals ("#F04", "    <RegionID>1</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F05", "    <RegionDescription>Eastern", substring);
+                        Assertion.AssertEquals ("#F05", "    <RegionDescription>Eastern", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F06", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#F06", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F07", "  </Region>", substring);
+                        Assertion.AssertEquals ("#F07", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F08", "  <Region>", substring);
+                        Assertion.AssertEquals ("#F08", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F09", "    <RegionID>2</RegionID>", substring);
+                        Assertion.AssertEquals ("#F09", "    <RegionID>2</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F10", "    <RegionDescription>Western", substring);
+                        Assertion.AssertEquals ("#F10", "    <RegionDescription>Western", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F11", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#F11", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F12", "  </Region>", substring);
+                        Assertion.AssertEquals ("#F12", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F13", "  <Region>", substring);
+                        Assertion.AssertEquals ("#F13", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F14", "    <RegionID>3</RegionID>", substring);
+                        Assertion.AssertEquals ("#F14", "    <RegionID>3</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F15", "    <RegionDescription>Northern", substring);
+                        Assertion.AssertEquals ("#F15", "    <RegionDescription>Northern", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F16", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#F16", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F17", "  </Region>", substring);
+                        Assertion.AssertEquals ("#F17", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F18", "  <Region>", substring);
+                        Assertion.AssertEquals ("#F18", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F19", "    <RegionID>4</RegionID>", substring);
+                        Assertion.AssertEquals ("#F19", "    <RegionID>4</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F20", "    <RegionDescription>Southern", substring);
+                        Assertion.AssertEquals ("#F20", "    <RegionDescription>Southern", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F21", "   </RegionDescription>", substring);
+                        Assertion.AssertEquals ("#F21", "   </RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F22", "  </Region>", substring);
+                        Assertion.AssertEquals ("#F22", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F23", "  <MoreData>", substring);
+                        Assertion.AssertEquals ("#F23", "  <MoreData>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F24", "    <Column1>12</Column1>", substring);
+                        Assertion.AssertEquals ("#F24", "    <Column1>12</Column1>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F25", "    <Column2>Hi There</Column2>", substring);
+                        Assertion.AssertEquals ("#F25", "    <Column2>Hi There</Column2>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F26", "  </MoreData>", substring);
+                        Assertion.AssertEquals ("#F26", "  </MoreData>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F27", "  <MoreData>", substring);
+                        Assertion.AssertEquals ("#F27", "  <MoreData>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F28", "    <Column1>12</Column1>", substring);
+                        Assertion.AssertEquals ("#F28", "    <Column1>12</Column1>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F29", "    <Column2>Hi There</Column2>", substring);
+                        Assertion.AssertEquals ("#F29", "    <Column2>Hi There</Column2>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F30", "  </MoreData>", substring);
+                        Assertion.AssertEquals ("#F30", "  </MoreData>", substring);
 
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F31", "  <Region>", substring);
+                        Assertion.AssertEquals ("#F31", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F32", "    <RegionID>new row</RegionID>", substring);
+                        Assertion.AssertEquals ("#F32", "    <RegionID>new row</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F33", "    <RegionDescription>new description</RegionDescription>", substring);
+                        Assertion.AssertEquals ("#F33", "    <RegionDescription>new description</RegionDescription>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#F34", "  </Region>", substring);
+                        Assertion.AssertEquals ("#F34", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.Length);
-                        AssertEquals ("#F35", "</Root>", substring);
+                        Assertion.AssertEquals ("#F35", "</Root>", substring);
                }
-               
+
+               [Test]          
                public void Test5 ()
                {
                         DataSet RegionDS = new DataSet ();
@@ -672,10 +677,10 @@ namespace MonoTests.System.Data.Xml
                         DataDoc.Load("System.Xml/region.xml" );
                        try {
                                DataDoc.DocumentElement.AppendChild (DataDoc.DocumentElement.FirstChild);
-                               Fail ("#G01");
+                               Assertion.Fail ("#G01");
                        } catch (Exception e) {
-                               AssertEquals ("#G02", typeof (InvalidOperationException), e.GetType ());
-                               AssertEquals ("#G03", "Please set DataSet.EnforceConstraints == false before trying to edit " +
+                               Assertion.AssertEquals ("#G02", typeof (InvalidOperationException), e.GetType ());
+                               Assertion.AssertEquals ("#G03", "Please set DataSet.EnforceConstraints == false before trying to edit " +
                                                      "XmlDataDocument using XML operations.", e.Message);
                                DataDoc.DataSet.EnforceConstraints = false;
                        }
@@ -699,25 +704,26 @@ namespace MonoTests.System.Data.Xml
                                substring = TextString.Substring (0, TextString.IndexOf("\n"));
                                TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
                        }
-                        AssertEquals ("#G04", "  <Region>", substring);
+                        Assertion.AssertEquals ("#G04", "  <Region>", substring);
                        
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#G05", "    <RegionID>64</RegionID>", substring);
+                        Assertion.AssertEquals ("#G05", "    <RegionID>64</RegionID>", substring);
                        
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#G06", "    <RegionDescription>test node</RegionDescription>", substring);
+                        Assertion.AssertEquals ("#G06", "    <RegionDescription>test node</RegionDescription>", substring);
                        
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#G07", "  </Region>", substring);
+                        Assertion.AssertEquals ("#G07", "  </Region>", substring);
                        
                         substring = TextString.Substring (0, TextString.Length);
-                        AssertEquals ("#G08", "</Root>", substring);
+                        Assertion.AssertEquals ("#G08", "</Root>", substring);
 
                }
                
+               [Test]
                public void Test6 ()
                {
                        DataSet RegionDS = new DataSet ();
@@ -734,9 +740,9 @@ namespace MonoTests.System.Data.Xml
                        XmlElement newChildNode2 = null;
                        try {
                                newChildNode2 = DataDoc.CreateElement ("something else");
-                               Fail ("#H01");
+                               Assertion.Fail ("#H01");
                        } catch (Exception e) {
-                               AssertEquals ("#H02", typeof (XmlException), e.GetType ());
+                               Assertion.AssertEquals ("#H02", typeof (XmlException), e.GetType ());
                                newChildNode2 = DataDoc.CreateElement ("something_else");
                        }
                        
@@ -759,23 +765,24 @@ namespace MonoTests.System.Data.Xml
                                TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
                        }
                         
-                       AssertEquals ("#H03", "  <Region>", substring);
+                       Assertion.AssertEquals ("#H03", "  <Region>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n"));
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#H04", "    <RegionID>64</RegionID>", substring);
+                        Assertion.AssertEquals ("#H04", "    <RegionID>64</RegionID>", substring);
 
                         substring = TextString.Substring (0, TextString.IndexOf("\n") );
                         TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
-                        AssertEquals ("#H05", "  </Region>", substring);
+                        Assertion.AssertEquals ("#H05", "  </Region>", substring);
 
                         substring = TextString.Substring (0, TextString.Length);
-                        AssertEquals ("#H06", "</Root>", substring);
+                        Assertion.AssertEquals ("#H06", "</Root>", substring);
                        
                        
                }
 
-                public void TestGetElementFromRow ()
+               [Test]
+                public void GetElementFromRow ()
                 {
                        XmlDataDocument doc = new XmlDataDocument ();
                        doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
@@ -783,19 +790,20 @@ namespace MonoTests.System.Data.Xml
                        DataTable table = doc.DataSet.Tables ["Region"];
                        
                        XmlElement element = doc.GetElementFromRow (table.Rows [2]);
-                       AssertEquals ("#D01", "Region", element.Name);
-                       AssertEquals ("#D02", "3", element ["RegionID"].InnerText);
+                       Assertion.AssertEquals ("#D01", "Region", element.Name);
+                       Assertion.AssertEquals ("#D02", "3", element ["RegionID"].InnerText);
                        
                        try {
                                element = doc.GetElementFromRow (table.Rows [4]);
-                               Fail ("#D03");
+                               Assertion.Fail ("#D03");
                        } catch (Exception e) {
-                               AssertEquals ("#D04", typeof (IndexOutOfRangeException), e.GetType ());
-                               AssertEquals ("#D05", "There is no row at position 4.", e.Message);
+                               Assertion.AssertEquals ("#D04", typeof (IndexOutOfRangeException), e.GetType ());
+                               Assertion.AssertEquals ("#D05", "There is no row at position 4.", e.Message);
                        }
                 }
                 
-                public void TestGetRowFromElement ()
+               [Test]
+                public void GetRowFromElement ()
                 {
                        XmlDataDocument doc = new XmlDataDocument ();
                        doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
@@ -804,10 +812,10 @@ namespace MonoTests.System.Data.Xml
 
                        DataRow row = doc.GetRowFromElement((XmlElement)root.FirstChild);
                        
-                       AssertEquals ("#E01", "1", row [0]);
+                       Assertion.AssertEquals ("#E01", "1", row [0]);
 
                        row = doc.GetRowFromElement((XmlElement)root.ChildNodes [2]);
-                       AssertEquals ("#E02", "3", row [0]);
+                       Assertion.AssertEquals ("#E02", "3", row [0]);
                        
                 }
         }
diff --git a/mcs/class/System.Data/Test/TheTests.cs b/mcs/class/System.Data/Test/TheTests.cs
deleted file mode 100644 (file)
index c69aedf..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-// Author: Tim Coleman (tim@timcoleman.com)
-// (C) Copyright 2002 Tim Coleman
-
-
-using NUnit.Framework;
-using System;
-using System.Data;
-using System.Threading;
-using System.Globalization;
-
-namespace MonoTests.System.Data
-{
-       public class RunDataColumnTest : DataColumnTest
-       {
-               protected override void RunTest ()
-               {
-                       throw new NotImplementedException ();
-               }
-       }
-}
-
-namespace MonoTests.System.Data.SqlTypes
-{
-       public class RunSqlInt32Test : SqlInt32Test
-       {
-               protected override void RunTest ()
-               {
-                       TestCreate ();
-
-                       // property tests
-
-                       TestIsNullProperty ();
-
-                       // method tests
-
-                       TestAdd ();
-                       TestBitwiseAnd ();
-                       TestBitwiseOr ();
-                       TestDivide ();
-                       TestEquals ();
-                       TestGreaterThan ();
-                       TestGreaterThanOrEqual ();
-                       TestLessThan ();
-                       TestLessThanOrEqual ();
-                       TestMod ();
-                       TestMultiply ();
-                       TestNotEquals ();
-                       TestOnesComplement ();
-                       TestSubtract ();
-                       TestConversionMethods ();
-                       TestXor ();
-               }
-       }
-}
-
-namespace MonoTests
-{
-       public class RunAllTests
-       {
-               public static void AddAllTests (TestSuite suite)
-               {
-                       suite.AddTest (new MonoTests.System.Data.RunDataColumnTest ());
-                       suite.AddTest (new MonoTests.System.Data.SqlTypes.RunSqlInt32Test ());
-               }
-       }
-}
-
-class MainApp
-{
-       public static void Main ()
-       {
-               TestResult result = new TestResult ();
-               TestSuite suite = new TestSuite ();
-               MonoTests.RunAllTests.AddAllTests (suite);
-               suite.Run (result);
-               MonoTests.MyTestRunner.Print (result);
-       }
-}
index bc6b12ba4aef0cf1e38c20f2435f075b17cab101..74e169b10eada3c20ecb3bdde6fbb7b7e502d3ea 100644 (file)
@@ -1,10 +1,3 @@
---target library
--o data_linux_test.dll
---noconfig
--r ../../lib/System.Data.dll
--r ../../lib/System.dll
--r ../../../nunit/NUnitCore_mono.dll
-System.Data.SqlTypes/AllTests.cs
 System.Data.SqlTypes/SqlBinaryTest.cs
 System.Data.SqlTypes/SqlBooleanTest.cs
 System.Data.SqlTypes/SqlByteTest.cs
@@ -18,9 +11,7 @@ System.Data.SqlTypes/SqlDateTimeTest.cs
 System.Data.SqlTypes/SqlGuidTest.cs
 System.Data.SqlTypes/SqlDecimalTest.cs
 System.Data.SqlTypes/SqlStringTest.cs
-System.Xml/AllTests.cs
 System.Xml/XmlDataDocumentTest.cs
-System.Data/AllTests.cs
 System.Data/DataColumnTest.cs
 System.Data/UniqueConstraintTest.cs
 System.Data/ConstraintTest.cs
@@ -31,5 +22,4 @@ System.Data/DataRowCollectionTest.cs
 System.Data/DataRowTest.cs
 System.Data/DataColumnCollectionTest.cs
 System.Data/DataSetTest.cs
-System.Data/DataRelationTest.cs
-AllTests.cs
+System.Data/DataRelationTest.cs
\ No newline at end of file
index c8783d8fe7af9e252c6b3b0391cebebe4cb3e65f..bc3d3b451a1f429d62eab2738565cbd07ea3d8b7 100644 (file)
@@ -4,26 +4,26 @@ LIBRARY = data_linux_test.dll
 
 LIB_LIST = data_linux_test.args
 LIB_FLAGS =    \
-       -r $(topdir)/class/lib/corlib.dll \
-       -r $(topdir)/class/lib/System.Data.dll \
-       -r $(topdir)/class/lib/System.Xml.dll \
-       -r $(topdir)/class/lib/System.dll \
-       -r $(topdir)/class/lib/NUnitCore_mono.dll
-
-SOURCES_INCLUDE=*.cs
+               -r $(topdir)/class/lib/corlib.dll \
+               -r $(topdir)/class/lib/System.Data.dll \
+               -r $(topdir)/class/lib/System.Xml.dll \
+               -r $(topdir)/class/lib/System.dll \
+               -r $(topdir)/nunit20/NUnit.Framework.dll
+
+ifdef SUBDIR
+USE_SOURCE_RULES=1
+SOURCES_INCLUDE=./$(SUBDIR)/*.cs
 SOURCES_EXCLUDE=_DUMMY_
+endif
 
 include $(topdir)/class/library.make
 
-MCS_FLAGS = --target library --noconfig
-
-TEST_SUITE_PREFIX = MonoTests.
-TEST_SUITE = AllTests
-NUNITCONSOLE=$(topdir)/class/lib/NUnitConsole_mono.exe 
+NUNITCONSOLE=$(topdir)/nunit20/nunit-console.exe
+MONO_PATH = $(topdir)/nunit20:.
 
 test: $(LIBRARY) run_test
 
 .PHONY: run_test
 
 run_test:
-       MONO_PATH=$(NUNIT_MONO_PATH) mono $(NUNITCONSOLE) $(TEST_SUITE_PREFIX)$(TEST_SUITE),data_linux_test.dll
+        -MONO_PATH=$(MONO_PATH) mono --debug $(NUNITCONSOLE) $(LIBRARY)