Skip to content

Commit 0ea4632

Browse files
committed
Made ShouldReturnEmptyResult return EmptyResult.
Partial implementation of #46.
1 parent 21c8637 commit 0ea4632

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

TestStack.FluentMVCTesting.Tests/ControllerResultTestTests/ShouldReturnEmptyResultTests.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using NUnit.Framework;
1+
using System.Web.Mvc;
2+
using NUnit.Framework;
23

34
namespace TestStack.FluentMVCTesting.Tests
45
{
@@ -9,5 +10,13 @@ public void Check_for_empty_result()
910
{
1011
_controller.WithCallTo(c => c.EmptyResult()).ShouldReturnEmptyResult();
1112
}
13+
14+
[Test]
15+
public void Return_the_empty_result()
16+
{
17+
EmptyResult actual = _controller.WithCallTo(c => c.EmptyResult())
18+
.ShouldReturnEmptyResult();
19+
Assert.NotNull(actual);
20+
}
1221
}
1322
}

TestStack.FluentMVCTesting.Tests/TestControllers/ControllerResultTestController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ControllerResultTestController : Controller
2727
#endregion
2828

2929
#region Empty, Null and Random Results
30-
public ActionResult EmptyResult()
30+
public EmptyResult EmptyResult()
3131
{
3232
return new EmptyResult();
3333
}

TestStack.FluentMvcTesting/ControllerResultTest/ShouldReturnEmptyResult.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ namespace TestStack.FluentMVCTesting
44
{
55
public partial class ControllerResultTest<T>
66
{
7-
public void ShouldReturnEmptyResult()
7+
public EmptyResult ShouldReturnEmptyResult()
88
{
99
ValidateActionReturnType<EmptyResult>();
10+
return (EmptyResult) ActionResult;
1011
}
1112
}
1213
}

0 commit comments

Comments
 (0)