public void testAlreadyStopped() { var isOpen = true; var logger = new Mock<ILog>(MockBehavior.Strict); TsdTimer timer = new TsdTimer("timerName", isOpen, logger.Object); timer.Stop(); logger.Setup(l => l.Error(It.IsAny<Action<Common.Logging.FormatMessageHandler>>())); timer.Stop(); logger.VerifyAll(); }
public void testIsStopped() { var isOpen = true; TsdTimer timer = new TsdTimer("timerName", isOpen); Assert.False(timer.IsStopped); timer.Stop(); Assert.True(timer.IsStopped); }