Skip to content

Commit 3323e5b

Browse files
committed
Update FluentAssertions library to v5.0.0
1 parent 5d7887f commit 3323e5b

22 files changed

+101
-106
lines changed

samples/FluentAssertions.Mvc3.Samples/FluentAssertions.Mvc3.Samples.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,8 @@
5555
<Reference Include="EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
5656
<HintPath>..\..\packages\EntityFramework.4.1.10331.0\lib\EntityFramework.dll</HintPath>
5757
</Reference>
58-
<Reference Include="FluentAssertions, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
59-
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.dll</HintPath>
60-
</Reference>
61-
<Reference Include="FluentAssertions.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
62-
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.Core.dll</HintPath>
58+
<Reference Include="FluentAssertions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
59+
<HintPath>..\..\packages\FluentAssertions.5.0.0\lib\net45\FluentAssertions.dll</HintPath>
6360
</Reference>
6461
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6562
<HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
@@ -73,6 +70,9 @@
7370
<Reference Include="System" />
7471
<Reference Include="System.Data" />
7572
<Reference Include="System.Drawing" />
73+
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
74+
<HintPath>..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
75+
</Reference>
7676
<Reference Include="System.Web.DynamicData" />
7777
<Reference Include="System.Web.Entity" />
7878
<Reference Include="System.Web.ApplicationServices" />

samples/FluentAssertions.Mvc3.Samples/packages.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="EntityFramework" version="4.1.10331.0" targetFramework="net45" />
4-
<package id="FluentAssertions" version="3.3.0" targetFramework="net45" />
4+
<package id="FluentAssertions" version="5.0.0" targetFramework="net45" />
55
<package id="jQuery" version="1.5.1" />
66
<package id="jQuery.UI.Combined" version="1.8.11" />
77
<package id="jQuery.Validation" version="1.8.0" />
@@ -12,4 +12,5 @@
1212
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
1313
<package id="Modernizr" version="1.7" />
1414
<package id="NUnit" version="3.2.1" targetFramework="net45" />
15+
<package id="System.ValueTuple" version="4.3.0" targetFramework="net45" />
1516
</packages>

