Ejemplo n.º 1
0
        public void PassivateBusyObjectsBeforeClose()
        {
            A.CallTo(() => factory.ValidateObject(A <object> ._)).WithAnyArguments().Returns(true);

            object o = pool.BorrowObject();

            pool.Close();
            A.CallTo(() => factory.PassivateObject(o)).MustHaveHappened();
        }
Ejemplo n.º 2
0
        public void PassivateBusyObjectsBeforeClose()
        {
            Expect.Call(factory.ValidateObject(null)).IgnoreArguments().Return(true).Repeat.Any();
            object o = pool.BorrowObject();

            factory.PassivateObject(o);
            mocks.ReplayAll();

            pool.Close();
            mocks.VerifyAll();
        }
 //// <example name="stop">
 public void Stop()
 {
     // waits for all the grep-task to have been queued ...
     foreach (ISync sync in syncs)
     {
         sync.Acquire();
     }
     pool.Close();
 }