public void Dispose_CanBeCalledMultipleTimes() { var entity = new QueueEntity("s"); entity.Post(new Amqp.Message()); Should.NotThrow(() => { entity.Dispose(); entity.Dispose(); entity.Dispose(); }); }
public void Post_Throws_WhenObjectDisposed() { var entity = new QueueEntity("s"); entity.Dispose(); Should.Throw <ObjectDisposedException>(() => entity.Post(new Amqp.Message())); }