mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
[PR #266] [MERGED] [265] Add file upload to allow mocking of file operations #832
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/wiremock/WireMock.Net/pull/266
Author: @JackCreativeCrew
Created: 4/8/2019
Status: ✅ Merged
Merged: 4/11/2019
Merged by: @StefH
Base:
master← Head:265-file-upload📝 Commits (10+)
501b4f2[265] Add file upload to allow mocking of file operationsdf62498[265] Fix failing testdba0f7cMerge branch 'master' into 265-file-uploadc5ad05bUpdate code + add testsbe4aa88LocalFileSystemHandlerTestsf2cae2c1.0.1330ce475Fixed the file post to create the mapping folder if none exists to begin with, otherwise the file upload fails with 404 (can't find the folder to upload to).46cd820fix tests48ea390add more tests for LocalFileSystemHandlerde32c97Added the head method for files to check if a file exists without returning it as a body.📊 Changes
17 files changed (+850 additions, -37 deletions)
View changed files
📝
Directory.Build.props(+1 -1)📝
GitHubReleaseNotes.txt(+1 -1)📝
examples/WireMock.Net.Client/Program.cs(+6 -0)📝
examples/WireMock.Net.Console.Net452.Classic/CustomFileSystemFileHandler.cs(+34 -0)📝
src/WireMock.Net/Client/IFluentMockServerAdmin.cs(+37 -0)📝
src/WireMock.Net/Handlers/IFileSystemHandler.cs(+36 -8)📝
src/WireMock.Net/Handlers/LocalFileSystemHandler.cs(+50 -8)📝
src/WireMock.Net/ResponseMessageBuilder.cs(+8 -0)📝
src/WireMock.Net/Serialization/MappingConverter.cs(+1 -1)📝
src/WireMock.Net/Server/FluentMockServer.Admin.cs(+11 -3)➕
src/WireMock.Net/Server/FluentMockServer.AdminFiles.cs(+114 -0)➕
test/WireMock.Net.Tests/FLuentMockServerTests.AdminFiles.cs(+215 -0)📝
test/WireMock.Net.Tests/FluentMockServerAdminRestClientTests.cs(+236 -2)📝
test/WireMock.Net.Tests/FluentMockServerTests.Admin.cs(+4 -4)📝
test/WireMock.Net.Tests/FluentMockServerTests.Settings.cs(+3 -3)📝
test/WireMock.Net.Tests/Handlers/LocalFileSystemHandlerTests.cs(+43 -5)📝
test/WireMock.Net.Tests/ResponseBuilders/ResponseWithBodyTests.cs(+50 -1)📄 Description
I've added endpoints for file upload/download/deletion (PUT/GET/DELETE) to allow for testing using files. The code is pretty basic but fulfills my requirements at the moment and has test coverage of happy paths.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.