public void TestDisposing() { mFuture.Dispose(); Assert.Throws<NullReferenceException>(() => mFuture.Set(15)); mFuture.Dispose(); mFuture = null; }
public void getFutureTimeout() { _log.Debug("Running: getFutureTimeout"); _future = new ResultFuture(); _future.Session = new Session(new byte[1]); DateTime start = DateTime.Now; Struct result = _future.Get(1000); Assert.IsTrue(DateTime.Now.Subtract(start).TotalMilliseconds >= 1000); Assert.IsNull(result); }
public void getFuture() { _log.Debug("Running: getFuture"); _future = new ResultFuture(); _future.Session = new Session(new byte[1]); Thread t = new Thread(Go); t.Start(); Struct result = _future.Get(2000); Assert.IsNotNull(result); }
public void DoSetup() { mFuture = new ResultFuture <int>(); }
public void DoSetup() { mFuture = new ResultFuture<int>(); }