예제 #1
0
        private async Task RunTest(Func <RabbitMq.Client.Configuration.ISettings, RabbitMq.Common.Connection.IFactory, RabbitMq.Client.Endpoint, Task> test)
        {
            RabbitMq.Client.Configuration.ISettings settings = A.Fake <RabbitMq.Client.Configuration.ISettings>();
            A.CallTo(() => settings.ExchangeName).Returns(ExchangeName);

            RabbitMq.Common.Connection.IFactory connectionFactory = A.Fake <RabbitMq.Common.Connection.IFactory>();

            RabbitMq.Common.Routing.IKey key  = new RabbitMq.Common.Routing.Key();
            RabbitMq.Common.Queue.IName  name = new RabbitMq.Common.Queue.Name();

            RabbitMq.Client.Endpoint endpoint = new RabbitMq.Client.Endpoint(settings, connectionFactory, key, name);

            await test(settings, connectionFactory, endpoint);
        }
예제 #2
0
        private async Task RunTest(Func<RabbitMq.Client.Configuration.ISettings, RabbitMq.Common.Connection.IFactory, RabbitMq.Client.Endpoint, Task> test)
        {
            RabbitMq.Client.Configuration.ISettings settings = A.Fake<RabbitMq.Client.Configuration.ISettings>();
            A.CallTo(() => settings.ExchangeName).Returns(ExchangeName);

            RabbitMq.Common.Connection.IFactory connectionFactory = A.Fake<RabbitMq.Common.Connection.IFactory>();

            RabbitMq.Common.Routing.IKey key = new RabbitMq.Common.Routing.Key();
            RabbitMq.Common.Queue.IName name = new RabbitMq.Common.Queue.Name();

            RabbitMq.Client.Endpoint endpoint = new RabbitMq.Client.Endpoint(settings, connectionFactory, key, name);

            await test(settings, connectionFactory, endpoint);
        }