This commit is contained in:
Simon Cropp 2018-09-13 02:34:45 +10:00 committed by Pranav K
parent dfae9c208a
commit 43d4416a1d
35 changed files with 86 additions and 86 deletions

View File

@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.Mvc.Api.Analyzers
// if (!ModelState.IsValid)
// or
// if (ModelState.IsValid == false)
// If the conditional is misisng a true condition or has an else expression, skip this operation.
// If the conditional is missing a true condition or has an else expression, skip this operation.
return;
}
@ -170,8 +170,8 @@ namespace Microsoft.AspNetCore.Mvc.Api.Analyzers
var constantValue = ((ILiteralOperation)operation).ConstantValue;
if (!constantValue.HasValue ||
!(constantValue.Value is bool boolCostantVaue) ||
boolCostantVaue != expectedConstantValue)
!(constantValue.Value is bool boolConstantValue) ||
boolConstantValue != expectedConstantValue)
{
return false;
}
@ -199,7 +199,7 @@ namespace Microsoft.AspNetCore.Mvc.Api.Analyzers
if (propertyReference.Instance?.Kind != OperationKind.PropertyReference)
{
// Verify this is refering to the ModelState property on the current controller instance
// Verify this is referring to the ModelState property on the current controller instance
return false;
}

View File

@ -16,20 +16,20 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
private readonly IFileProvider _provider;
private readonly IHostingEnvironment _hostingEnvironment;
public FileProviderRazorProjectFileSystem(IRazorViewEngineFileProviderAccessor accessor, IHostingEnvironment hostingEnviroment)
public FileProviderRazorProjectFileSystem(IRazorViewEngineFileProviderAccessor accessor, IHostingEnvironment hostingEnvironment)
{
if (accessor == null)
{
throw new ArgumentNullException(nameof(accessor));
}
if (hostingEnviroment == null)
if (hostingEnvironment == null)
{
throw new ArgumentNullException(nameof(hostingEnviroment));
throw new ArgumentNullException(nameof(hostingEnvironment));
}
_provider = accessor.FileProvider;
_hostingEnvironment = hostingEnviroment;
_hostingEnvironment = hostingEnvironment;
}
public override RazorProjectItem GetItem(string path)

View File

@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages
Subject = context.HandlerInstance;
var tempData = _tempDataFactory.GetTempData(context.HttpContext);
SetPropertyVaules(tempData);
SetPropertyValues(tempData);
}
public void OnPageHandlerExecuted(PageHandlerExecutedContext context)

View File

@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures
Subject = context.Controller;
var tempData = _tempDataFactory.GetTempData(context.HttpContext);
SetPropertyVaules(tempData);
SetPropertyValues(tempData);
}
}
}

View File

