示例#1
0
        public void DumpObjectWithValueType2Text()
        {
            var valueTest = new ObjectWithValueTypeTest();
            var dumper = new Dumper();

            var dumpText = dumper.Dump(valueTest).ToText();

            Trace.WriteLine(dumpText);

            var expected = "DumpObjectTests.Dump2TextExtension.ObjectWithValueTypeTest" + Environment.NewLine +
                           "	 - PublicProperty : publicProp" + Environment.NewLine +
                           "	 - PublicProperty2 : <null>";

            Assert.AreEqual(expected, dumpText);
        }
示例#2
0
        public void DumpObjectWithValueTypeFirstLevel2Text()
        {
            var valueTest = new ObjectWithValueTypeTest();
            var dumper = new Dumper{MaxDumpLevel = 1};

            var dumpText = dumper.Dump(valueTest).ToText();

            Trace.WriteLine(dumpText);

            var expected = "DumpObjectTests.Dump2TextExtension.ObjectWithValueTypeTest" + Environment.NewLine +
                           "	 - PublicProperty : ..." + Environment.NewLine +
                           "	 - PublicProperty2 : ...";

            Assert.AreEqual(expected, dumpText);
        }
示例#3
0
 public ObjectWithObjectTest()
 {
     PublicProperty = "publicProp";
     Instance = new ObjectWithValueTypeTest();
 }