Пример #1
0
        public void ToPrettyString_Null_ShouldReturn_EmptyString()
        {
            TestEntry entry  = null;
            var       result = entry.ToPrettyString();

            result.Should().NotBeNull();
            result.Should().BeEmpty();
        }
Пример #2
0
        public void ToPrettyString_EntryWithNull_ShouldReturn_FormattedString()
        {
            var entry = new TestEntry {
                Id = 3, Value = null
            };
            var          result   = entry.ToPrettyString();
            const string expected = "Id = 3 | Value = (null)";

            result.Should().NotBeNull();
            result.Should().Be(expected);
        }
Пример #3
0
        public void ToPrettyString_Entry_ShouldReturn_FormattedString()
        {
            var entry = new TestEntry {
                Id = 1, Value = "One"
            };

            var          result   = entry.ToPrettyString();
            const string expected = "Id = 1 | Value = One";

            result.Should().NotBeNull();
            result.Should().Be(expected);
        }