public void ShouldCreateTest() { using (StubHost textMetalHost = new StubHost()) { textMetalHost.Create(); textMetalHost.Host(); } }
public async Task ShouldCreateTestAsync() { await using (StubHost textMetalHost = new StubHost()) { await textMetalHost.CreateAsync(); await textMetalHost.HostAsync(); } }
private void SetupStub() { stubHost = new StubHost( new ConfigurableBootstrapper(with => { with.Module(new ConfigurableNancyModule(module => { module.Post("config/notify", (o, nancyModule) => { isConfigChanged = true; return HttpStatusCode.OK; }); })); })); stubHost.Start(); }