public async Task StartNow_ExecutesEventImmediately() { var timer = new FfsTimer(); timer.Elapsed += ActionToPerform; timer.StartNow(100000); timer.Stop(); _numberOfExecutions.Should().Be(1); }
public async Task StartNow_ExecutesFurtherEvents() { var timer = new FfsTimer(); timer.Elapsed += ActionToPerform; timer.StartNow(1000); await Task.Delay(1000); timer.Stop(); _numberOfExecutions.Should().Be(2); }