Ejemplo n.º 1
0
        public void ItShouldPauseThread()
        {
            // Given
            var breakpoint = new Breakpoint();

            breakpoint.Pause();
            int state = 0;

            // When
            Task.Run(() =>
            {
                state++;
                breakpoint.WaitIfPaused();
                state++;
            });
            Thread.Sleep(100);

            // Then
            Assert.AreEqual(1, state);
        }