iLexDev / ASP.NET-WebApi-MultipartDataMediaFormatter

Used for binding custom types (including files) when sending and receiving multipart encoded form data
MIT License
93 stars 44 forks source link

Make tests not depend on the webserver. #7

Closed togakangaroo closed 3 years ago

togakangaroo commented 9 years ago

Tests won't run out-of-the-box since they seem to spin up a webserver so would need special firewall configuration.

There isn't any need for a webserver at all - a formatter component doesn't directly have anything to do with that.

At the very least should document to how to properly set up the environment

iLexDev commented 9 years ago

Hello, thank you for your suggestion.

In tests I actualy use the Self Hosted WebApi Server (HttpSelfHostServer). It is used for testing formatter in two ways: for sending and receiving. Also it allows to create more real scenario of formatter usage.

Tests should be work as expected if you run Visual Studio with administrator rights. (I will write about that in documentation)

togakangaroo commented 9 years ago

When I get a chance I'll also try to run them as web api self-host in the OWIN test-server. That might be a better long-term solution. If it works I'll PR (I'm also tracking down a bug that I'm seeing in my application. If I can reproduce I'll post it here as well)