public void TestDefaultTickTimeout() { ExecutionQuantizer testInst = new ExecutionQuantizer(); Stopwatch sw = Stopwatch.StartNew(); testInst.Tick(100); sw.Stop(); Assert.IsTrue(sw.ElapsedMilliseconds > 50); }
public void TestDefaultTickCancellation() { ExecutionQuantizer testInst = new ExecutionQuantizer(); CancellationTokenSource cancSrc = new CancellationTokenSource(); cancSrc.CancelAfter(100); testInst.Tick(-1, cancSrc.Token); Assert.IsTrue(cancSrc.IsCancellationRequested); }
public void TestDefaultTick() { ExecutionQuantizer testInst = new ExecutionQuantizer(); testInst.Tick(); }