public void RunWithTasksInvokesAllTasksWithAppBuilder( OwinBootstrapper owinBootstrapper, IAppBuilder app, IEnumerable<Mock<IOwinBootstrapTask>> tasks) { var enumerable = tasks as Mock<IOwinBootstrapTask>[] ?? tasks.ToArray(); owinBootstrapper.Run(app, enumerable.Select(t => t.Object)); enumerable.ToList().ForEach(t => t.Verify(r => r.Run(It.Is<IAppBuilder>(a => a == app)))); }
public void RunWithNoTasksThrowsArgumentNullException( OwinBootstrapper owinBootstrapper, IAppBuilder app) { Assert.Throws<ArgumentNullException>(() => owinBootstrapper.Run(app, null)); }
public void RunWithNoAppBuilderThrowsArgumentNullException( OwinBootstrapper owinBootstrapper, List<IOwinBootstrapTask> tasks) { Assert.Throws<ArgumentNullException>(() => owinBootstrapper.Run(null, tasks)); }