Skip to content

Commit 715a474

Browse files
authored
Merge pull request #66 from nbarbettini/small-updates
Small updates
2 parents f4054c0 + 6957053 commit 715a474

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

chapters/automated-testing/integration-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Integration tests are slower and more involved than unit tests, so it's common f
66

77
In order to test the whole stack (including controller routing), integration tests typically make HTTP calls to your application just like a web browser would.
88

9-
To write integration tests that make HTTP requests, you could manually start your application and tests at the same time, and write your tests to make requests to `http://localhost:5000`. ASP.NET Core provides a nicer way to host your application for testing, however: the `TestServer` class. `TestServer` can host your application for the duration of the test, and then stop it automatically when the test is complete.
9+
To perform an integration test, you could start your application and manually make requests to http://localhost:5000. However, ASP.NET Core provides a better alternative: the `TestServer` class. This class can host your application for the duration of the test, and then stop it automatically when the test is complete.
1010

1111
### Create a test project
1212

chapters/conclusion/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ To Jennifer, who always supports my crazy ideas.
3737
To the following contributors who improved the Little ASP.NET Core Book:
3838

3939
* 0xNF
40-
* Matt Welke
40+
* Matt Welke (welke)
41+
* Raman Zhylich (zhilich)
4142

4243
To these amazing polyglot programmers who translated the Little ASP.NET Core Book:
4344

@@ -50,6 +51,8 @@ The full, detailed changelog is always available here:
5051

5152
https://github.com/nbarbettini/little-aspnetcore-book/releases
5253

54+
**1.1.1** (2018-06-11): Fixed typos found by readers.
55+
5356
**1.1.0** (2018-05-03): Significantly reworked the *Add more features* chapter to use MVC thorough the whole stack and remove the AJAX pattern. Removed Facebook login to simplify the security chapter and streamline testing and deployment. Updated the Docker instructions to reflect the latest best practices. Fixed typos and added suggestions from readers. The book also sports a new, improved cover design!
5457

5558
**1.0.4** (2018-01-15): Added explanation of service container lifecycles, clarified server ports and the -o flag, and removed semicolons after Razor directives. Corrected Chinese translation author credit. Fixed other small typos and issues noticed by readers.

chapters/security-and-identity/authorization-with-roles.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Create a new class in the root of the project called `SeedData`:
146146

147147
```csharp
148148
using System;
149+
using System.Linq;
149150
using System.Threading.Tasks;
150151
using AspNetCoreTodo.Models;
151152
using Microsoft.AspNetCore.Identity;
@@ -301,7 +302,7 @@ You can inject the `UserManager` directly into a view to do these types of autho
301302

302303
@if (signInManager.IsSignedIn(User))
303304
{
304-
var currentUser = await UserManager.GetUserAsync(User);
305+
var currentUser = await userManager.GetUserAsync(User);
305306

306307
var isAdmin = currentUser != null
307308
&& await userManager.IsInRoleAsync(

chapters/use-a-database/create-service-class.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ namespace AspNetCoreTodo.Services
2828

2929
public async Task<TodoItem[]> GetIncompleteItemsAsync()
3030
{
31-
return await _context.Items
31+
var items = await _context.Items
3232
.Where(x => x.IsDone == false)
3333
.ToArrayAsync();
34+
return items;
3435
}
3536
}
3637
}

0 commit comments

Comments
 (0)