Skip to content

Commit 249642f

Browse files
committed
Added test class for PartialViewResultAssertions.
1 parent a0a2927 commit 249642f

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

src/FluentAssertions.Mvc3/PartialViewResultAssertions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace FluentAssertions.Mvc3
1010
{
1111
[DebuggerNonUserCode]
12-
public class PartialViewResultAssertions : ViewResultBaseAssertions<ViewResult>
12+
public class PartialViewResultAssertions : ViewResultBaseAssertions<PartialViewResult>
1313
{
1414
public PartialViewResultAssertions(PartialViewResult viewResult) : base(viewResult) { }
1515
}

tests/FluentAssertions.Mvc3.Tests/FluentAssertions.Mvc3.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
<Compile Include="ContentResultAssertions_Tests.cs" />
5252
<Compile Include="FailureMessageHelper_Tests.cs" />
5353
<Compile Include="Helpers\FailureMessageHelper.cs" />
54+
<Compile Include="PartialViewResultAssertions_Tests.cs" />
5455
<Compile Include="Properties\AssemblyInfo.cs" />
5556
<Compile Include="Fakes\FakeController.cs" />
5657
<Compile Include="ActionResultAssertions_Tests.cs" />
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Web.Mvc;
6+
using NUnit.Framework;
7+
8+
namespace FluentAssertions.Mvc3.Tests
9+
{
10+
[TestFixture]
11+
public class PartialViewResultAssertions_Tests
12+
{
13+
[Test]
14+
public void WithDefaultViewName_GivenExpectedValue_ShouldPass()
15+
{
16+
ActionResult result = new PartialViewResult
17+
{
18+
ViewName = String.Empty
19+
};
20+
21+
result.Should().BePartialView().WithDefaultViewName();
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)