Handle DI changes in tests.

This commit is contained in:
Chris Ross 2014-12-12 13:59:21 -08:00
parent 781615a29b
commit 5243789dd2
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ namespace Microsoft.AspNet.StaticFiles
[Fact]
public async Task NullArguments()
{
Assert.Throws<TargetInvocationException>(() => TestServer.Create(app => app.UseDirectoryBrowser(new DirectoryBrowserOptions() { Formatter = null })));
Assert.Throws<ArgumentException>(() => TestServer.Create(app => app.UseDirectoryBrowser(new DirectoryBrowserOptions() { Formatter = null })));
// No exception, default provided
TestServer.Create(app => app.UseDirectoryBrowser(new DirectoryBrowserOptions() { FileSystem = null }));

View File

@ -19,7 +19,7 @@ namespace Microsoft.AspNet.StaticFiles
[Fact]
public async Task NullArguments()
{
Assert.Throws<TargetInvocationException>(() => TestServer.Create(app => app.UseStaticFiles(new StaticFileOptions() { ContentTypeProvider = null })));
Assert.Throws<ArgumentException>(() => TestServer.Create(app => app.UseStaticFiles(new StaticFileOptions() { ContentTypeProvider = null })));
// No exception, default provided
TestServer.Create(app => app.UseStaticFiles(new StaticFileOptions() { FileSystem = null }));