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

Improved WebHostBuilder/HostBuilder like Storyteller bootstrapping #766

Open
jeremydmiller opened this issue May 14, 2019 · 0 comments
Open
Milestone

Comments

@jeremydmiller
Copy link
Member

jeremydmiller commented May 14, 2019

More analysis necessary here.

Something like:

public static int MainAsync(string[] args)
{
     return new StorytellerHostBuilder()
         .Services() // this is new. Have ST depend on having an IServiceProvider for the system,
                            // but happily use an empty stand in if it's not necessary
         .BeforeAll(Func<Task>) // probably lots of overloads here
         .BeforeEach(Func<ISpecContext, Task>) // and lots of overloads
         .AfterAll(Func<Task>)
         .AfterEach(Func<ISpecContext, Task>)
         .DisposeAfter(IDisposable)
         .ConfigureConversions(Action<Conversions>)
         .ConfigureLists(existing list options)
         .ConfigureEquivalenceChecks(Action)
         .WarmUp(Func<Task>) // Actions that need to be completed before any specs
                                                 // can be executed

         .Run(args) // This would be the only mandatory call
}

This should be everything you need to add more coarse grained extension methods like bootstrapping AspNetCore systems, starting/stopping Docker containers, running arbitrary command line calls, database setup/teardown, who knows what.

@jeremydmiller jeremydmiller added this to the v6.0 milestone May 14, 2019
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

No branches or pull requests

1 participant