public void Dump_OutputsCorrectString_BasicProps()
        {
            var test = new DumpTest
            {
                IntProp      = 99,
                StringProp   = "foo bar",
                DateTimeProp = DateTime.Today
            };

            var expected = $"\tStringProp:\t{test.StringProp}\r\n\tIntProp:\t{test.IntProp}\r\n\tDateTimeProp:\t{test.DateTimeProp}\r\n";

            test.Dump().Should().Be(expected.Replace("\r\n", Environment.NewLine));
        }
        public void Dump_OutputsCorrectString_BasicProps()
        {
            var test = new DumpTest
            {
                IntProp      = 99,
                StringProp   = "foo bar",
                DateTimeProp = DateTime.Today
            };

            var expected = $"StringProp: {test.StringProp}\r\nIntProp: {test.IntProp}\r\nDateTimeProp: {test.DateTimeProp}";

            test.Dump().Should().Be(expected);
        }
Ejemplo n.º 3
0
        public void Dump_OutputsCorrectString_BasicProps()
        {
            var test = new DumpTest
            {
                IntProp      = 99,
                StringProp   = "foo bar",
                DateTimeProp = DateTime.Today
            };

#if NETFRAMEWORK
            var expected = $"\tStringProp:\t{test.StringProp}\r\n\tIntProp:\t{test.IntProp}\r\n\tDateTimeProp:\t{test.DateTimeProp}\r\n";
#else
            var expected = $"\tStringProp:\t{test.StringProp}\r\n\tIntProp:\t{test.IntProp}\r\n\tDateTimeProp:\t{test.DateTimeProp}\r\n\tUnreadable:\t180\r\n";
#endif
            test.Dump().Should().Be(expected);
        }