@@ -168,7 +168,7 @@ namespace MyApp.Tests.Controllers
168168 .Controller <HomeController >()
169169 .Calling (c => c .Index ())
170170 .ShouldReturn ()
171- .View ();
171+ .Ok ();
172172 }
173173}
174174```
@@ -286,7 +286,7 @@ MyController<MyMvcController>
286286 .Passing (cacheModel => cacheModel .Id == 1 )))
287287 .AndAlso ()
288288 .ShouldReturn ()
289- .View (result => result
289+ .Ok (result => result
290290 .WithModelOfType <MyResponseModel >());
291291
292292// Instantiates controller with the registered global services,
@@ -316,7 +316,7 @@ MyController<MyMvcController>
316316 .ContainingEntryWithKey (ControllerConstants .SuccessMessage ))
317317 .AndAlso ()
318318 .ShouldReturn ()
319- .Redirect (redirect => redirect
319+ .Redirect (result => result
320320 .To <AnotherController >(c => c .AnotherAction ()));
321321```
322322
@@ -337,7 +337,7 @@ MyController<MyMvcController>
337337 From .Services <IYetAnotherService >()) // Provides a global service.
338338 .Calling (c => c .MyAction ())
339339 .ShouldReturn ()
340- .View ();
340+ .Accepted ();
341341
342342// Instantiates controller with the provided service mocks,
343343// and tests for view result.
@@ -494,7 +494,7 @@ MyMvc
494494
495495 // Assert
496496 .ShouldReturn ()
497- .Redirect (redirect => redirect
497+ .Redirect (result => result
498498 .To <AnotherController >(c => c .AnotherAction (
499499 With .No <MyDataContext >(),
500500 id )));
@@ -513,7 +513,7 @@ var call = controller.Calling(c => c.MyAction(id));
513513// Assert
514514call
515515 .ShouldReturn ()
516- .View ( view => view
516+ .Json ( result => result
517517 .WithModelOfType <MyModel >()
518518 .Passing (model => model .Id == id ));
519519```
@@ -570,9 +570,9 @@ MyMvc
570570 .WithDomain (" mydomain.com" )
571571 .WithExpiration (myDateTimeOffset )
572572 .WithPath (" /" )))
573- .AndAlso ()
573+ .AndAlso ()
574574 .ShouldReturn ()
575- .Ok ();
575+ .BadRequest ();
576576```
577577
578578## Versioning
0 commit comments