Beispiel #1
0
        public void TestCreateUnstarted()
        {
            var sw = Stopwatches.Create();

            sw.IsRunning.Should().BeFalse();
            sw.Elapsed.ShouldBeEquivalentTo(TimeSpan.Zero);
        }
Beispiel #2
0
        public void TestEmptyCreateShouldUseSystemStopwatch()
        {
            var sw = Stopwatches.Create();

            sw.Should().BeOfType <TickerBackedStopwatch>()
            .Which.Ticker
            .Should().BeOfType <SystemStopwatchBackedTicker>();
        }
Beispiel #3
0
 public StopwatchTests()
 {
     ticker    = new FakeTicker();
     stopwatch = Stopwatches.Create(ticker);
 }