}
[Test]
- [Category ("NotDotNet")]
+ [Category ("MobileNotWorking")]
+ [ExpectedException (typeof (InvalidOperationException))]
public void DeserializeArrayReferences ()
{
string s = "<Sample xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">";
ListDefaults d2 = (ListDefaults) Deserialize (typeof (ListDefaults), "<root/>");
Assert.IsNotNull (d2.list2, "#A1");
- Assert.IsNull (d2.list3, "#A2");
Assert.IsNull (d2.list4, "#A3");
Assert.IsNotNull (d2.list5, "#A4");
Assert.IsNotNull (d2.ed, "#A5");
d2 = (ListDefaults) Deserialize (typeof (ListDefaults), "<root></root>");
Assert.IsNotNull (d2.list2, "#B1");
- Assert.IsNull (d2.list3, "#B2");
Assert.IsNull (d2.list4, "#B3");
Assert.IsNotNull (d2.list5, "#B4");
Assert.IsNotNull (d2.ed, "#B5");
}
[Test]
- [ExpectedException (typeof (InvalidOperationException))]
+ [Category ("MobileNotWorking")]
public void TestDeserializeObjectWithReadonlyNulCollection ()
{
string s3 = "";
s3 += " </Collection1>";
s3 += "</Container>";
- Deserialize (typeof (ObjectWithReadonlyNulCollection), s3);
+ var obj = (ObjectWithReadonlyNulCollection) Deserialize (typeof (ObjectWithReadonlyNulCollection), s3);
+ Assert.IsNull (obj.Collection1);
}
[Test]
}
[Test]
- [Category ("NotDotNet")] // MS.NET results in compilation error (probably it generates bogus source.)
+ [Category ("NotWorking")] // MS.NET results in compilation error (probably it generates bogus source.)
public void TestDeserialize_Field_Encoded ()
{
Field_Encoded f = null;
}
[Test]
+ [Category ("MobileNotWorking")]
public void NotExactDateParse ()
{
XmlSerializer xs = new XmlSerializer (typeof (NotExactDateParseClass));
NotExactDateParseClass o = (NotExactDateParseClass) xs.Deserialize (new StringReader ("<NotExactDateParseClass xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><SomeDate xsi:type=\"xsd:date\">2012-02-05-09:00</SomeDate></NotExactDateParseClass>"));
- Assert.AreEqual (new DateTime (2012,2,5), o.SomeDate);
+ Assert.AreEqual (new DateTime (2012,2,5,9,0,0,DateTimeKind.Utc), o.SomeDate.ToUniversalTime ());
}