diff --git a/README.md b/README.md
index 993080856..71281d07b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# EssentialCSharp
-[](https://github.com/IntelliTect/EssentialCSharp/actions/workflows/Branch%20v9.0.yml)
+[](https://github.com/IntelliTect/EssentialCSharp/actions/workflows/Branch%20v9.0.yml)
This project contains the source code for the book **Essential C#** by Mark Michaelis (Addison-Wesley).
diff --git a/src/Chapter03.Tests/Chapter03.Tests.csproj b/src/Chapter03.Tests/Chapter03.Tests.csproj
index ce049bb6b..3a2d5b05d 100644
--- a/src/Chapter03.Tests/Chapter03.Tests.csproj
+++ b/src/Chapter03.Tests/Chapter03.Tests.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/src/Chapter03.Tests/Listing03.02.DereferencingAnUnassignedVariable.Tests.cs b/src/Chapter03.Tests/Listing03.02.DereferencingAnUnassignedVariable.Tests.cs
index 78ca8a3d2..c9e3c2fad 100644
--- a/src/Chapter03.Tests/Listing03.02.DereferencingAnUnassignedVariable.Tests.cs
+++ b/src/Chapter03.Tests/Listing03.02.DereferencingAnUnassignedVariable.Tests.cs
@@ -14,9 +14,9 @@ public class UppercaseTests
[TestMethod]
async public Task UnassignedVariableThrowsError()
{
- CompileError[] compileErrors = await CompilerAssert.ExpectErrorsInFileAsync(
+ _ = await CompilerAssert.ExpectErrorsInFileAsync(
"Listing03.02.DereferencingAnUnassignedVariable.cs",
- new CompileError("CS0165: Use of unassigned local variable 'text'"));
+ new CompileError("CS0165", "Use of unassigned local variable 'text'"));
}
}
}
diff --git a/src/Shared/CompilerAssert.cs b/src/Shared/CompilerAssert.cs
index 8cd360daf..2710ea5c4 100644
--- a/src/Shared/CompilerAssert.cs
+++ b/src/Shared/CompilerAssert.cs
@@ -105,16 +105,10 @@ async static public Task ExpectErrorsAsync(
for (int i = 0; i < actualCompileErrors.Length; i++)
{
// Compare Id's first as that is more meaningful.
- Assert.AreEqual(diagnostics[i].Message, actualCompileErrors[i].Message,
- $"The expected Messages do not match for item {i}: " +
- $"{diagnostics[i].Message} <> {diagnostics[i].Message}");
Assert.AreEqual(diagnostics[i].Id, actualCompileErrors[i].Id,
$"The expected Ids do not match for item {i}: " +
- $"{diagnostics[i].Id} <> {actualCompileErrors[i].Id}");
+ $"{diagnostics[i].Id}: {diagnostics[i].Message} <> {actualCompileErrors[i].Id}: {actualCompileErrors[i].Message}");
}
- //CollectionAssert.AreEquivalent(
- // diagnostics,
- // actualCompileErrors.ToList());
}
return actualCompileErrors;
}