public void SetupBeforeEachTest() { this.connectionFactory = A.Fake<IConnectionFactory>(); this.logger = A.Fake<ILogger>(); this.settings = new RabbitMQChannelManagerSettings(); this.componentUnderTest = new RabbitMQChannelManager(this.connectionFactory, this.logger, this.settings); }
public void SetupBeforeEachTest() { this.connectionFactory = A.Fake<IConnectionFactory>(); this.logger = A.Fake<ILogger>(); this.settings = new RabbitMQChannelManagerSettings(); this.connection = A.Fake<IConnection>(); A.CallTo(() => this.connectionFactory.CreateConnection()).Returns(this.connection); this.componentUnderTest = new RabbitMQChannelManager(this.connectionFactory, this.logger, this.settings); }
public void ShouldNotDisposeOfConnectionDuringFinalise() { // CreateChannel will create the connection this.componentUnderTest.CreateChannel(); this.componentUnderTest = null; GC.Collect(); GC.WaitForPendingFinalizers(); A.CallTo(() => this.connection.Dispose()).MustNotHaveHappened(); }
public void ImplementIChannelManager() { var myComponentUnderTest = new RabbitMQChannelManager(this.connectionFactory, this.logger, this.settings); Assert.That(myComponentUnderTest, Is.InstanceOf<IChannelManager>()); }