Skip to content

Commit 7e8aec7

Browse files
author
Matthew Sackman
committed
cosmetics
1 parent f7caa41 commit 7e8aec7

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

projects/client/Unit/src/unit/TestConsumerCancelNotify.cs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,15 @@
5050
using RabbitMQ.Client.Impl;
5151
using RabbitMQ.Util;
5252

53-
namespace RabbitMQ.Client.Unit
54-
{
53+
namespace RabbitMQ.Client.Unit {
5554
[TestFixture]
56-
public class TestConsumerCancelNotify
57-
{
55+
public class TestConsumerCancelNotify {
5856

5957
Object lockObject = new Object();
6058
bool notified = false;
6159

6260
[Test]
63-
public void TestConsumerCancelNotification()
64-
{
61+
public void TestConsumerCancelNotification() {
6562
string queue = "queue_consumer_notify";
6663
ConnectionFactory connFactory = new ConnectionFactory();
6764
IConnection conn = connFactory.CreateConnection();
@@ -71,10 +68,8 @@ public void TestConsumerCancelNotification()
7168
chan.BasicConsume(queue, false, consumer);
7269

7370
chan.QueueDelete(queue);
74-
lock (lockObject)
75-
{
76-
if (!notified)
77-
{
71+
lock (lockObject) {
72+
if (!notified) {
7873
Monitor.Wait(lockObject);
7974
}
8075
Assert.IsTrue(notified);
@@ -85,15 +80,12 @@ public class CancelNotificationConsumer : QueueingBasicConsumer
8580
{
8681
TestConsumerCancelNotify testClass;
8782

88-
public CancelNotificationConsumer(IModel model, TestConsumerCancelNotify tc) : base(model)
89-
{
83+
public CancelNotificationConsumer(IModel model, TestConsumerCancelNotify tc) : base(model) {
9084
this.testClass = tc;
9185
}
9286

93-
public override void HandleBasicCancel(string consumerTag)
94-
{
95-
lock (testClass.lockObject)
96-
{
87+
public override void HandleBasicCancel(string consumerTag) {
88+
lock (testClass.lockObject) {
9789
testClass.notified = true;
9890
Monitor.PulseAll(testClass.lockObject);
9991
}

0 commit comments

Comments
 (0)