Modifying ArgumentNullOrEmpty message to be consistent with Mvc 5 \
testing code.
This commit is contained in:
parent
7934c432c8
commit
e0116bab30
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in New Issue