Esempio n. 1
0
        public void ToString_Should_ReturnSingleMessage_When_SingleErrorMessage()
        {
            var listReport = new ListReport
            {
                "Test1"
            };

            var expected = $"Test1{Environment.NewLine}";

            Assert.Equal(expected, listReport.ToString());
        }
Esempio n. 2
0
        public void ToString_Should_CombineAllMessages_When_ErrorMessages()
        {
            var listReport = new ListReport
            {
                "Test1",
                "Test2",
                "Test3"
            };

            var expected = $"Test1{Environment.NewLine}Test2{Environment.NewLine}Test3{Environment.NewLine}";

            Assert.Equal(expected, listReport.ToString());
        }
Esempio n. 3
0
        public void ToString_Should_ReturnEmptyString_When_NoErrorMessages()
        {
            var listReport = new ListReport();

            Assert.Equal(string.Empty, listReport.ToString());
        }