public void Dispose_CanBeCalledMultipleTimes() { var entity = new TopicEntity("f", new[] { "g" }); entity.Post(new Amqp.Message()); Should.NotThrow(() => { entity.Dispose(); entity.Dispose(); }); }
public void Post_Throws_WhenObjectDisposed() { var entity = new TopicEntity("a", new string[0]); entity.Dispose(); Should.Throw <ObjectDisposedException>(() => entity.Post(new Amqp.Message())); }