}
// test constructors
-#if USE_VERSION_1_1 // It doesn't pass on MS.NET 1.1.
[Test]
+ [ExpectedException (typeof (ArgumentNullException))]
public void TestConstructor()
{
XmlSerializer ser = new XmlSerializer (null, "");
}
-#else
-#endif
// test basic types ////////////////////////////////////////////////////////
[Test]
Assert.AreEqual (Infoset (res), WriterText);
}
+ [Test] // Covers #36829
+ public void TestSubclassElementList ()
+ {
+ var o = new SubclassTestList () { Items = new List<object> () { new SubclassTestSub () } };
+ Serialize (o);
+
+ string res = "<SubclassTestList xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>";
+ res += "<b xsi:type=\"SubclassTestSub\"/></SubclassTestList>";
+ Assert.AreEqual (Infoset (res), WriterText);
+ }
+
[Test]
[ExpectedException (typeof (InvalidOperationException))]
public void TestArrayAttributeWithWrongDataType ()
Assert.AreEqual ("<:ErrorneousGetSchema></>", Infoset (sw.ToString ()));
}
+ [Test]
public void DateTimeRoundtrip ()
{
// bug #337729