Пример #1
0
        public void IgnoredLongPropertiesLongShouldLongNotLongBeLongSerialized()
        {
            var json = new JsonNetAuditSerializer(new AuditingConfiguration {
                IgnoredTypes = { typeof(Exception) }
            })
                       .Serialize(new AuditingHelperTestPersonDto
            {
                FullName = "John Doe",
                Age      = 18,
                School   = new AuditingHelperTestSchoolDto
                {
                    Name    = "Crosswell Secondary",
                    Address = "Broadway Ave, West Bend"
                },
                Exception = new Exception("this should be ignored!")
            });

            json.ShouldBe("{\"fullName\":\"John Doe\",\"school\":{\"name\":\"Crosswell Secondary\"}}");
        }
Пример #2
0
 public JsonNetAuditSerializer_Test()
 {
     _jsonNetAuditSerializer = GetRequiredService <JsonNetAuditSerializer>();
 }