Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Move functional tests of CORS middleware to this repo #57

Closed
wants to merge 2 commits into from

Conversation

dougbu
Copy link
Member

@dougbu dougbu commented Dec 13, 2015

@dougbu
Copy link
Member Author

dougbu commented Dec 13, 2015

/cc @Eilon @rynowak

dougbu added a commit to aspnet/Mvc that referenced this pull request Dec 14, 2015
- #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
Copy link
Member

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?

Copy link
Member Author

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.

@rynowak
Copy link
Member

rynowak commented Dec 14, 2015

⌚ - mostly to see if we can clean up the startup code.

dougbu added a commit to aspnet/Mvc that referenced this pull request Dec 15, 2015
- #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
@dougbu
Copy link
Member Author

dougbu commented Dec 15, 2015

🆙📅

(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);
Copy link
Member Author

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.

Copy link
Member

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!

@rynowak
Copy link
Member

rynowak commented Dec 15, 2015

:shipit:

@dougbu
Copy link
Member Author

dougbu commented Dec 15, 2015

c3c0b45

@dougbu dougbu closed this Dec 15, 2015
@dougbu dougbu deleted the dougbu/move.functional.3612 branch December 15, 2015 16:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants