コード例 #1
0
        public void SeveralDisposeCallsNotThrowsException()
        {
            RichQueue <int> richQueue = new RichQueue <int>();

            richQueue.Dispose();
            richQueue.Dispose();
        }
コード例 #2
0
        public void PushThrowsOnDisposedObject()
        {
            RichQueue <int> richQueue = new RichQueue <int>();

            richQueue.Dispose();

            Assert.Catch <ObjectDisposedException>(() => richQueue.Push(5));
        }
コード例 #3
0
        public void CountThrowsOnDisposedObject()
        {
            RichQueue <int> richQueue = new RichQueue <int>();

            richQueue.Push(5);
            richQueue.Dispose();

            Assert.Catch <ObjectDisposedException>(() =>
            {
                var count = richQueue.Count;
            });
        }