public void CantCallDispatchAfterOnDisposedQueue() { var sq = new SerialQueue(invalidPool); sq.Dispose(); var hit = new List <int>(); AssertEx.Throws <ObjectDisposedException>(() => { sq.DispatchAfter(TimeSpan.FromMilliseconds(100), () => hit.Add(1)); }); }
public void CantCallDispatchAsyncOnDisposedQueue() { var sq = new SerialQueue(invalidPool); sq.Dispose(); var hit = new List <int>(); AssertEx.Throws <ObjectDisposedException>(() => { sq.DispatchAsync(() => hit.Add(1)); }); }