Beispiel #1
0
        public void Dispose_CanBeCalledMultipleTimes()
        {
            var entity = new QueueEntity("s");

            entity.Post(new Amqp.Message());

            Should.NotThrow(() =>
            {
                entity.Dispose();
                entity.Dispose();
                entity.Dispose();
            });
        }
Beispiel #2
0
        public void Post_Throws_WhenObjectDisposed()
        {
            var entity = new QueueEntity("s");

            entity.Dispose();

            Should.Throw <ObjectDisposedException>(() => entity.Post(new Amqp.Message()));
        }