2005-01-19 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.Data / Test / System.Data / ConstraintCollectionTest.cs
index 23c282b3a17f1cdf6be4774594cb54b12a8dae14..f24eb061eced2e642e94e067639bff4f72febcaf 100644 (file)
@@ -8,8 +8,29 @@
 //
 // (C) Franklin Wise
 // (C) 2003 Martin Willemoes Hansen
-// (C) Novell,Inc      
+
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
 // 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 
 using NUnit.Framework;
@@ -347,6 +368,9 @@ namespace MonoTests.System.Data
                }
                
                [Test]
+               [Category ("NotDotNet")]
+               // Even after EndInit(), MS.NET does not fill Table property
+               // on UniqueConstraint.
                public void TestAddRange2()
                 {
                         DataTable table = new DataTable ("Table");
@@ -379,15 +403,11 @@ namespace MonoTests.System.Data
 
                        // After EndInit is called the constraints associated with most recent call to AddRange() must be
                        // added to the ConstraintCollection
-                        Assertion.AssertNull ("#A03", constraints [2].Table);
-//                        Assertion.Assert ("#A03", constraints [2].Table.ToString().Equals ("Table"));
+                        Assertion.Assert ("#A03", constraints [2].Table.ToString().Equals ("Table"));
                         Assertion.Assert ("#A04", table.Constraints.Contains ("Unique1"));
                         Assertion.Assert ("#A05", table.Constraints.Contains ("Unique2"));
-#if NET_1_1 // really?
-                        Assertion.Assert ("#A06", !table.Constraints.Contains ("Unique3"));
-#else
                         Assertion.Assert ("#A06", table.Constraints.Contains ("Unique3"));
-#endif
+
                 }