Exemplo n.º 1
0
        private static void AssertExceptionMessage(ComparisonContext context, string expectedMessage)
        {
            expectedMessage = expectedMessage.Trim().Replace("\r\n", "\n");

            var messageBuilder = new DeepEqualExceptionMessageBuilder(context);

            var message = messageBuilder.GetMessage().Replace("\r\n", "\n");

            Assert.Equal(expectedMessage, message);
        }
Exemplo n.º 2
0
        private static void AssertExceptionMessage(
            IComparisonContext context,
            string expectedMessage,
            Dictionary <Type, IDifferenceFormatter> customFormatters = null)
        {
            expectedMessage = expectedMessage.Trim().Replace("\r\n", "\n");

            var messageBuilder = new DeepEqualExceptionMessageBuilder(context, new DifferenceFormatterFactory(customFormatters));

            var message = messageBuilder.GetMessage().Replace("\r\n", "\n");

            Assert.Equal(expectedMessage, message);
        }