public void UnderlyingConnection_WithConnection_ReturnsConnection()
        {
            // Arrange
            var factory = new FakeConnectionFactory();
            var connection = new FakeConnection(new RabbitServer());
            factory.WithConnection(connection);

            // Act
            var result = factory.UnderlyingConnection;

            // Assert
            Assert.That(result, Is.SameAs(connection));
        }
        public void WithConnection_WhenSet_SetsTheUnderlyingConnection()
        {
            // Arrange
            var factory = new FakeConnectionFactory();

            var connection = new FakeConnection(new RabbitServer());

            // Act
            factory.WithConnection(connection);

            // Assert
            Assert.That(factory.Connection,Is.SameAs(connection));
        }
Beispiel #3
0
        public void WithConnection_WhenSet_SetsTheUnderlyingConnection()
        {
            // Arrange
            var factory = new FakeConnectionFactory();

            var connection = new FakeConnection(new RabbitServer());

            // Act
            factory.WithConnection(connection);

            // Assert
            Assert.That(factory.Connection, Is.SameAs(connection));
        }
Beispiel #4
0
        public void UnderlyingConnection_WithConnection_ReturnsConnection()
        {
            // Arrange
            var factory    = new FakeConnectionFactory();
            var connection = new FakeConnection(new RabbitServer());

            factory.WithConnection(connection);

            // Act
            var result = factory.UnderlyingConnection;

            // Assert
            Assert.That(result, Is.SameAs(connection));
        }