public void ItShouldBeResumedByDefault() { // Given var breakpoint = new Breakpoint(); int state = 0; // When Task.Run(() => { state++; breakpoint.WaitIfPaused(); state++; }); breakpoint.WaitForPause(); Thread.Sleep(100); // Then Assert.AreEqual(2, state); }