Skip to content

Commit 2331581

Browse files
committed
Make RabbitServer's Queues and Exchanges public.
Consequently make other types public that would otherwise result in compile errors due to inconsistent visibilities. The motivation for this is that without exposing the server's Queues and Exchanges, it's impossible (or at least impractical to the point where I don't understand how) to assert about state in unit tests, which renders the library unusable for its intended purpose.
1 parent c1cc51c commit 2331581

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/AddUp.FakeRabbitMQ/RabbitExchange.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace AddUp.RabbitMQ.Fakes
66
{
7-
internal sealed class RabbitExchange
7+
public sealed class RabbitExchange
88
{
99
private readonly IBindingMatcher matcher;
1010
private readonly RabbitServer server;

src/AddUp.FakeRabbitMQ/RabbitExchangeQueueBinding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace AddUp.RabbitMQ.Fakes
22
{
3-
internal sealed class RabbitExchangeQueueBinding
3+
public sealed class RabbitExchangeQueueBinding
44
{
55
public string RoutingKey { get; set; }
66
public RabbitExchange Exchange { get; set; }

src/AddUp.FakeRabbitMQ/RabbitMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace AddUp.RabbitMQ.Fakes
44
{
5-
internal sealed class RabbitMessage
5+
public sealed class RabbitMessage
66
{
77
public string Exchange { get; set; }
88
public string RoutingKey { get; set; }

src/AddUp.FakeRabbitMQ/RabbitQueue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace AddUp.RabbitMQ.Fakes
66
{
7-
internal sealed class RabbitQueue
7+
public sealed class RabbitQueue
88
{
99
private readonly HashSet<EventHandler<RabbitMessage>> messagePublishedEventHandlers;
1010

src/AddUp.FakeRabbitMQ/RabbitServer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ public RabbitServer()
1010
Queues = new ConcurrentDictionary<string, RabbitQueue>();
1111
}
1212

13-
internal ConcurrentDictionary<string, RabbitExchange> Exchanges { get; }
14-
internal ConcurrentDictionary<string, RabbitQueue> Queues { get; }
15-
13+
public ConcurrentDictionary<string, RabbitExchange> Exchanges { get; }
14+
public ConcurrentDictionary<string, RabbitQueue> Queues { get; }
15+
1616
public void Reset()
1717
{
1818
Exchanges.Clear();

0 commit comments

Comments
 (0)