Reacting to TestHost changes
This commit is contained in:
parent
7b433820b1
commit
f3e537ddcb
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Mvc.Actions;
|
using Microsoft.AspNet.Mvc.Actions;
|
||||||
using Microsoft.AspNet.Mvc.Routing;
|
using Microsoft.AspNet.Mvc.Routing;
|
||||||
|
|
@ -44,7 +45,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void RedirectToAction_Execute_ThrowsOnNullUrl()
|
public async Task RedirectToAction_Execute_ThrowsOnNullUrl()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var httpContext = new Mock<HttpContext>();
|
var httpContext = new Mock<HttpContext>();
|
||||||
|
|
@ -60,7 +61,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
};
|
};
|
||||||
|
|
||||||
// Act & Assert
|
// Act & Assert
|
||||||
ExceptionAssert.ThrowsAsync<InvalidOperationException>(
|
await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
|
||||||
async () =>
|
async () =>
|
||||||
{
|
{
|
||||||
await result.ExecuteResultAsync(actionContext);
|
await result.ExecuteResultAsync(actionContext);
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void RedirectToRoute_Execute_ThrowsOnNullUrl()
|
public async Task RedirectToRoute_Execute_ThrowsOnNullUrl()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
var httpContext = new Mock<HttpContext>();
|
var httpContext = new Mock<HttpContext>();
|
||||||
|
|
@ -66,7 +66,7 @@ namespace Microsoft.AspNet.Mvc
|
||||||
};
|
};
|
||||||
|
|
||||||
// Act & Assert
|
// Act & Assert
|
||||||
ExceptionAssert.ThrowsAsync<InvalidOperationException>(
|
await ExceptionAssert.ThrowsAsync<InvalidOperationException>(
|
||||||
async () =>
|
async () =>
|
||||||
{
|
{
|
||||||
await result.ExecuteResultAsync(actionContext);
|
await result.ExecuteResultAsync(actionContext);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue