88
99namespace FluentAssertions . Mvc
1010{
11+ /// <summary>
12+ /// Contains a number of methods to assert that a <see cref="RedirectResult"/> is in the expected state.
13+ /// </summary>
1114 public class RedirectResultAssertions : ObjectAssertions
1215 {
16+ /// <summary>
17+ /// Initializes a new instance of the <see cref="T:RedirectResultAssertions" /> class.
18+ /// </summary>
1319 public RedirectResultAssertions ( RedirectResult subject ) : base ( subject ) { }
1420
15- public RedirectResultAssertions WithUrl ( string expectedUrl )
16- {
17- WithUrl ( expectedUrl , string . Empty , null ) ;
18- return this ;
19- }
20-
21- public RedirectResultAssertions WithUrl ( string expectedUrl , string reason , string reasonArgs )
21+ /// <summary>
22+ /// Asserts that the url is the expected url.
23+ /// </summary>
24+ /// <param name="expectedUrl">The expected url.</param>
25+ /// <param name="reason">
26+ /// A formatted phrase as is supported by <see cref="string.Format(string,object[])" /> explaining why the assertion
27+ /// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
28+ /// </param>
29+ /// <param name="reasonArgs">
30+ /// Zero or more objects to format using the placeholders in <see cref="reason" />.
31+ /// </param>
32+ public RedirectResultAssertions WithUrl ( string expectedUrl , string reason = "" , params object [ ] reasonArgs )
2233 {
2334 string actualUrl = ( Subject as RedirectResult ) . Url ;
2435
@@ -30,13 +41,18 @@ public RedirectResultAssertions WithUrl(string expectedUrl, string reason, strin
3041 return this ;
3142 }
3243
33- public RedirectResultAssertions WithPermanent ( bool expectedPermanent )
34- {
35- WithPermanent ( expectedPermanent , string . Empty , null ) ;
36- return this ;
37- }
38-
39- public RedirectResultAssertions WithPermanent ( bool expectedPermanent , string reason , string reasonArgs )
44+ /// <summary>
45+ /// Asserts that the redirect is permanent.
46+ /// </summary>
47+ /// <param name="expectedPermanent">Should the expected redirect be permanent.</param>
48+ /// <param name="reason">
49+ /// A formatted phrase as is supported by <see cref="string.Format(string,object[])" /> explaining why the assertion
50+ /// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
51+ /// </param>
52+ /// <param name="reasonArgs">
53+ /// Zero or more objects to format using the placeholders in <see cref="reason" />.
54+ /// </param>
55+ public RedirectResultAssertions WithPermanent ( bool expectedPermanent , string reason = "" , params object [ ] reasonArgs )
4056 {
4157 bool actualPermanent = ( Subject as RedirectResult ) . Permanent ;
4258
0 commit comments