-
Notifications
You must be signed in to change notification settings - Fork 46
Move functional tests of CORS middleware to this repo #57
Conversation
dougbu
commented
Dec 13, 2015
- related to MVC functional test cleanup (part 1) (ETA 12/4) Mvc#3612
- #3612 subpart 2 of 2 - merge `ActionConstraintsWebSite`, `AntiforgeryTokenWebSite` and `ContentNegotiationWebSite` into `BasicWebSite` - remove tests depending on `ErrorReporterMiddleware` in merged sites; not used in `BasicWebSite` - delete `CompositeViewEngineWebSite`, `Microsoft.AspNet.Mvc.ViewEngines.CompositeViewEngineTest` covers cases - delete `CorsMiddlewareWebsite`, soon to be in Cors repo (see aspnet/CORS#57) - remove `SendFileMiddleware` from FilesWebSite, unused there
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace Microsoft.AspNet.Cors.Infrastructure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the right namespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It matches most of the src classes as well as the other test classes.
⌚ - mostly to see if we can clean up the startup code. |
- #3612 subpart 2 of 2 - merge `ActionConstraintsWebSite`, `AntiforgeryTokenWebSite` and `ContentNegotiationWebSite` into `BasicWebSite` - remove tests depending on `ErrorReporterMiddleware` in merged sites; not used in `BasicWebSite` - delete `CompositeViewEngineWebSite`, `Microsoft.AspNet.Mvc.ViewEngines.CompositeViewEngineTest` covers cases - delete `CorsMiddlewareWebsite`, soon to be in Cors repo (see aspnet/CORS#57) - remove `SendFileMiddleware` from FilesWebSite, unused there
…not_ firing and forgetting - PR comments
🆙📅 (Startup code greatly cleaned up. Works here though it doesn't appear like it'll work for MVC.) |
public CorsTestFixture() | ||
{ | ||
var builder = new WebHostBuilder().UseStartup<TStartup>(); | ||
_server = new TestServer(builder); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't find a TestServer.Create<TServer>
method so I did this two-step instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better anyways. We're changing all of the hosting APIs 😄 Stay tuned!