コード例 #1
0
ファイル: OwinBootstrapperTests.cs プロジェクト: Xamarui/Dawn
 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
ファイル: OwinBootstrapperTests.cs プロジェクト: Xamarui/Dawn
 public void RunWithNoTasksThrowsArgumentNullException(
     OwinBootstrapper owinBootstrapper, 
     IAppBuilder app)
 {
     Assert.Throws<ArgumentNullException>(() => owinBootstrapper.Run(app, null));
 }
コード例 #3
0
ファイル: OwinBootstrapperTests.cs プロジェクト: Xamarui/Dawn
 public void RunWithNoAppBuilderThrowsArgumentNullException(
     OwinBootstrapper owinBootstrapper, 
     List<IOwinBootstrapTask> tasks)
 {
     Assert.Throws<ArgumentNullException>(() => owinBootstrapper.Run(null, tasks));
 }