AspNetCore.Docs/aspnetcore/mvc/controllers
mwvdev 87617ec2ea Fixed an extra bracket in test method (#3740)
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.
2017-07-17 07:58:06 -06:00
..
application-model/sample Working with the Application Model (#2280) 2016-12-23 09:42:32 -08:00
dependency-injection Add docfx content 2016-10-28 10:35:15 -07:00
filters Migrate Filters doc sample code to CSPROJ (#3187) 2017-04-07 17:14:40 -10:00
routing Add docfx content 2016-10-28 10:35:15 -07:00
testing/sample/TestingControllersSample Testing controllers fix (#3218) 2017-04-13 14:36:56 -04:00
actions.md Fixes #1435 2017-07-05 22:30:23 -05:00
application-model.md remove | MS Docs (#3612) 2017-06-30 23:47:15 +00:00
areas.md remove | MS Docs (#3612) 2017-06-30 23:47:15 +00:00
dependency-injection.md remove | MS Docs (#3612) 2017-06-30 23:47:15 +00:00
filters.md remove | MS Docs (#3612) 2017-06-30 23:47:15 +00:00
index.md mvc toc restructure (#2482) 2017-01-14 13:59:26 -08:00
routing.md Fix markdown in code samples (#3643) 2017-07-06 08:53:44 -06:00
testing.md Fixed an extra bracket in test method (#3740) 2017-07-17 07:58:06 -06:00