diff --git a/TestStack.FluentMVCTesting.Tests/ControllerExtensionsTests.cs b/TestStack.FluentMVCTesting.Tests/ControllerExtensionsTests.cs index 6c0d07d..a7b41a6 100644 --- a/TestStack.FluentMVCTesting.Tests/ControllerExtensionsTests.cs +++ b/TestStack.FluentMVCTesting.Tests/ControllerExtensionsTests.cs @@ -61,7 +61,7 @@ public void Check_for_unexpected_non_existent_temp_data_property() _controller.ShouldHaveTempDataProperty(key)); Assert.That(exception.Message, Is.EqualTo(string.Format( - "Expected TempData to have a non-null value with key \"{0}\", but none found.", key))); + "Expected TempData to have a non-null value with key '{0}', but none found.", key))); } [Test] @@ -85,7 +85,7 @@ public void Check_for_existent_temp_data_property_and_check_invalid_value() var exception = Assert.Throws(() => _controller.ShouldHaveTempDataProperty(key, expectedValue)); - Assert.That(exception.Message, Is.EqualTo(string.Format("Expected value for key \"{0}\" to be \"{1}\", but instead found \"{2}\"", key, expectedValue, actualValue))); + Assert.That(exception.Message, Is.EqualTo(string.Format("Expected value for key '{0}' to be '{1}', but instead found '{2}'", key, expectedValue, actualValue))); } [Test] @@ -144,7 +144,7 @@ public void Check_for_unexpected_non_existent_temp_data_property_when_supplied_w _controller.ShouldHaveTempDataProperty(key, x => x == 0)); Assert.That(exception.Message, Is.EqualTo(string.Format( - "Expected TempData to have a non-null value with key \"{0}\", but none found.", key))); + "Expected TempData to have a non-null value with key '{0}', but none found.", key))); } [Test] @@ -164,7 +164,7 @@ public void Check_for_unexpected_existent_temp_data_property() _controller.ShouldNotHaveTempDataProperty(Key)); Assert.That(exception.Message, Is.EqualTo(string.Format( - "Expected TempData to have no value with key \"{0}\", but found one.", Key))); + "Expected TempData to have no value with key '{0}', but found one.", Key))); } } } diff --git a/TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldRenderFileTests.cs b/TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldRenderFileTests.cs index 3034cd9..2872519 100644 --- a/TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldRenderFileTests.cs +++ b/TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldRenderFileTests.cs @@ -104,7 +104,7 @@ public void Check_for_file_content_result_and_check_invalid_textual_contents() var exception = Assert.Throws(() => _controller.WithCallTo(c => c.TextualFile()).ShouldRenderFileContents(contents)); - Assert.That(exception.Message, Is.EqualTo(string.Format("Expected file contents to be \"{0}\", but instead was \"{1}\".", contents, ControllerResultTestController.TextualFileContent))); + Assert.That(exception.Message, Is.EqualTo(string.Format("Expected file contents to be '{0}', but instead was '{1}'.", contents, ControllerResultTestController.TextualFileContent))); } [Test] @@ -309,7 +309,7 @@ public void Check_for_file_stream_result_and_check_invalid_textual_content() var exception = Assert.Throws(() => _controller.WithCallTo(c => c.TextualStream()).ShouldRenderFileStream(contents)); - Assert.That(exception.Message, Is.EqualTo(string.Format("Expected file contents to be \"{0}\", but instead was \"{1}\".", contents, ControllerResultTestController.TextualFileContent))); + Assert.That(exception.Message, Is.EqualTo(string.Format("Expected file contents to be '{0}', but instead was '{1}'.", contents, ControllerResultTestController.TextualFileContent))); } [Test] diff --git a/TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldReturnContentTests.cs b/TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldReturnContentTests.cs index d637b7d..a9870a6 100644 --- a/TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldReturnContentTests.cs +++ b/TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldReturnContentTests.cs @@ -26,7 +26,7 @@ public void Check_for_content_result_and_check_invalid_content() var exception = Assert.Throws(() => _controller.WithCallTo(c => c.Content()).ShouldReturnContent(content)); - Assert.That(exception.Message, Is.EqualTo(string.Format("Expected content to be \"{0}\", but instead was \"{1}\".", content, ControllerResultTestController.TextualContent))); + Assert.That(exception.Message, Is.EqualTo(string.Format("Expected content to be '{0}', but instead was '{1}'.", content, ControllerResultTestController.TextualContent))); } [Test] @@ -42,7 +42,7 @@ public void Check_for_content_result_and_check_content_and_check_invalid_content var exception = Assert.Throws(() => _controller.WithCallTo(c => c.Content()).ShouldReturnContent(ControllerResultTestController.TextualContent, contentType)); - Assert.That(exception.Message, Is.EqualTo(string.Format("Expected content type to be \"{0}\", but instead was \"{1}\".", contentType, ControllerResultTestController.ContentType))); + Assert.That(exception.Message, Is.EqualTo(string.Format("Expected content type to be '{0}', but instead was '{1}'.", contentType, ControllerResultTestController.ContentType))); } [Test] diff --git a/TestStack.FluentMVCTesting.Tests/TempDataResultTest.cs b/TestStack.FluentMVCTesting.Tests/TempDataResultTest.cs index 2e483df..4dfd805 100644 --- a/TestStack.FluentMVCTesting.Tests/TempDataResultTest.cs +++ b/TestStack.FluentMVCTesting.Tests/TempDataResultTest.cs @@ -35,7 +35,7 @@ public void Check_for_unexpected_non_existent_temp_data_property() _tempDataTest.AndShouldHaveTempDataProperty(key)); Assert.That(exception.Message, Is.EqualTo(string.Format( - "Expected TempData to have a non-null value with key \"{0}\", but none found.", key))); + "Expected TempData to have a non-null value with key '{0}', but none found.", key))); } [Test] @@ -59,7 +59,7 @@ public void Check_for_existent_temp_data_property_and_check_invalid_value() var exception = Assert.Throws(() => _tempDataTest.AndShouldHaveTempDataProperty(key, expectedValue)); - Assert.That(exception.Message, Is.EqualTo(string.Format("Expected value for key \"{0}\" to be \"{1}\", but instead found \"{2}\"", key, expectedValue, actualValue))); + Assert.That(exception.Message, Is.EqualTo(string.Format("Expected value for key '{0}' to be '{1}', but instead found '{2}'", key, expectedValue, actualValue))); } [Test] @@ -117,7 +117,7 @@ public void Check_for_non_existent_temp_data_property_when_supplied_with_predica _tempDataTest.AndShouldHaveTempDataProperty(key, x => x == 0)); Assert.That(exception.Message, Is.EqualTo(string.Format( - "Expected TempData to have a non-null value with key \"{0}\", but none found.", key))); + "Expected TempData to have a non-null value with key '{0}', but none found.", key))); } [Test] @@ -137,7 +137,7 @@ public void Check_for_unexpected_existent_temp_data_property() _tempDataTest.AndShouldNotHaveTempDataProperty(Key)); Assert.That(exception.Message, Is.EqualTo(string.Format( - "Expected TempData to have no value with key \"{0}\", but found one.", Key))); + "Expected TempData to have no value with key '{0}', but found one.", Key))); } [Test] diff --git a/TestStack.FluentMvcTesting/ControllerExtensions.cs b/TestStack.FluentMvcTesting/ControllerExtensions.cs index ae430a9..d7f53cf 100644 --- a/TestStack.FluentMvcTesting/ControllerExtensions.cs +++ b/TestStack.FluentMvcTesting/ControllerExtensions.cs @@ -67,7 +67,7 @@ public static TempDataResultTest ShouldHaveTempDataProperty(this ControllerBase if (actual == null) { throw new TempDataAssertionException(string.Format( - "Expected TempData to have a non-null value with key \"{0}\", but none found.", key)); + "Expected TempData to have a non-null value with key '{0}', but none found.", key)); } if (value != null && actual.GetType() != value.GetType()) @@ -81,7 +81,7 @@ public static TempDataResultTest ShouldHaveTempDataProperty(this ControllerBase if (value != null && !value.Equals(actual)) { throw new TempDataAssertionException(string.Format( - "Expected value for key \"{0}\" to be \"{1}\", but instead found \"{2}\"", key, value, actual)); + "Expected value for key '{0}' to be '{1}', but instead found '{2}'", key, value, actual)); } return new TempDataResultTest(controller); @@ -94,7 +94,7 @@ public static TempDataResultTest ShouldHaveTempDataProperty(this Control if (actual == null) { throw new TempDataAssertionException(string.Format( - "Expected TempData to have a non-null value with key \"{0}\", but none found.", key)); + "Expected TempData to have a non-null value with key '{0}', but none found.", key)); } if (!predicate((TValue)actual)) @@ -112,7 +112,7 @@ public static TempDataResultTest ShouldNotHaveTempDataProperty(this ControllerBa if (actual != null) { throw new TempDataAssertionException(string.Format( - "Expected TempData to have no value with key \"{0}\", but found one.", key)); + "Expected TempData to have no value with key '{0}', but found one.", key)); } return new TempDataResultTest(controller); diff --git a/TestStack.FluentMvcTesting/ControllerResultTest/ShouldRenderFile.cs b/TestStack.FluentMvcTesting/ControllerResultTest/ShouldRenderFile.cs index b12207b..04eb8a8 100644 --- a/TestStack.FluentMvcTesting/ControllerResultTest/ShouldRenderFile.cs +++ b/TestStack.FluentMvcTesting/ControllerResultTest/ShouldRenderFile.cs @@ -69,7 +69,7 @@ public FileContentResult ShouldRenderFileContents(string contents, string conten if (contents != reconstitutedText) { throw new ActionResultAssertionException(string.Format( - "Expected file contents to be \"{0}\", but instead was \"{1}\".", + "Expected file contents to be '{0}', but instead was '{1}'.", contents, reconstitutedText)); } @@ -121,7 +121,7 @@ public FileStreamResult ShouldRenderFileStream(string contents, string contentTy if (contents != reconstitutedText) { throw new ActionResultAssertionException(string.Format( - "Expected file contents to be \"{0}\", but instead was \"{1}\".", + "Expected file contents to be '{0}', but instead was '{1}'.", contents, reconstitutedText)); } diff --git a/TestStack.FluentMvcTesting/ControllerResultTest/ShouldReturnContent.cs b/TestStack.FluentMvcTesting/ControllerResultTest/ShouldReturnContent.cs index a8f365e..3101154 100644 --- a/TestStack.FluentMvcTesting/ControllerResultTest/ShouldReturnContent.cs +++ b/TestStack.FluentMvcTesting/ControllerResultTest/ShouldReturnContent.cs @@ -13,7 +13,7 @@ public ContentResult ShouldReturnContent(string content = null, string contentTy if (contentType != null && contentType != contentResult.ContentType) { throw new ActionResultAssertionException(string.Format( - "Expected content type to be \"{0}\", but instead was \"{1}\".", + "Expected content type to be '{0}', but instead was '{1}'.", contentType, contentResult.ContentType)); } @@ -21,7 +21,7 @@ public ContentResult ShouldReturnContent(string content = null, string contentTy if (content != null && content != contentResult.Content) { throw new ActionResultAssertionException(string.Format( - "Expected content to be \"{0}\", but instead was \"{1}\".", + "Expected content to be '{0}', but instead was '{1}'.", content, contentResult.Content)); }