Ejemplo n.º 1
0
 // Analysis disable once InconsistentNaming
 public void dumping_class_with_object_based_collections_produces_valid_json()
 {
     using (var lc = new LogConfigurator(FixtureName))
     {
         var a = AllObjectCollectionsSequenceGenerator.Sequence().GetEnumerator().Current;
         Assert.That(ValidateJson(AllObjectCollectionsDumper.Dump(a)), Is.True);
     }
 }
 // Analysis disable once InconsistentNaming
 public void DumpingClassWithObjectBasedCollectionsProducesValidJson()
 {
     using (var lc = new LogConfigurator(FixtureName))
     {
         var a = AllObjectCollectionsSequenceGenerator.Sequence().GetEnumerator().Current;
         Assert.That(ValidateJson(AllObjectCollectionsDumper.Dump(a)), Is.True);
     }
 }
Ejemplo n.º 3
0
        // Analysis disable once InconsistentNaming
        public void dumping_null_objects_produces_valid_json()
        {
            using (var lc = new LogConfigurator(FixtureName))
            {
                NoProperties a = null;
                Assert.That(ValidateJson(NoPropertiesDumper.Dump(a)), Is.True);

                var b = new ComplexBuiltins()
                {
                    StringProperty = "test"
                };
                Assert.That(ValidateJson(ComplexBuiltinsDumper.Dump(b)), Is.True);

                var c = new ComplexBuiltins()
                {
                    ObjectProperty = "test"
                };
                Assert.That(ValidateJson(ComplexBuiltinsDumper.Dump(c)), Is.True);

                AllObjectCollections d = null;
                Assert.That(ValidateJson(AllObjectCollectionsDumper.Dump(d)), Is.True);
            }
        }