Beispiel #1
0
        public void SeveralDisposeCallsNotThrowsException()
        {
            RichQueue <int> richQueue = new RichQueue <int>();

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

            richQueue.Dispose();

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

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

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