Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/Chapter10.Tests/Listing10.12.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ public class TextNumberParserTests
[TestMethod]
public void Main_HospitalEmergencyCodes_DisplaysCodes()
{
const string expected =
@"info: Console[0]
Hospital Emergency Codes: = 'black', 'blue', 'brown', 'CBR', 'orange', 'purple', 'red', 'yellow'
warn: Console[0]
This is a test of the emergency...
";
string expected =
$"""
info: { typeof(Program).FullName }[0]
Hospital Emergency Codes: = 'black', 'blue', 'brown', 'CBR', 'orange', 'purple', 'red', 'yellow'
warn: { typeof(Program).FullName }[0]
This is a test of the emergency...

""";

Action act = () => Program.Main(new[]
{
Expand Down
3 changes: 1 addition & 2 deletions src/Chapter10/Listing10.12.LeveragingADifferentLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public static void Main(string[] args)
LoggerFactory.Create(builder =>
builder.AddConsole().AddDebug());

ILogger logger = loggerFactory.CreateLogger(
categoryName: "Console");
ILogger logger = loggerFactory.CreateLogger<Program>();

logger.LogInformation($@"Hospital Emergency Codes: = '{
string.Join("', '", args)}'");
Expand Down