Fix test overlap
MODIFY
src/Chapter20.Tests/Listing20.03.Tests.cs
src/Chapter20.Tests/Listing20.03.Tests.cs
@@ -8,11 +8,6 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_03.Tests
[TestClass]
public class ProgramTests : BaseProgramTests
{
- //public ProgramTests()
- //{
- // ClassInitialize(TestContext);
- //}
-
[ClassInitialize]
public static void ClassInitialize(TestContext _)
{
@@ -26,6 +21,6 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_03.Tests
BaseProgramTests.AssertMainException(messagePrefix, (AggregateException)exception);
}
- protected override string DefaultUrl { get; } = Program.DefaultUrl;
+ protected override string DefaultUrl => Program.DefaultUrl;
}
}

DELETE
src/Chapter20.Tests/Listing20.04.Tests.cs
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Tests;
-using System;
-
-namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_03.Tests
-{
- [TestClass]
- public class ProgramTests : BaseProgramTests
- {
- [ClassInitialize]
- static public void ClassInitialize(TestContext _)
- {
- ProgramWrapper = new ProgramWrapper(
- (string[] args)=> Program.Main(args));
- }
- protected override void AssertMainException(string messagePrefix, Exception exception)
- {
-
- System.Net.WebException webException = (System.Net.WebException)((AggregateException)exception).Flatten().InnerException!;
- AssertWebExceptionType(messagePrefix, webException);
- }
-
- protected override string DefaultUrl => Program.DefaultUrl;
- }
-}

Fix test overlap