summaryrefslogtreecommitdiff
path: root/java/client/src
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2007-11-27 12:51:14 +0000
committerMartin Ritchie <ritchiem@apache.org>2007-11-27 12:51:14 +0000
commit2fb870a12430cebacabf97af06dc121d492865c2 (patch)
treed8c1b5fabc17d362da3d0299c4e4329afa66ee8f /java/client/src
parent41c1e1bdd0e42448f86d0dfa15ca7db65f020fee (diff)
downloadqpid-python-2fb870a12430cebacabf97af06dc121d492865c2.tar.gz
Renamed POMs to M2.1.1 Removed erroneous equals() in SpecificMethodFrameListenerTest
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1.1@598619 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java14
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java13
-rw-r--r--java/client/src/test/java/org/apache/qpid/client/SpecificMethodFrameListenerTest.java71
3 files changed, 0 insertions, 98 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java b/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
index 1badbb601c..2b63475d71 100644
--- a/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
+++ b/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
@@ -294,18 +294,4 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener
}
}
- public boolean equals(Object o)
- {
-
- if (o instanceof BlockingMethodFrameListener)
- {
- BlockingMethodFrameListener other = (BlockingMethodFrameListener) o;
-
- return _channelId == other._channelId;
- }
-
- return false;
- }
-
-
}
diff --git a/java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java b/java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java
index 4a4f4a0a38..c66603b7a0 100644
--- a/java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java
+++ b/java/client/src/main/java/org/apache/qpid/client/state/listener/SpecificMethodFrameListener.java
@@ -41,17 +41,4 @@ public class SpecificMethodFrameListener extends BlockingMethodFrameListener
return _expectedClass.isInstance(frame);
}
- public boolean equals(Object o)
- {
- if (o instanceof SpecificMethodFrameListener)
- {
- SpecificMethodFrameListener other = (SpecificMethodFrameListener) o;
-
- // here we need to check if the two classes are the same.
- return (_channelId == other._channelId) && (_expectedClass.equals(other._expectedClass));
- }
-
- return false;
- }
-
}
diff --git a/java/client/src/test/java/org/apache/qpid/client/SpecificMethodFrameListenerTest.java b/java/client/src/test/java/org/apache/qpid/client/SpecificMethodFrameListenerTest.java
deleted file mode 100644
index 4cffcecf8a..0000000000
--- a/java/client/src/test/java/org/apache/qpid/client/SpecificMethodFrameListenerTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.qpid.framing;
-
-import junit.framework.TestCase;
-import org.apache.qpid.client.state.listener.SpecificMethodFrameListener;
-import org.apache.mina.common.ByteBuffer;
-
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-public class SpecificMethodFrameListenerTest extends TestCase
-{
-
- SpecificMethodFrameListener close1a = new SpecificMethodFrameListener(1, ChannelCloseOkBody.class);
- SpecificMethodFrameListener close1b = new SpecificMethodFrameListener(1, ChannelCloseOkBody.class);
- SpecificMethodFrameListener close2 = new SpecificMethodFrameListener(2, ChannelCloseOkBody.class);
- SpecificMethodFrameListener open1a = new SpecificMethodFrameListener(1, ChannelOpenOkBody.class);
- SpecificMethodFrameListener open1b = new SpecificMethodFrameListener(1, ChannelOpenOkBody.class);
-
- public void testEquals()
- {
- //Check that the the same objects are equal
- assertEquals("ChannelCloseOKBody a should equal a", close1a, close1a);
- assertEquals("ChannelOpenOkBody a should equal a", open1a, open1a);
-
- //check that the same values in differnt objects are equal
- assertEquals("ChannelCloseOKBody b should equal a", close1b, close1a);
- assertEquals("ChannelCloseOKBody a should equal b", close1a, close1b);
- assertEquals("ChannelOpenOkBody a should equal b", open1a, open1b);
- assertEquals("ChannelOpenOkBody a should equal b", open1a, open1b);
-
- //Chec that different values fail
- //Different channels
- assertFalse("ChannelCloseOKBody channel 1 should NOT equal channel 2", close1a.equals(close2));
- assertFalse("ChannelCloseOKBody channel 1 should NOT equal channel 2", close2.equals(close1a));
-
- //Different Bodies
- assertFalse("ChannelCloseOKBody should not equal ChannelOpenOkBody", close1a.equals(open1a));
- assertFalse("ChannelOpenOkBody should not equal ChannelCloseOKBody", open1a.equals(close1a));
- }
-
- public void testProcessMethod() throws AMQFrameDecodingException
- {
- ChannelCloseOkBody ccob = (ChannelCloseOkBody) ChannelCloseOkBody.getFactory().newInstance((byte) 8, (byte) 0, ByteBuffer.allocate(0), 0);
- ChannelOpenOkBody coob = (ChannelOpenOkBody) ChannelOpenOkBody.getFactory().newInstance((byte) 8, (byte) 0, ByteBuffer.allocate(0), 0);
-
- assertTrue("This SpecificMethodFrameListener should process a ChannelCloseOkBody", close1a.processMethod(1, ccob));
- assertFalse("This SpecificMethodFrameListener should NOT process a ChannelOpenOkBody", close1a.processMethod(1, coob));
-
-
-
-
- }
-}