Esempio n. 1
0
 public void AdaptedJsonSerializer_Set_Deserialization_Properties_Of_Reader_To_Serializer()
 {
     using (var writer = new JsonTextReader(TextReader.Null)
     {
         Culture = new CultureInfo("en-GB"),
         DateFormatString = "yyyy/MM/dd HH.mm.ss",
         DateTimeZoneHandling = DateTimeZoneHandling.Unspecified,
         DateParseHandling = DateParseHandling.DateTimeOffset,
         FloatParseHandling = FloatParseHandling.Decimal,
         MaxDepth = 100,
         CloseInput = true
     })
     {
         var serializer = writer.AdaptedJsonSerializer();
         Assert.True(serializer.Culture.Equals(new CultureInfo("en-GB")));
         Assert.True(serializer.DateTimeZoneHandling.Equals(DateTimeZoneHandling.Unspecified));
         Assert.True(serializer.DateParseHandling.Equals(DateParseHandling.DateTimeOffset));
         Assert.True(serializer.FloatParseHandling.Equals(FloatParseHandling.Decimal));
         Assert.True(serializer.MaxDepth.Equals(100));
         Assert.True(serializer.DateFormatString.Equals("yyyy/MM/dd HH.mm.ss"));
     }
 }