Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated test server #11

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

lambchop4prez
Copy link
Collaborator

This isn't quite building yet, but I wanted to show off progress and get some feedback.

This introduces a new HotPotatoWebApplicationBuilder which inherits from WebApplicationFactory which is the "new" .NET 6 way of doing integration tests. Basically, you use the generic type parameter TProgram to point to your Program class. It will then add the required Hot Potato Core services (Processor, SpecProvider, ResultCollector, OpenAPI stuff) and also configure a Middleware, which repurposes the HotPotato middleware into more of an HTTP spy (as I think we originally intended, but couldn't get the design down). The middleware gets the request, executes RequestDelegate, then gets the response and passes it to the Processor which should populate the results collector.

I haven't run this yet as I haven't gotten it to build, just wanted to get this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant