+#if NET_2_0
+
using System;
using System.Data;
+using System.Data.Common;
+using System.Globalization;
+using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters;
using System.Runtime.Serialization.Formatters.Binary;
-using System.IO;
-using System.Data.Common;
+using System.Threading;
+
using NUnit.Framework;
+namespace MonoTests.System.Data
+{
[TestFixture]
public class BinarySerializationTest
{
-#if NET_2_0
+ private CultureInfo originalCulture;
+
+ [SetUp]
+ public void SetUp ()
+ {
+ originalCulture = Thread.CurrentThread.CurrentCulture;
+ Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-US");
+ }
+
+ [TearDown]
+ public void TearDown ()
+ {
+ Thread.CurrentThread.CurrentCulture = originalCulture;
+ }
+
[Test]
public void RemotingFormatDataTableTest ()
{
dt.Rows[1].RejectChanges();
}
[Test]
-#if TARGET_JVM
- [Ignore ("Net Binary formatting is not supported for DataSet")]
-#endif
public void DataTableSerializationTest2 ()
{
//Serialize Table
}
[Test]
-#if TARGET_JVM
- [Ignore ("Net Binary formatting is not supported for DataSet")]
-#endif
public void Test_With_Null_Values2 ()
{
//Serialize Table
}
[Test]
-#if TARGET_JVM
- [Ignore ("Net Binary formatting is not supported for DataSet")]
-#endif
public void DataSetSerializationTest2 ()
{
DataSet ds = new DataSet ();
Assert.AreEqual (ds.Relations [i].RelationName, ds.Relations [i].RelationName, "#9 Relation : {0} differs", ds.Relations [i]);
}
[Test]
-#if TARGET_JVM
- [Ignore ("Net Binary formatting is not supported for DataSet")]
-#endif
public void Constraint_Relations_Test2 ()
{
//Serialize DataSet
for (int i = 0; i < ds.Relations.Count; i++)
Assert.AreEqual (ds.Relations [i].RelationName, ds.Relations [i].RelationName, "#9 Relation : {0} differs", ds.Relations [i]);
}
+}
+
#endif
}