Esempio n. 1
0
        public void Dispose_CanBeCalledMultipleTimes()
        {
            var entity = new TopicEntity("f", new[] { "g" });

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

            Should.NotThrow(() =>
            {
                entity.Dispose();
                entity.Dispose();
            });
        }
Esempio n. 2
0
        public void Post_Throws_WhenObjectDisposed()
        {
            var entity = new TopicEntity("a", new string[0]);

            entity.Dispose();

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