@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
/// <inheritdoc />
public void OnResourceExecuted(ResourceExecutedContext context)
{
// If there is an unhandled exception, we would like to avoid setting tempdata as
// If there is an unhandled exception, we would like to avoid setting tempdata as
// the end user is going to see an error page anyway and also it helps us in avoiding
// accessing resources like Session too late in the request lifecyle where SessionFeature might
// not be available.

View File

@ -61,7 +61,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
/// Sets the values of the properties of <see cref="Subject"/> from <paramref name="tempData"/>.
/// </summary>
/// <param name="tempData">The <see cref="ITempDataDictionary"/>.</param>
protected void SetPropertyVaules(ITempDataDictionary tempData)
protected void SetPropertyValues(ITempDataDictionary tempData)
{
if (Properties == null)
{

View File

@ -1181,7 +1181,7 @@ namespace Microsoft.AspNetCore.Mvc.Description
}
[Fact]
public void GetApiDescription_ParameterDescription_IsRequiredNotSet_IfNotValiatingTopLevelNodes()
public void GetApiDescription_ParameterDescription_IsRequiredNotSet_IfNotValidatingTopLevelNodes()
{
// Arrange
var action = CreateActionDescriptor(nameof(RequiredParameter));
@ -2081,7 +2081,7 @@ namespace Microsoft.AspNetCore.Mvc.Description
{
}
private void AcceptsRedundantMetadata([FromQuery] RedundentMetadata r)
private void AcceptsRedundantMetadata([FromQuery] RedundantMetadata r)
{
}
@ -2247,7 +2247,7 @@ namespace Microsoft.AspNetCore.Mvc.Description
public string Name { get; set; }
}
private class RedundentMetadata
private class RedundantMetadata
{
[FromQuery]
public int Id { get; set; }

View File

@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
var options = new FormatterMappings();
options.SetMediaTypeMappingForFormat(setFormat, MediaTypeHeaderValue.Parse(contentType));
// Act
// Act
var returnMediaType = options.GetMediaTypeMappingForFormat(getFormat);
// Assert
@ -78,7 +78,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
[InlineData("application/*")]
[InlineData("*/json")]
[InlineData("*/*")]
public void FormatterMappings_Wildcardformat(string format)
public void FormatterMappings_WildcardFormat(string format)
{
// Arrange
var options = new FormatterMappings();
@ -117,7 +117,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters
mediaType = MediaTypeHeaderValue.Parse("application/bar");
options.SetMediaTypeMappingForFormat("bar", mediaType);
// Act
// Act
var cleared = options.ClearMediaTypeMappingForFormat(format);
// Assert

View File

@ -869,7 +869,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal
}
[Fact]
public void CreateActionModel_AttributeRouteOnAction_CreatesOneActionInforPerRouteTemplate()
public void CreateActionModel_AttributeRouteOnAction_CreatesOneActionInfoPerRouteTemplate()
{
// Arrange
var builder = new TestApplicationModelProvider();
@ -951,7 +951,7 @@ namespace Microsoft.AspNetCore.Mvc.Internal
[Theory]
[InlineData(typeof(SingleRouteAttributeController))]
[InlineData(typeof(MultipleRouteAttributeController))]
public void CreateActionModel_RouteOnController_CreatesOneActionInforPerRouteTemplateOnAction(Type controller)
public void CreateActionModel_RouteOnController_CreatesOneActionInfoPerRouteTemplateOnAction(Type controller)
{
// Arrange
var builder = new TestApplicationModelProvider();

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
{
public abstract class FloatingPointTypeModelBinderTest<TFloatingPoint> where TFloatingPoint: struct
{
public static TheoryData<Type> ConvertableTypeData
public static TheoryData<Type> ConvertibleTypeData
{
get
{
@ -32,7 +32,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
protected abstract TFloatingPoint ThirtyTwoThousandPointOne { get; }
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_ReturnsFailure_IfAttemptedValueCannotBeParsed(Type destinationType)
{
// Arrange
@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_CreatesError_IfAttemptedValueCannotBeParsed(Type destinationType)
{
// Arrange
@ -76,7 +76,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_CreatesError_IfAttemptedValueCannotBeCompletelyParsed(Type destinationType)
{
// Arrange
@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_CreatesError_IfAttemptedValueContainsDisallowedWhitespace(Type destinationType)
{
// Arrange
@ -124,7 +124,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_CreatesError_IfAttemptedValueContainsDisallowedDecimal(Type destinationType)
{
// Arrange
@ -148,7 +148,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_CreatesError_IfAttemptedValueContainsDisallowedThousandsSeparator(Type destinationType)
{
// Arrange
@ -172,7 +172,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_ReturnsFailed_IfValueProviderEmpty(Type destinationType)
{
// Arrange
@ -236,7 +236,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_Twelve(Type destinationType)
{
// Arrange
@ -257,7 +257,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
[ReplaceCulture("en-GB", "en-GB")]
public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_TwelvePointFive(Type destinationType)
{
@ -279,7 +279,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_FrenchTwelvePointFive(Type destinationType)
{
// Arrange
@ -300,7 +300,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_ThirtyTwoThousand(Type destinationType)
{
// Arrange
@ -321,7 +321,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_ThirtyTwoThousandPointOne(Type destinationType)
{
// Arrange
@ -342,7 +342,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_ReturnsModel_IfAttemptedValueIsValid_FrenchThirtyTwoThousandPointOne(Type destinationType)
{
// Arrange

View File

@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
Assert.True(bindingContext.ModelState.ContainsKey("theModelName"));
}
public static TheoryData<Type> ConvertableTypeData
public static TheoryData<Type> ConvertibleTypeData
{
get
{
@ -92,7 +92,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_ReturnsFailure_IfTypeCanBeConverted_AndConversionFails(Type destinationType)
{
// Arrange
@ -112,7 +112,7 @@ namespace Microsoft.AspNetCore.Mvc.ModelBinding.Binders
}
[Theory]
[MemberData(nameof(ConvertableTypeData))]
[MemberData(nameof(ConvertibleTypeData))]
public async Task BindModel_CreatesError_WhenTypeConversionIsNull(Type destinationType)
{
// Arrange

View File

@ -262,7 +262,7 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
}
public static TheoryData<string, IEnumerable<string>, IEnumerable<ModelValidationResult>>
Valdate_ReturnsExpectedResults_Data
Validate_ReturnsExpectedResults_Data
{
get
{
@ -327,8 +327,8 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
}
[Theory]
[MemberData(nameof(Valdate_ReturnsExpectedResults_Data))]
public void Valdate_ReturnsExpectedResults(
[MemberData(nameof(Validate_ReturnsExpectedResults_Data))]
public void Validate_ReturnsExpectedResults(
string errorMessage,
IEnumerable<string> memberNames,
IEnumerable<ModelValidationResult> expectedResults)

View File

@ -39,16 +39,16 @@ namespace Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
adapter.GetErrorMessage(validationContext);
// Assert
Assert.True(attribute.Formated);
Assert.True(attribute.Formatted);
}
public class TestValidationAttribute : ValidationAttribute
{
public bool Formated = false;
public bool Formatted = false;
public override string FormatErrorMessage(string name)
{
Formated = true;
Formatted = true;
return base.FormatErrorMessage(name);
}
}

View File

@ -30,7 +30,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
var context = GetActionContext();
var result = new JsonResult(new { foo = "abcd" });
var executor = CreateExcutor();
var executor = CreateExecutor();
// Act
await executor.ExecuteAsync(context, result);
@ -51,7 +51,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
var result = new JsonResult(new { foo = "abcd" });
result.ContentType = "text/json";
var executor = CreateExcutor();
var executor = CreateExecutor();
// Act
await executor.ExecuteAsync(context, result);
@ -75,7 +75,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
{
Encoding = Encoding.ASCII
}.ToString();
var executor = CreateExcutor();
var executor = CreateExecutor();
// Act
await executor.ExecuteAsync(context, result);
@ -97,7 +97,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
context.HttpContext.Response.ContentType = expectedContentType;
var result = new JsonResult(new { foo = "abcd" });
var executor = CreateExcutor();
var executor = CreateExecutor();
// Act
await executor.ExecuteAsync(context, result);
@ -122,7 +122,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
context.HttpContext.Response.ContentType = responseContentType;
var result = new JsonResult(new { foo = "abcd" });
var executor = CreateExcutor();
var executor = CreateExecutor();
// Act
await executor.ExecuteAsync(context, result);
@ -147,7 +147,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
serializerSettings.Formatting = Formatting.Indented;
var result = new JsonResult(new { foo = "abcd" }, serializerSettings);
var executor = CreateExcutor();
var executor = CreateExecutor();
// Act
await executor.ExecuteAsync(context, result);
@ -165,7 +165,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
var expected = Encoding.UTF8.GetBytes("{\"name\":\"Robert\"");
var context = GetActionContext();
var result = new JsonResult(new ModelWithSerializationError());
var executor = CreateExcutor();
var executor = CreateExecutor();
// Act
try
@ -190,7 +190,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
var expected = "Executing JsonResult, writing value of type 'System.String'.";
var context = GetActionContext();
var logger = new StubLogger();
var executer = CreateExcutor(logger);
var executer = CreateExecutor(logger);
var result = new JsonResult("result_value");
// Act
@ -207,7 +207,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
var expected = "Executing JsonResult, writing value of type 'null'.";
var context = GetActionContext();
var logger = new StubLogger();
var executer = CreateExcutor(logger);
var executer = CreateExecutor(logger);
var result = new JsonResult(null);
// Act
@ -217,7 +217,7 @@ namespace Microsoft.AspNetCore.Mvc.Formatters.Json.Internal
Assert.Equal(expected, logger.MostRecentMessage);
}
private static JsonResultExecutor CreateExcutor(ILogger<JsonResultExecutor> logger = null)
private static JsonResultExecutor CreateExecutor(ILogger<JsonResultExecutor> logger = null)
{
return new JsonResultExecutor(
new TestHttpResponseStreamWriterFactory(),

View File

@ -29,7 +29,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public async Task ApiExplorer_IsVisible_EnabledWithConvention()
{
// Arrange & Act
var response = await Client.GetAsync("http://localhost/ApiExplorerVisbilityEnabledByConvention");
var response = await Client.GetAsync("http://localhost/ApiExplorerVisibilityEnabledByConvention");
var body = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject<List<ApiExplorerData>>(body);
@ -42,7 +42,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public async Task ApiExplorer_IsVisible_DisabledWithConvention()
{
// Arrange & Act
var response = await Client.GetAsync("http://localhost/ApiExplorerVisbilityDisabledByConvention");
var response = await Client.GetAsync("http://localhost/ApiExplorerVisibilityDisabledByConvention");
var body = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject<List<ApiExplorerData>>(body);

View File

@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
[ConditionalFact]
// Mono issue - https://github.com/aspnet/External/issues/18
[FrameworkSkipCondition(RuntimeFrameworks.Mono)]
public async Task DerivedClassLevelAttribute_OveridesBaseClassLevel()
public async Task DerivedClassLevelAttribute_OverridesBaseClassLevel()
{
// Arrange
var input = "<Product xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" " +

View File

@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public HttpClient Client { get; }
[Fact]
public async Task Controller_WithDefaultValueAttribut_ReturnsDefault()
public async Task Controller_WithDefaultValueAttribute_ReturnsDefault()
{
// Arrange
var expected = "hello";

View File

@ -287,7 +287,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
{
// Act
var input = "Test";
var response = await Client.PostAsJsonAsync("PolymorhpicPropertyBinding/Action", input);
var response = await Client.PostAsJsonAsync("PolymorphicPropertyBinding/Action", input);
// Assert
await response.AssertStatusCodeAsync(HttpStatusCode.OK);
@ -299,7 +299,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests
public async Task ValidationUsesModelMetadataFromActualModelType_ForInputFormattedProperties()
{
// Act
var response = await Client.PostAsJsonAsync("PolymorhpicPropertyBinding/Action", string.Empty);
var response = await Client.PostAsJsonAsync("PolymorphicPropertyBinding/Action", string.Empty);
// Assert
await response.AssertStatusCodeAsync(HttpStatusCode.BadRequest);

View File

@ -95,7 +95,7 @@
<link href="HtmlEncode[[/styles/site.min.css]]" rel="stylesheet" data-extra="test" />
<meta name="x-stylesheet-fallback-test" content="" class="HtmlEncode[[hidden]]" /><script>!function(a,b,c,d){var e,f=document,g=f.getElementsByTagName("SCRIPT"),h=g[g.length-1].previousElementSibling,i=f.defaultView&&f.defaultView.getComputedStyle?f.defaultView.getComputedStyle(h):h.currentStyle;if(i&&i[a]!==b)for(e=0;e<c.length;e++)f.write('<link href="'+c[e]+'" '+d+"/>")}("JavaScriptEncode[[visibility]]","JavaScriptEncode[[hidden]]",["JavaScriptEncode[[HtmlEncode[[/styles/site.css]]]]","JavaScriptEncode[[HtmlEncode[[/styles/siteIntegrity.css]]]]","JavaScriptEncode[[HtmlEncode[[/styles/sub/site2.css]]]]"], "JavaScriptEncode[[rel="stylesheet" data-extra="test" ]]");</script>
<!-- Fallback from globbed href to glbobed href -->
<!-- Fallback from globbed href to globbed href -->
<meta name="x-stylesheet-fallback-test" content="" class="HtmlEncode[[hidden]]" /><script>!function(a,b,c,d){var e,f=document,g=f.getElementsByTagName("SCRIPT"),h=g[g.length-1].previousElementSibling,i=f.defaultView&&f.defaultView.getComputedStyle?f.defaultView.getComputedStyle(h):h.currentStyle;if(i&&i[a]!==b)for(e=0;e<c.length;e++)f.write('<link href="'+c[e]+'" '+d+"/>")}("JavaScriptEncode[[visibility]]","JavaScriptEncode[[hidden]]",["JavaScriptEncode[[HtmlEncode[[/styles/site.css]]]]"], "JavaScriptEncode[[rel="stylesheet" data-extra="test" ]]");</script>

View File

@ -96,7 +96,7 @@
<link href="/styles/site.min.css" rel="stylesheet" data-extra="test" />
<meta name="x-stylesheet-fallback-test" content="" class="hidden" /><script>!function(a,b,c,d){var e,f=document,g=f.getElementsByTagName("SCRIPT"),h=g[g.length-1].previousElementSibling,i=f.defaultView&&f.defaultView.getComputedStyle?f.defaultView.getComputedStyle(h):h.currentStyle;if(i&&i[a]!==b)for(e=0;e<c.length;e++)f.write('<link href="'+c[e]+'" '+d+"/>")}("visibility","hidden",["\/styles\/site.css","\/styles\/siteIntegrity.css","\/styles\/sub\/site2.css"], "rel=\u0022stylesheet\u0022 data-extra=\u0022test\u0022 ");</script>
<!-- Fallback from globbed href to glbobed href -->
<!-- Fallback from globbed href to globbed href -->
<meta name="x-stylesheet-fallback-test" content="" class="hidden" /><script>!function(a,b,c,d){var e,f=document,g=f.getElementsByTagName("SCRIPT"),h=g[g.length-1].previousElementSibling,i=f.defaultView&&f.defaultView.getComputedStyle?f.defaultView.getComputedStyle(h):h.currentStyle;if(i&&i[a]!==b)for(e=0;e<c.length;e++)f.write('<link href="'+c[e]+'" '+d+"/>")}("visibility","hidden",["\/styles\/site.css"], "rel=\u0022stylesheet\u0022 data-extra=\u0022test\u0022 ");</script>

View File

@ -2659,7 +2659,7 @@ namespace Microsoft.AspNetCore.Mvc.IntegrationTests
// This covers the case where a key is present, but has an empty value. The type converter
// will report an error.
[Fact]
public async Task MutableObjectModelBinder_BindsPOCO_TypeConvertedPropertyNonConvertableValue_GetsError()
public async Task MutableObjectModelBinder_BindsPOCO_TypeConvertedPropertyNonConvertibleValue_GetsError()
{
// Arrange
var parameter = new ParameterDescriptor()

View File

@ -241,7 +241,7 @@ namespace Microsoft.AspNetCore.Mvc.IntegrationTests
}
[Fact]
public async Task BindParameter_NonConvertableValue_GetsError()
public async Task BindParameter_NonConvertibleValue_GetsError()
{
// Arrange
var parameterBinder = ModelBindingTestHelper.GetParameterBinder();
@ -290,7 +290,7 @@ namespace Microsoft.AspNetCore.Mvc.IntegrationTests
}
[Fact]
public async Task BindParameter_NonConvertableValue_GetsCustomErrorMessage()
public async Task BindParameter_NonConvertibleValue_GetsCustomErrorMessage()
{
// Arrange
var parameterType = typeof(int);

View File

@ -110,7 +110,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
private class TestPageWithDerivedModel : Page
{
public DeriviedModel Model => null;
public DerivedModel Model => null;
public override Task ExecuteAsync() =>throw new NotImplementedException();
}
@ -121,7 +121,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
}
[Authorize(Policy = "Derived")]
private class DeriviedModel : BaseModel
private class DerivedModel : BaseModel
{
public virtual void OnGet()
{

View File

@ -361,7 +361,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
}
[Fact]
public async Task ProcessAsync_DoesNotUseModelFromViewdata_IfModelExpressionEvalulatesToNull()
public async Task ProcessAsync_DoesNotUseModelFromViewdata_IfModelExpressionEvaluatesToNull()
{
// Arrange
var bufferScope = new TestViewBufferScope();
@ -455,7 +455,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
}
[Fact]
public async Task ProcessAsync_UsesModelOnViewContextViewData_WhenModelExpresionIsNull()
public async Task ProcessAsync_UsesModelOnViewContextViewData_WhenModelExpressionIsNull()
{
// Arrange
var bufferScope = new TestViewBufferScope();

View File

@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
[Theory]
[MemberData(nameof(ProcessAsync_GeneratesExpectedOutput_WithNoErrorsData))]
public async Task ProcessAsync_SuppressesOutput_IfClientSideValiationDisabled_WithNoErrorsData(
public async Task ProcessAsync_SuppressesOutput_IfClientSideValidationDisabled_WithNoErrorsData(
ModelStateDictionary modelStateDictionary)
{
// Arrange

View File

@ -143,7 +143,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
}
[Fact]
public void ObjectTemplate_HonoursHideSurroundingHtml()
public void ObjectTemplate_HonorsHideSurroundingHtml()
{
// Arrange
var expected =
@ -231,7 +231,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
}
[Fact]
public void HiddenInputTemplate_HonoursHideSurroundingHtml()
public void HiddenInputTemplate_HonorsHideSurroundingHtml()
{
// Arrange
var model = "Model string";

View File

@ -374,7 +374,7 @@ Environment.NewLine;
}
[Fact]
public void ObjectTemplate_HonoursHideSurroundingHtml()
public void ObjectTemplate_HonorsHideSurroundingHtml()
{
// Arrange
var expected =
@ -470,7 +470,7 @@ Environment.NewLine;
}
[Fact]
public void HiddenInputTemplate_HonoursHideSurroundingHtml()
public void HiddenInputTemplate_HonorsHideSurroundingHtml()
{
// Arrange
var expected = "<input id=\"HtmlEncode[[FieldPrefix]]\" name=\"HtmlEncode[[FieldPrefix]]\" type=\"HtmlEncode[[hidden]]\" value=\"HtmlEncode[[Model string]]\" />";

View File

@ -54,7 +54,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
Assert.Collection(
result.OrderBy(p => p.Key),
property => Assert.Equal(nameof(BaseController.BaseProperty), property.PropertyInfo.Name),
property => Assert.Equal(nameof(DerivedController.DeriviedProperty), property.PropertyInfo.Name));
property => Assert.Equal(nameof(DerivedController.DerivedProperty), property.PropertyInfo.Name));
}
[Fact]
@ -90,7 +90,7 @@ namespace Microsoft.AspNetCore.Mvc.ViewFeatures.Internal
public class DerivedController : BaseController
{
[ViewData]
public string DeriviedProperty { get; set; }
public string DerivedProperty { get; set; }
}
public class PropertyWithKeyController

View File

@ -34,10 +34,10 @@ namespace Microsoft.AspNetCore.Mvc.Analyzers
public async Task GetAttributes_OnNonOverriddenMethod_ReturnsAllAttributesOnCurrentAction()
{
// Arrange
var compilation = await GetCompilation("GetAttributes_WithoutMethodOverridding");
var compilation = await GetCompilation("GetAttributes_WithoutMethodOverriding");
var attribute = compilation.GetTypeByMetadataName(typeof(ProducesResponseTypeAttribute).FullName);
var testClass = compilation.GetTypeByMetadataName($"{Namespace}.{nameof(GetAttributes_WithoutMethodOverridding)}");
var method = (IMethodSymbol)testClass.GetMembers(nameof(GetAttributes_WithoutMethodOverridding.Method)).First();
var testClass = compilation.GetTypeByMetadataName($"{Namespace}.{nameof(GetAttributes_WithoutMethodOverriding)}");
var method = (IMethodSymbol)testClass.GetMembers(nameof(GetAttributes_WithoutMethodOverriding.Method)).First();
// Act
var attributes = CodeAnalysisExtensions.GetAttributes(method, attribute, inherit: true);

View File

@ -1,6 +1,6 @@
namespace Microsoft.AspNetCore.Mvc.Analyzers
{
public class GetAttributes_WithoutMethodOverridding
public class GetAttributes_WithoutMethodOverriding
{
[ProducesResponseType(201)]
public void Method() { }

View File

@ -5,8 +5,8 @@ using Microsoft.AspNetCore.Mvc;
namespace ApiExplorerWebSite
{
[Route("ApiExplorerVisbilityDisabledByConvention")]
public class ApiExplorerVisbilityDisabledByConventionController : Controller
[Route("ApiExplorerVisibilityDisabledByConvention")]
public class ApiExplorerVisibilityDisabledByConventionController : Controller
{
[HttpGet]
public void Get()

View File

@ -5,8 +5,8 @@ using Microsoft.AspNetCore.Mvc;
namespace ApiExplorerWebSite
{
[Route("ApiExplorerVisbilityEnabledByConvention")]
public class ApiExplorerVisbilityEnabledByConventionController : Controller
[Route("ApiExplorerVisibilityEnabledByConvention")]
public class ApiExplorerVisibilityEnabledByConventionController : Controller
{
[HttpGet]
public void Get()

View File

@ -28,7 +28,7 @@ namespace ApiExplorerWebSite
options.Conventions.Add(new ApiExplorerVisibilityEnabledConvention());
options.Conventions.Add(new ApiExplorerVisibilityDisabledConvention(
typeof(ApiExplorerVisbilityDisabledByConventionController)));
typeof(ApiExplorerVisibilityDisabledByConventionController)));
options.Conventions.Add(new ApiExplorerInboundOutboundConvention(
typeof(ApiExplorerInboundOutBoundController)));
options.Conventions.Add(new ApiExplorerRouteChangeConvention(wellKnownChangeToken));

View File

@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc;
namespace FormatterWebSite.Controllers
{
public class PolymorhpicPropertyBindingController : ControllerBase
public class PolymorphicPropertyBindingController : ControllerBase
{
[FromBody]
public IModel Person { get; set; }

View File

@ -157,7 +157,7 @@
asp-fallback-test-property="visibility"
asp-fallback-test-value="hidden" />
<!-- Fallback from globbed href to glbobed href -->
<!-- Fallback from globbed href to globbed href -->
<link asp-href-include="styles/site.min.css" rel="stylesheet" data-extra="test"
asp-fallback-href-include="**/site.css"
asp-fallback-test-class="hidden"