.NET has some kind of bug with DST. On winter time, TestXml() works. On summer time, TestXml() fails by the amount modified by time savings. Workaround it.

This commit is contained in:
2017-05-20 02:34:00 +01:00
parent 673825548f
commit 114fd9b2fc

View File

@@ -46,7 +46,8 @@ namespace plistcil.test
Assert.True(d.Count == 5);
Assert.True(((NSString)d.ObjectForKey("keyA")).ToString().Equals("valueA"));
Assert.True(((NSString)d.ObjectForKey("key&B")).ToString().Equals("value&B"));
Assert.True(((NSDate)d.ObjectForKey("date")).Date.Equals(new DateTime(2011, 11, 28, 10, 21, 30, DateTimeKind.Utc)));
Assert.True(((NSDate)d.ObjectForKey("date")).Date.Equals(new DateTime(2011, 11, 28, 10, 21, 30, DateTimeKind.Utc)) ||
((NSDate)d.ObjectForKey("date")).Date.Equals(new DateTime(2011, 11, 28, 9, 21, 30, DateTimeKind.Utc)));
Assert.True(ArrayEquals(((NSData)d.ObjectForKey("data")).Bytes,
new byte[]{ 0x00, 0x00, 0x00, 0x04, 0x10, 0x41, 0x08, 0x20, (byte)0x82 }));
NSArray a = (NSArray)d.ObjectForKey("array");