public void TestScheduleManyHappyDelivery() { using var holder = new CounterHolder(500); scheduler.Schedule(scheduled, holder, TimeSpan.Zero, TimeSpan.FromMilliseconds(1)); holder.Completes(); Assert.Equal(500, holder.Counter); }
public void TestScheduleOnceOneHappyDelivery() { using var holder = new CounterHolder(1); _scheduler.ScheduleOnce(_scheduled, holder, TimeSpan.Zero, TimeSpan.FromMilliseconds(1)); holder.Completes(); Assert.Equal(1, holder.Counter); }