void TestAppendXmlDateTimeRoundTripUndefined(DateTime input) { StringBuilder sb = new StringBuilder(); StringBuilderExt.AppendXmlDateTimeRoundTrip(sb, input); Assert.Equal(System.Xml.XmlConvert.ToString(input, System.Xml.XmlDateTimeSerializationMode.Utc), sb.ToString()); }
void TestAppendXmlDateTimeRoundTripLocal(DateTime input) { input = new DateTime(input.Ticks, DateTimeKind.Local); StringBuilder sb = new StringBuilder(); StringBuilderExt.AppendXmlDateTimeRoundTrip(sb, input); Assert.Equal(System.Xml.XmlConvert.ToString(input, System.Xml.XmlDateTimeSerializationMode.Utc), sb.ToString()); }