Example #1
0
 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);
        }
Example #4
0
 public void DoSetup()
 {
     mFuture = new ResultFuture <int>();
 }
Example #5
0
 public void DoSetup()
 {
     mFuture = new ResultFuture<int>();
 }