Skip to content

Commit 1ebe99c

Browse files
committed
Surrounded expected and actual values in quotes.
1 parent 4f29c72 commit 1ebe99c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

TestStack.FluentMVCTesting.Tests/ControllerResultTestTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ public void Check_for_content_result_and_check_invalid_content()
796796

797797
var exception = Assert.Throws<ActionResultAssertionException>(() => _controller.WithCallTo(c => c.Content()).ShouldReturnContent(content));
798798

799-
Assert.That(exception.Message, Is.EqualTo(string.Format("Expected content to be {0}, but instead was {1}.", content, ControllerResultTestController.TextualContent)));
799+
Assert.That(exception.Message, Is.EqualTo(string.Format("Expected content to be \"{0}\", but instead was \"{1}\".", content, ControllerResultTestController.TextualContent)));
800800
}
801801

802802
[Test]
@@ -812,7 +812,7 @@ public void Check_for_content_result_and_check_content_and_check_invalid_content
812812

813813
var exception = Assert.Throws<ActionResultAssertionException>(() => _controller.WithCallTo(c => c.Content()).ShouldReturnContent(ControllerResultTestController.TextualContent, contentType));
814814

815-
Assert.That(exception.Message, Is.EqualTo(string.Format("Expected content type to be {0}, but instead was {1}.", contentType, ControllerResultTestController.ContentType)));
815+
Assert.That(exception.Message, Is.EqualTo(string.Format("Expected content type to be \"{0}\", but instead was \"{1}\".", contentType, ControllerResultTestController.ContentType)));
816816
}
817817

818818
[Test]

TestStack.FluentMvcTesting/ControllerResultTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,20 +407,20 @@ public ContentResult ShouldReturnContent(string content = null, string contentTy
407407
if (contentType != null && contentType != contentResult.ContentType)
408408
{
409409
throw new ActionResultAssertionException(string.Format(
410-
"Expected content type to be {0}, but instead was {1}.",
410+
"Expected content type to be \"{0}\", but instead was \"{1}\".",
411411
contentType,
412412
contentResult.ContentType));
413413
}
414414

415415
if (content != null && content != contentResult.Content)
416416
{
417417
throw new ActionResultAssertionException(string.Format(
418-
"Expected content to be {0}, but instead was {1}.",
418+
"Expected content to be \"{0}\", but instead was \"{1}\".",
419419
content,
420420
contentResult.Content));
421421
}
422422

423-
if (encoding != null && encoding != contentResult.ContentEncoding)
423+
if (encoding != null && encoding != contentResult.ContentEncoding)
424424
{
425425
throw new ActionResultAssertionException(string.Format(
426426
"Expected encoding to be equal to {0}, but instead was {1}.",

0 commit comments

Comments
 (0)