@@ -50,51 +50,51 @@ public void releaseResources() throws IOException {
5050 channel .exchangeDelete (NAME );
5151 }
5252
53- public static void verifyEquivalent (Channel channel , String name ,
53+ public static void verifyEquivalent (BrokerTestCase btc , String name ,
5454 String type , boolean durable , boolean autoDelete ,
5555 Map <String , Object > args ) throws IOException {
56- channel .exchangeDeclarePassive (name );
57- channel .exchangeDeclare (name , type , durable , autoDelete , args );
56+ btc . channel .exchangeDeclarePassive (name );
57+ btc . channel .exchangeDeclare (name , type , durable , autoDelete , args );
5858 }
5959
6060 // Note: this will close the channel
61- public void verifyNotEquivalent (Channel channel , String name ,
61+ public static void verifyNotEquivalent (BrokerTestCase btc , String name ,
6262 String type , boolean durable , boolean autoDelete ,
6363 Map <String , Object > args ) throws IOException {
64- channel .exchangeDeclarePassive (name );
64+ btc . channel .exchangeDeclarePassive (name );
6565 try {
66- channel .exchangeDeclare (name , type , durable , autoDelete , args );
66+ btc . channel .exchangeDeclare (name , type , durable , autoDelete , args );
6767 fail ("Exchange was supposed to be not equivalent" );
6868 } catch (IOException ioe ) {
69- checkShutdownSignal (AMQP .NOT_ALLOWED , ioe );
69+ btc . checkShutdownSignal (AMQP .NOT_ALLOWED , ioe );
7070 return ;
7171 }
7272 }
7373
7474 public void testExchangeNoArgsEquivalence () throws IOException {
7575 channel .exchangeDeclare (NAME , TYPE , false , false , null );
76- verifyEquivalent (channel , NAME , TYPE , false , false , null );
76+ verifyEquivalent (this , NAME , TYPE , false , false , null );
7777 }
7878
7979 public void testExchangeNonsenseArgsEquivalent () throws IOException {
8080 channel .exchangeDeclare (NAME , TYPE , false , false , null );
8181 Map <String , Object > args = new HashMap <String , Object >();
8282 args .put ("nonsensical-argument-surely-not-in-use" , "foo" );
83- verifyEquivalent (channel , NAME , TYPE , false , false , args );
83+ verifyEquivalent (this , NAME , TYPE , false , false , args );
8484 }
8585
8686 public void testExchangeDurableNotEquivalent () throws IOException {
8787 channel .exchangeDeclare (NAME , TYPE , false , false , null );
88- verifyNotEquivalent (channel , NAME , TYPE , true , false , null );
88+ verifyNotEquivalent (this , NAME , TYPE , true , false , null );
8989 }
9090
9191 public void testExchangeTypeNotEquivalent () throws IOException {
9292 channel .exchangeDeclare (NAME , "direct" , false , false , null );
93- verifyNotEquivalent (channel , NAME , "fanout" , false , false , null );
93+ verifyNotEquivalent (this , NAME , "fanout" , false , false , null );
9494 }
9595
9696 public void testExchangeAutoDeleteNotEquivalent () throws IOException {
9797 channel .exchangeDeclare (NAME , "direct" , false , false , null );
98- verifyNotEquivalent (channel , NAME , "direct" , false , true , null );
98+ verifyNotEquivalent (this , NAME , "direct" , false , true , null );
9999 }
100100}
0 commit comments