The existing code sample implies that the user can access the result of the action method in `context.Result`, but that is not the case. User needs to capture the result of the `next` delegate in order to access this info.
* Create mvc2.md
Added temp file to house doc requested in #3809
* Initial outline of document
* Added Note for Special Tooling (VS 2017 Preview 3)
Will remove when Preview 3 is updated into Release
* Added Porting Link
* Added Core DI Sample
* added DI Section
* Added Storing Configuration Settings Section
* Adding Custom Settings samples
* part of static content
* static content section
* .net standard section
* Adding Edit in VS 2017 Image
* Samples for Startup
* startup and csproj section
* update image reference
* Updates to Migration Doc
changes per @scottaddie
* Final round of changes
Please review
* Edits
* Fix invalid xref link
* More edits
* More edits
* More edits
* More edits
* More edits
* More edits
* Move Content to different directory
* Update Code Sample Links
* change sample location
* ::
* Update Sample Filenames
* Minor edit
* Remove extra space
* More edits
* Move Static Folder
* update reference to image
* Update mvc2.md
* Minor tweaks
* Changes to sample file
* Change copy for Configuration Section
* Fix code formatting
* Remove extra line feed
* Remove extra line feed
* Fix 3xx/4xx/5xx Status Codes in aspnetcore folder
* Take out locality references in urls:
* change MSDN urls to docs.microsoft if possible
* Update aspnet-core-module.md
* Update iis.md
* Remove localization from external links
* Update TestingControllerSample app
Addresses #1950
Updates
Updates
Updates
Updates
Update
Updates
Updates
Update
Update
* Drop test packages back to latest stable
* Test proj update
* Close a void element
The source listing of the GetTestSessions method of [Testing Controller Logic](https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/testing) included an end bracket due to an offset error in the line numbers:
```cs
[Fact]
public async Task Index_ReturnsAViewResult_WithAListOfBrainstormSessions()
{
// Arrange
var mockRepo = new Mock<IBrainstormSessionRepository>();
mockRepo.Setup(repo => repo.ListAsync()).Returns(Task.FromResult(GetTestSessions()));
var controller = new HomeController(mockRepo.Object);
// Act
var result = await controller.Index();
// Assert
var viewResult = Assert.IsType<ViewResult>(result);
var model = Assert.IsAssignableFrom<IEnumerable<StormSessionViewModel>>(
viewResult.ViewData.Model);
Assert.Equal(2, model.Count());
}
}
private List<BrainstormSession> GetTestSessions()
{
var sessions = new List<BrainstormSession>();
sessions.Add(new BrainstormSession()
{
DateCreated = new DateTime(2016, 7, 2),
Id = 1,
Name = "Test One"
});
sessions.Add(new BrainstormSession()
{
DateCreated = new DateTime(2016, 7, 1),
Id = 2,
Name = "Test Two"
});
return sessions;
}
```
This has been fixed by increasing the starting offset by one.
* Upgraded to VS2017 project
Trying to fix MVC view-based tests.
* modified project to get tests working
* Uncomment asserts
* Clean up console writeline