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

ApplicationBuilder for testing in TestHost #713

@NinoFloris

Description

@NinoFloris

For introspective tests I'd like to add a bit of middleware to the start of the middleware pipeline for diagnostics of the middleware pass bag (properties).

This time I could get by through overriding my Startup class, add a middleware and calling the base, but I imagine there are enough cases where everyone needs a bit more control.

I've come to the following conclusion:

  • I can add a new IApplicationBuilderFactory concrete to the services via ConfigureServices
  • That factory builds a special ApplicationBuilder that has methods useful for testing, e.g. more hooks into the moving parts.

I was expecting to find something like this ready to use in the TestHost package, however no such thing. Is this something you would consider adding?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions