Swapped modifier order
MODIFY
src/Chapter03.Tests/Listing03.02.DereferencingAnUnassignedVariable.Tests.cs
src/Chapter03.Tests/Listing03.02.DereferencingAnUnassignedVariable.Tests.cs
@@ -12,7 +12,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter03.Listing03_02.Tests
public TestContext? TestContext { get; set; }
[TestMethod]
- async public Task UnassignedVariableThrowsError()
+ public async Task UnassignedVariableThrowsError()
{
_ = await CompilerAssert.ExpectErrorsInFileAsync(
"Listing03.02.DereferencingAnUnassignedVariable.cs",

MODIFY
src/Chapter06.Tests/Listing06.15.Tests.cs
src/Chapter06.Tests/Listing06.15.Tests.cs
@@ -8,7 +8,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter06.Listing06_15.Tests
public class ProgramTests
{
[TestMethod]
- async public Task UnassignedVariableThrowsError()
+ public async Task UnassignedVariableThrowsError()
{
_ = await CompilerAssert.ExpectErrorsInFileAsync(
"Listing06.15.UsingThePrivateAccessModifier.cs",

MODIFY
src/Chapter06.Tests/Listing06.21.Tests.cs
src/Chapter06.Tests/Listing06.21.Tests.cs
@@ -7,7 +7,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter06.Listing06_21.Tests
public class ProgramTests
{
[TestMethod]
- async public Task UnassignedVariableThrowsError()
+ public async Task UnassignedVariableThrowsError()
{
_ = await CompilerAssert.ExpectErrorsInFileAsync(
"Listing06.21.DefiningReadOnlyProperties.cs",

MODIFY
src/Chapter06.Tests/Listing06.23.Tests.cs
src/Chapter06.Tests/Listing06.23.Tests.cs
@@ -7,7 +7,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter06.Listing06_23.Tests
public class ProgramTests
{
[TestMethod]
- async public Task UnassignedVariableThrowsError()
+ public async Task UnassignedVariableThrowsError()
{
_ = await CompilerAssert.ExpectErrorsInFileAsync(
"Listing06.23.PlacingAccessModifiersOnSetters.cs",

MODIFY
src/Chapter06.Tests/Listing06.28.Tests.cs
src/Chapter06.Tests/Listing06.28.Tests.cs
@@ -8,7 +8,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter06.Listing06_28.Tests
{
[TestMethod]
[Ignore]
- async public Task UnassignedVariableThrowsError()
+ public async Task UnassignedVariableThrowsError()
{
await CompilerAssert.Compile2Async(
new string[] { "Listing06.28.DefaultConstructorNoLongerAvailable.cs", "Listing06.26.DefiningAConstructor.cs" },

MODIFY
src/Chapter09.Tests/Listing09.02.ReadOnlyMembers.Tests.cs
src/Chapter09.Tests/Listing09.02.ReadOnlyMembers.Tests.cs
@@ -11,7 +11,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter09.Listing09_02.Tests
public class MyTestClass
{
[TestMethod]
- async public Task ReadOnlyMethod_ModifyObject_ErrorReported()
+ public async Task ReadOnlyMethod_ModifyObject_ErrorReported()
{
string thingCode = @"
public struct Thing

MODIFY
src/Chapter20.Tests/BaseProgramTests.cs
src/Chapter20.Tests/BaseProgramTests.cs
@@ -114,7 +114,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Tests
[TestMethod]
[ExpectedException(typeof(System.ArgumentNullException))]
- async public Task Main_GivenNullUri_ThrowException()
+ public async Task Main_GivenNullUri_ThrowException()
{
try
{
@@ -144,7 +144,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Tests
[DataRow("https://bad uri", "The filename, directory name, or volume label syntax is incorrect. *", "Could not find a part of the path*", "Could not find a part of the path*")]
[DataRow("https://thisisanotherbadurlthatpresumablyldoesnotexist.notexist", "No such host is known.*", "nodename nor servname provided, or not known*", "Name or service not known*")]
[ExpectedException(typeof(WebException))]
- async public Task Main_GivenBadUri_ThrowException(string uri, string defaultMessagePrefix, string? messagePrefixOSX = null, string? messagePrefixLinux = null)
+ public async Task Main_GivenBadUri_ThrowException(string uri, string defaultMessagePrefix, string? messagePrefixOSX = null, string? messagePrefixLinux = null)
{
messagePrefixOSX ??= defaultMessagePrefix;
messagePrefixLinux ??= defaultMessagePrefix;

MODIFY
src/Chapter20.Tests/ProgramWrapper.cs
src/Chapter20.Tests/ProgramWrapper.cs
@@ -13,7 +13,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Tests
MainMethod = mainMethod;
}
- async public Task Main(string[] args)
+ public async Task Main(string[] args)
{
await MainMethod(args);
}

Swapped modifier order