From 3866ee72e0b4bfe733ed40ce3d8866bfb0330dcf Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Mon, 12 Sep 2016 22:59:37 -0400 Subject: [PATCH] Fixing typos Dowload -> Download --- .../FileResultTests.cs | 14 +++++++------- .../Controllers/DownloadFilesController.cs | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/FileResultTests.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/FileResultTests.cs index 03b2fdd1e2..a37acbfd6b 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/FileResultTests.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/FileResultTests.cs @@ -24,7 +24,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests public async Task FileFromDisk_CanBeEnabled_WithMiddleware() { // Arrange & Act - var response = await Client.GetAsync("http://localhost/DownloadFiles/DowloadFromDisk"); + var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromDisk"); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests public async Task FileFromDisk_ReturnsFileWithFileName() { // Arrange & Act - var response = await Client.GetAsync("http://localhost/DownloadFiles/DowloadFromDiskWithFileName"); + var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromDiskWithFileName"); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -64,7 +64,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests public async Task FileFromStream_ReturnsFile() { // Arrange & Act - var response = await Client.GetAsync("http://localhost/DownloadFiles/DowloadFromStream"); + var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromStream"); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -81,7 +81,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests public async Task FileFromStream_ReturnsFileWithFileName() { // Arrange & Act - var response = await Client.GetAsync("http://localhost/DownloadFiles/DowloadFromStreamWithFileName"); + var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromStreamWithFileName"); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -102,7 +102,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests public async Task FileFromBinaryData_ReturnsFile() { // Arrange & Act - var response = await Client.GetAsync("http://localhost/DownloadFiles/DowloadFromBinaryData"); + var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromBinaryData"); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -119,7 +119,7 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests public async Task FileFromBinaryData_ReturnsFileWithFileName() { // Arrange & Act - var response = await Client.GetAsync("http://localhost/DownloadFiles/DowloadFromBinaryDataWithFileName"); + var response = await Client.GetAsync("http://localhost/DownloadFiles/DownloadFromBinaryDataWithFileName"); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); @@ -160,4 +160,4 @@ namespace Microsoft.AspNetCore.Mvc.FunctionalTests Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); } } -} \ No newline at end of file +} diff --git a/test/WebSites/FilesWebSite/Controllers/DownloadFilesController.cs b/test/WebSites/FilesWebSite/Controllers/DownloadFilesController.cs index 3ee3e47a05..2446d4afcb 100644 --- a/test/WebSites/FilesWebSite/Controllers/DownloadFilesController.cs +++ b/test/WebSites/FilesWebSite/Controllers/DownloadFilesController.cs @@ -17,19 +17,19 @@ namespace FilesWebSite _hostingEnvironment = hostingEnvironment; } - public IActionResult DowloadFromDisk() + public IActionResult DownloadFromDisk() { var path = Path.Combine(_hostingEnvironment.ContentRootPath, "sample.txt"); return PhysicalFile(path, "text/plain"); } - public IActionResult DowloadFromDiskWithFileName() + public IActionResult DownloadFromDiskWithFileName() { var path = Path.Combine(_hostingEnvironment.ContentRootPath, "sample.txt"); return PhysicalFile(path, "text/plain", "downloadName.txt"); } - public IActionResult DowloadFromStream() + public IActionResult DownloadFromStream() { var stream = new MemoryStream(); var writer = new StreamWriter(stream); @@ -40,7 +40,7 @@ namespace FilesWebSite return File(stream, "text/plain"); } - public IActionResult DowloadFromStreamWithFileName() + public IActionResult DownloadFromStreamWithFileName() { var stream = new MemoryStream(); var writer = new StreamWriter(stream); @@ -51,16 +51,16 @@ namespace FilesWebSite return File(stream, "text/plain", "downloadName.txt"); } - public IActionResult DowloadFromBinaryData() + public IActionResult DownloadFromBinaryData() { var data = Encoding.UTF8.GetBytes("This is a sample text from a binary array"); return File(data, "text/plain"); } - public IActionResult DowloadFromBinaryDataWithFileName() + public IActionResult DownloadFromBinaryDataWithFileName() { var data = Encoding.UTF8.GetBytes("This is a sample text from a binary array"); return File(data, "text/plain", "downloadName.txt"); } } -} \ No newline at end of file +}