Modifying ArgumentNullOrEmpty message to be consistent with Mvc 5 \

testing code.
This commit is contained in:
Pranav K 2014-10-27 15:07:53 -07:00
parent 7934c432c8
commit e0116bab30
7 changed files with 13 additions and 15 deletions

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
= new ResourceManager("Microsoft.AspNet.Mvc.ModelBinding.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// The value cannot be null or empty.
/// Value cannot be null or empty.
/// </summary>
internal static string ArgumentCannotBeNullOrEmpty
{
@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
}
/// <summary>
/// The value cannot be null or empty.
/// Value cannot be null or empty.
/// </summary>
internal static string FormatArgumentCannotBeNullOrEmpty()
{

View File

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ArgumentCannotBeNullOrEmpty" xml:space="preserve">
<value>The value cannot be null or empty.</value>
<value>Value cannot be null or empty.</value>
</data>
<data name="Common_PropertyNotFound" xml:space="preserve">
<value>The property {0}.{1} could not be found.</value>

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Host
= new ResourceManager("Microsoft.AspNet.Mvc.Razor.Host.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// Argument cannot be null or empty.
/// Value cannot be null or empty.
/// </summary>
internal static string ArgumentCannotBeNullOrEmpy
{
@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.Razor.Host
}
/// <summary>
/// Argument cannot be null or empty.
/// Value cannot be null or empty.
/// </summary>
internal static string FormatArgumentCannotBeNullOrEmpy()
{

View File

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ArgumentCannotBeNullOrEmpy" xml:space="preserve">
<value>Argument cannot be null or empty.</value>
<value>Value cannot be null or empty.</value>
</data>
<data name="ArgumentMustBeOfType" xml:space="preserve">
<value>Argument must be an instance of '{0}'.</value>

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.Razor
= new ResourceManager("Microsoft.AspNet.Mvc.Razor.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// The value cannot be null or empty.
/// Value cannot be null or empty.
/// </summary>
internal static string ArgumentCannotBeNullOrEmpty
{
@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Mvc.Razor
}
/// <summary>
/// The value cannot be null or empty.
/// Value cannot be null or empty.
/// </summary>
internal static string FormatArgumentCannotBeNullOrEmpty()
{

View File

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ArgumentCannotBeNullOrEmpty" xml:space="preserve">
<value>The value cannot be null or empty.</value>
<value>Value cannot be null or empty.</value>
</data>
<data name="CompilationFailed" xml:space="preserve">
<value>Compilation for '{0}' failed:</value>

View File

@ -102,14 +102,12 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
var provider = new TestableAssociatedMetadataProvider();
// Act & Assert
ExceptionAssert.ThrowsArgument(
ExceptionAssert.ThrowsArgumentNullOrEmpty(
() => provider.GetMetadataForProperty(modelAccessor: null, containerType: typeof(object), propertyName: null),
"propertyName",
"The value cannot be null or empty.");
ExceptionAssert.ThrowsArgument(
"propertyName");
ExceptionAssert.ThrowsArgumentNullOrEmpty(
() => provider.GetMetadataForProperty(modelAccessor: null, containerType: typeof(object), propertyName: String.Empty),
"propertyName",
"The value cannot be null or empty.");
"propertyName");
}
[Fact]