public void MetadataDateTime_ToString_ProducesCorrectResult() { var dateTimeOffsetNow = DateTimeOffset.Now; var metadataDateTime = new MetadataDateTime(dateTimeOffsetNow, Date); var expectedToStringResult = dateTimeOffsetNow.ToString() + " {" + metadataDateTime.Flags.ToString() + "}"; var actualToStringResult = metadataDateTime.ToString(); Assert.Equal(expectedToStringResult, actualToStringResult); }
public void MetadataDateTime_ToStringWithFormatPovider_ProducesCorrectResult() { var formatProvider = CultureInfo.GetCultureInfo("de-DE"); var dateTimeOffsetNow = DateTimeOffset.Now; var metadataDateTime = new MetadataDateTime(dateTimeOffsetNow, Date); var expectedToStringResult = dateTimeOffsetNow.ToString(formatProvider) + " {" + metadataDateTime.Flags.ToString() + "}"; var actualToStringResult = metadataDateTime.ToString(formatProvider); Assert.Equal(expectedToStringResult, actualToStringResult); }