src/FluentAssertions.Mvc.Shared/RedirectToRouteAssertions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public RedirectToRouteAssertions WithRouteName(string expectedRouteName, string
8181
/// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
8282
/// </param>
8383
/// <param name="reasonArgs">
84-
/// Zero or more objects to format using the placeholders in <see cref="reason" />.
84+
/// Zero or more objects to format using the placeholders in <see paramref="reason" />.
8585
/// </param>
8686
public RedirectToRouteAssertions WithRouteValue(string key, object expectedValue, string reason = "", params object[] reasonArgs)
8787
{
@@ -98,7 +98,7 @@ public RedirectToRouteAssertions WithRouteValue(string key, object expectedValue
9898
/// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
9999
/// </param>
100100
/// <param name="reasonArgs">
101-
/// Zero or more objects to format using the placeholders in <see cref="reason" />.
101+
/// Zero or more objects to format using the placeholders in <see paramref="reason" />.
102102
/// </param>
103103
public RedirectToRouteAssertions WithController(string expectedControllerName, string reason = "", params object[] reasonArgs)
104104
{
@@ -132,7 +132,7 @@ public RedirectToRouteAssertions WithAction(string expectedAction, string reason
132132
/// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
133133
/// </param>
134134
/// <param name="reasonArgs">
135-
/// Zero or more objects to format using the placeholders in <see cref="reason" />.
135+
/// Zero or more objects to format using the placeholders in <see paramref="reason" />.
136136
/// </param>
137137
public RedirectToRouteAssertions WithArea(string expectedArea, string reason = "", params object[] reasonArgs)
138138
{
@@ -143,7 +143,7 @@ public RedirectToRouteAssertions WithArea(string expectedArea, string reason = "
143143
/// <summary>
144144
/// Returns the type of the subject the assertion applies on.
145145
/// </summary>
146-
protected override string Context
146+
protected override string Identifier
147147
{
148148
get { return "RedirectToRouteResult"; }
149149
}

src/FluentAssertions.Mvc3/FluentAssertions.Mvc3.csproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,17 @@
4747
<Prefer32Bit>false</Prefer32Bit>
4848
</PropertyGroup>
4949
<ItemGroup>
50-
<Reference Include="FluentAssertions, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
51-
<SpecificVersion>False</SpecificVersion>
52-
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.dll</HintPath>
53-
</Reference>
54-
<Reference Include="FluentAssertions.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
55-
<SpecificVersion>False</SpecificVersion>
56-
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.Core.dll</HintPath>
50+
<Reference Include="FluentAssertions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
51+
<HintPath>..\..\packages\FluentAssertions.5.0.0\lib\net45\FluentAssertions.dll</HintPath>
5752
</Reference>
5853
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
5954
<Private>True</Private>
6055
<HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
6156
</Reference>
6257
<Reference Include="System" />
58+
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
59+
<HintPath>..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
60+
</Reference>
6361
<Reference Include="System.Web.Helpers">
6462
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.1.0.20105.408\lib\net40\System.Web.Helpers.dll</HintPath>
6563
<Private>True</Private>
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="FluentAssertions" version="3.3.0" targetFramework="net45" />
4-
<package id="Microsoft.AspNet.Mvc" version="3.0.20105.1" targetFramework="net45" allowedVersions="(,4)" />
5-
<package id="Microsoft.AspNet.Razor" version="1.0.20105.408" targetFramework="net45" allowedVersions="(,2)" />
6-
<package id="Microsoft.AspNet.WebPages" version="1.0.20105.408" targetFramework="net45" allowedVersions="(,2)" />
7-
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
3+
<package id="FluentAssertions" version="5.0.0" targetFramework="net45" />
4+
<package id="Microsoft.AspNet.Mvc" version="3.0.20105.1" targetFramework="net45" allowedVersions="(,4)" />
5+
<package id="Microsoft.AspNet.Razor" version="1.0.20105.408" targetFramework="net45" allowedVersions="(,2)" />
6+
<package id="Microsoft.AspNet.WebPages" version="1.0.20105.408" targetFramework="net45" allowedVersions="(,2)" />
7+
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
8+
<package id="System.ValueTuple" version="4.3.0" targetFramework="net45" />
89
</packages>

src/FluentAssertions.Mvc4/FluentAssertions.Mvc4.csproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,18 @@
3737
<Prefer32Bit>false</Prefer32Bit>
3838
</PropertyGroup>
3939
<ItemGroup>
40-
<Reference Include="FluentAssertions, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
41-
<SpecificVersion>False</SpecificVersion>
42-
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.dll</HintPath>
43-
</Reference>
44-
<Reference Include="FluentAssertions.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
45-
<SpecificVersion>False</SpecificVersion>
46-
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.Core.dll</HintPath>
40+
<Reference Include="FluentAssertions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
41+
<HintPath>..\..\packages\FluentAssertions.5.0.0\lib\net45\FluentAssertions.dll</HintPath>
4742
</Reference>
4843
<Reference Include="Microsoft.Web.Infrastructure">
4944
<HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
5045
<Private>True</Private>
5146
</Reference>
5247
<Reference Include="System" />
5348
<Reference Include="System.Core" />
49+
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
50+
<HintPath>..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
51+
</Reference>
5452
<Reference Include="System.Web" />
5553
<Reference Include="System.Web.Helpers">
5654
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.Helpers.dll</HintPath>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="FluentAssertions" version="3.3.0" targetFramework="net45" />
3+
<package id="FluentAssertions" version="5.0.0" targetFramework="net45" />
44
<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net45" />
55
<package id="Microsoft.AspNet.Razor" version="2.0.20710.0" targetFramework="net45" />
66
<package id="Microsoft.AspNet.WebPages" version="2.0.20710.0" targetFramework="net45" />
77
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
8+
<package id="System.ValueTuple" version="4.3.0" targetFramework="net45" />
89
</packages>

src/FluentAssertions.Mvc5/FluentAssertions.Mvc5.csproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,18 @@
3333
<DocumentationFile>..\..\bin\Release\FluentAssertions.Mvc5.xml</DocumentationFile>
3434
</PropertyGroup>
3535
<ItemGroup>
36-
<Reference Include="FluentAssertions, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
37-
<SpecificVersion>False</SpecificVersion>
38-
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.dll</HintPath>
39-
</Reference>
40-
<Reference Include="FluentAssertions.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
41-
<SpecificVersion>False</SpecificVersion>
42-
<HintPath>..\..\packages\FluentAssertions.3.3.0\lib\net45\FluentAssertions.Core.dll</HintPath>
36+
<Reference Include="FluentAssertions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
37+
<HintPath>..\..\packages\FluentAssertions.5.0.0\lib\net45\FluentAssertions.dll</HintPath>
4338
</Reference>
4439
<Reference Include="Microsoft.Web.Infrastructure">
4540
<HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
4641
<Private>True</Private>
4742
</Reference>
4843
<Reference Include="System" />
4944
<Reference Include="System.Core" />
45+
<Reference Include="System.ValueTuple, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
46+
<HintPath>..\..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
47+
</Reference>
5048
<Reference Include="System.Web" />
5149
<Reference Include="System.Web.Helpers">
5250
<HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.Helpers.dll</HintPath>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="FluentAssertions" version="3.3.0" targetFramework="net45" />
3+
<package id="FluentAssertions" version="5.0.0" targetFramework="net45" />
44
<package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net45" />
55
<package id="Microsoft.AspNet.Razor" version="3.0.0" targetFramework="net45" />
66
<package id="Microsoft.AspNet.WebPages" version="3.0.0" targetFramework="net45" />
77
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
8+
<package id="System.ValueTuple" version="4.3.0" targetFramework="net45" />
89
</packages>

tests/FluentAssertions.Mvc.Tests.Shared/ActionResultAssertions_Tests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void BeContent_GivenNotContent_ShouldFail()
2929
{
3030
ActionResult result = new ViewResult();
3131
Action a = () => result.Should().BeContentResult();
32-
a.ShouldThrow<Exception>()
32+
a.Should().Throw<Exception>()
3333
.WithMessage("Expected ActionResult to be \"ContentResult\", but found \"ViewResult\"");
3434
}
3535

@@ -45,7 +45,7 @@ public void BeEmpty_GivenNotEmpty_ShouldPass()
4545
{
4646
ActionResult result = new ViewResult();
4747
Action a = () => result.Should().BeEmptyResult();
48-
a.ShouldThrow<Exception>()
48+
a.Should().Throw<Exception>()
4949
.WithMessage("Expected ActionResult to be \"EmptyResult\", but found \"ViewResult\"");
5050
}
5151

@@ -61,7 +61,7 @@ public void BeRedirectToRoute_GivenNotRedirectToRoute_ShouldFail()
6161
{
6262
ActionResult result = new ViewResult();
6363
Action a = () => result.Should().BeRedirectToRouteResult();
64-
a.ShouldThrow<Exception>()
64+
a.Should().Throw<Exception>()
6565
.WithMessage("Expected ActionResult to be \"RedirectToRouteResult\", but found \"ViewResult\"");
6666
}
6767

@@ -77,7 +77,7 @@ public void BeRedirect_GivenNotRedirect_ShouldFail()
7777
{
7878
ActionResult result = new ViewResult();
7979
Action a = () => result.Should().BeRedirectResult();
80-
a.ShouldThrow<Exception>()
80+
a.Should().Throw<Exception>()
8181
.WithMessage("Expected ActionResult to be \"RedirectResult\", but found \"ViewResult\"");
8282
}
8383

@@ -93,7 +93,7 @@ public void BePartialView_GivenNotPartial_ShouldFail()
9393
{
9494
ActionResult result = new RedirectResult("/");
9595
Action a = () => result.Should().BePartialViewResult();
96-
a.ShouldThrow<Exception>()
96+
a.Should().Throw<Exception>()
9797
.WithMessage("Expected ActionResult to be \"PartialViewResult\", but found \"RedirectResult\"");
9898
}
9999

@@ -109,7 +109,7 @@ public void BeView_GivenNotView_ShouldFail()
109109
{
110110
ActionResult result = new RedirectResult("/");
111111
Action a = () => result.Should().BeViewResult();
112-
a.ShouldThrow<Exception>()
112+
a.Should().Throw<Exception>()
113113
.WithMessage("Expected ActionResult to be \"ViewResult\", but found \"RedirectResult\"");
114114
}
115115
}

tests/FluentAssertions.Mvc.Tests.Shared/ContentResultAssertions_Tests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void WithContent_GivenUnexpected_ShouldFail()
3232

3333
Action a = () => result.Should().BeContentResult().WithContent(expectedContent);
3434

35-
a.ShouldThrow<Exception>()
35+
a.Should().Throw<Exception>()
3636
.WithMessage(failureMessage);
3737
}
3838

@@ -53,7 +53,7 @@ public void WithContentType_GivenUnexpected_ShouldFail()
5353

5454
Action a = () => result.Should().BeContentResult().WithContentType(expectedContentType);
5555

56-
a.ShouldThrow<Exception>()
56+
a.Should().Throw<Exception>()
5757
.WithMessage(failureMessage);
5858
}
5959

@@ -75,7 +75,7 @@ public void WithContentEncoding_GivenUnexpected_ShouldFail()
7575

7676
Action a = () => result.Should().BeContentResult().WithContentEncoding(expectedEncoding);
7777

78-
a.ShouldThrow<Exception>()
78+
a.Should().Throw<Exception>()
7979
.WithMessage(failureMessage);
8080
}
8181
#endif

tests/FluentAssertions.Mvc.Tests.Shared/PartialViewResultAssertions_Tests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void Model_GivenUnexpectedValue_ShouldFail()
5151
};
5252
#endif
5353
Action a = () => result.Should().BePartialViewResult().Model.Should().Be("xyx");
54-
a.ShouldThrow<Exception>();
54+
a.Should().Throw<Exception>();
5555
}
5656

5757
[Test]
@@ -80,7 +80,7 @@ public void ModelAs_GivenUnexpectedValue_ShouldFail()
8080
};
8181
#endif
8282
Action a = () => result.Should().BePartialViewResult().ModelAs<string>().Should().Be("xyx");
83-
a.ShouldThrow<Exception>();
83+
a.Should().Throw<Exception>();
8484
}
8585

