Skip to content

Commit

Permalink
(#71) Remove QueueingBasicConsumer
Browse files Browse the repository at this point in the history
  • Loading branch information
par.dahlman committed Mar 16, 2016
1 parent b8163fb commit 4969db2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 127 deletions.
53 changes: 0 additions & 53 deletions src/RawRabbit/Consumer/Queueing/QueueingBaiscConsumerFactory.cs

This file was deleted.

34 changes: 0 additions & 34 deletions src/RawRabbit/Consumer/Queueing/QueueingRawConsumer.cs

This file was deleted.

40 changes: 0 additions & 40 deletions test/RawRabbit.IntegrationTests/SimpleUse/RpcTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using RawRabbit.Configuration;
using RawRabbit.Consumer.Abstraction;
using RawRabbit.Consumer.Queueing;
using RawRabbit.IntegrationTests.TestMessages;
using RawRabbit.vNext;
using Xunit;
Expand Down Expand Up @@ -146,42 +142,6 @@ public async Task Should_Successfully_Perform_Nested_Requests()
Assert.Equal(expected: payload, actual: response.Infered);
}

[Fact]
public async Task Should_Work_With_Queueing_Consumer_Factory()
{
/* Setup */
var response = new BasicResponse { Prop = "This is the response." };
var requester = BusClientFactory.CreateDefault();

var responder = BusClientFactory.CreateDefault(service => service.AddTransient<IConsumerFactory, QueueingBaiscConsumerFactory>());
responder.RespondAsync<BasicRequest, BasicResponse>((req, i) => Task.FromResult(response));

/* Test */
var recieved = await requester.RequestAsync<BasicRequest, BasicResponse>();

/* Assert */
Assert.Equal(expected: response.Prop, actual: recieved.Prop);
}

[Fact]
public async Task Should_Work_With_Different_Request_Types_For_Same_Responder()
{
/* Setup */
var requester = BusClientFactory.CreateDefault();
var responder = BusClientFactory.CreateDefault(service => service.AddTransient<IConsumerFactory, QueueingBaiscConsumerFactory>());

responder.RespondAsync<FirstRequest, FirstResponse>((req, i) => Task.FromResult(new FirstResponse()));
responder.RespondAsync<SecondRequest, SecondResponse>((req, i) => Task.FromResult(new SecondResponse()));

/* Test */
var firstResponse = await requester.RequestAsync<FirstRequest, FirstResponse>();
var secondResponse = await requester.RequestAsync<SecondRequest, SecondResponse>();

/* Assert */
Assert.NotNull(firstResponse);
Assert.NotNull(secondResponse);
}

[Fact]
public async Task Should_Work_When_Not_Awaiting_One_Response_At_A_Time()
{
Expand Down

0 comments on commit 4969db2

Please sign in to comment.