public void WithGeneralIsoZonedDateTimeSerializer_Deserialize() { var clock = FakeClock.FromUtc(2014, 05, 02, 10, 30, 45); var now = clock.Now.InZone(DateTimeZoneProviders.Tzdb.GetSystemDefault()); var serialisers = new DefaultNodaSerializerSettings(DateTimeZoneProviders.Tzdb) .WithGeneralIsoZonedDateTimeSerializer(); var expected = now; var actual = serialisers.ZonedDateTimeSerializer.Deserialize(now.ToString()); Assert.Equal(expected, actual); }
public void PeriodSerializer_Default_Verify() { var serializerSettings = new DefaultNodaSerializerSettings(DateTimeZoneProviders.Tzdb); Assert.Same(NodaSerializerDefinitions.RoundtripPeriodSerializer, serializerSettings.PeriodSerializer); }
public void OffsetDateTimeSerializer_Default_Verify() { var serializerSettings = new DefaultNodaSerializerSettings(DateTimeZoneProviders.Tzdb); Assert.Same(NodaSerializerDefinitions.OffsetDateTimeSerializer, serializerSettings.OffsetDateTimeSerializer); }
public void IntervalSerializer_Default_Verify() { var serializerSettings = new DefaultNodaSerializerSettings(DateTimeZoneProviders.Tzdb); Assert.Same(NodaSerializerDefinitions.ComplexIntervalSerializer, serializerSettings.IntervalSerializer); }