8686
[Test]
@@ -95,7 +95,7 @@ public void ModelAs_GivenWrongType_ShouldFail()
9595
};
9696
#endif
9797
Action a = () => result.Should().BePartialViewResult().ModelAs<int>().Should().Be(2);
98-
a.ShouldThrow<Exception>();
98+
a.Should().Throw<Exception>();
9999
}
100100

101101
[Test]
@@ -109,7 +109,7 @@ public void ModelAs_Null_ShouldFail()
109109
result.Should().BePartialViewResult().ModelAs<Object>();
110110
};
111111

112-
a.ShouldThrow<Exception>()
112+
a.Should().Throw<Exception>()
113113
.WithMessage(failureMessage);
114114
}
115115
}

tests/FluentAssertions.Mvc.Tests.Shared/RedirectResultAssertions_Tests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void WithUrl_GivenUnexpectedUrl_ShouldFail()
2727

2828
Action a = () => result.Should().BeRedirectResult()
2929
.WithUrl("/xyz");
30-
a.ShouldThrow<Exception>()
30+
a.Should().Throw<Exception>()
3131
.WithMessage("Expected RedirectResult.Url to be \"/xyz\" but was \"/abc\"");
3232
}
3333

@@ -47,7 +47,7 @@ public void WithPermanent_GivenUnexpectedUrl_ShouldFail()
4747

4848
Action a = () => result.Should().BeRedirectResult()
4949
.WithPermanent(false);
50-
a.ShouldThrow<Exception>()
50+
a.Should().Throw<Exception>()
5151
.WithMessage("Expected RedirectResult.Permanent to be False but was True");
5252
}
5353
}

0 commit comments

Comments
 (0)