Skip to content

Commit

Permalink
Un-ignore test
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminMichaelis committed Nov 4, 2023
1 parent f226390 commit 730b218
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
26 changes: 10 additions & 16 deletions src/Chapter19.Tests/Listing19.07.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,18 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter19.Listing19_07.Tests;
[TestClass]
public class ProgramTests
{
[TestMethod][Ignore]
[TestMethod]
public void ValueTaskAsyncReturnTest()
{
string expected = @"3:0047:Throwing exception.
3:0052:Unhandled exception handler starting.
3:0055:Sleeping for 4000 ms
1:0058:Sleeping for 2000 ms
1:2059:Awake
1:2060:Finally block running.
3:4059:Awake
Unhandled Exception: System.Exception: Exception of type 'System.Exception' was thrown.
";

IntelliTect.TestTools.Console.ConsoleAssert.Expect(expected,
() =>
{
Program.Main();
});
string expected =
@"*:*:Sleeping for 2000 ms
*:*:Throwing exception.
*:*:Event handler starting
*:*:Sleeping for 4000 ms
*:*:Awake
*:*:Finally block running.";

IntelliTect.TestTools.Console.ConsoleAssert.ExpectLike(expected,
Program.Main);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void Delay(int i)
static void Message(string text)
{
Console.WriteLine("{0}:{1:0000}:{2}",
Thread.CurrentThread.ManagedThreadId,
Environment.CurrentManagedThreadId,
Clock.ElapsedMilliseconds, text);
}
}
Expand Down

0 comments on commit 730b218

Please sign in to comment.