예제 #1
0
 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))));
 }
예제 #2
0
 public void RunWithNoTasksThrowsArgumentNullException(
     OwinBootstrapper owinBootstrapper, 
     IAppBuilder app)
 {
     Assert.Throws<ArgumentNullException>(() => owinBootstrapper.Run(app, null));
 }
예제 #3
0
 public void RunWithNoAppBuilderThrowsArgumentNullException(
     OwinBootstrapper owinBootstrapper, 
     List<IOwinBootstrapTask> tasks)
 {
     Assert.Throws<ArgumentNullException>(() => owinBootstrapper.Run(null, tasks));
 }