From 56cb59d88b24662168d8988d3fac5ef0557149fa Mon Sep 17 00:00:00 2001 From: Andrew Donald Kennedy Date: Mon, 26 Jul 2010 14:09:03 +0000 Subject: QPID-2660: Remove AMQFrameDecodingException git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@979291 13f79535-47bb-0310-9956-ffa450edef68 --- .../qpid/framing/PropertyFieldTableTest.java | 35 ++++++++-------------- 1 file changed, 13 insertions(+), 22 deletions(-) (limited to 'java/common/src/test') diff --git a/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java b/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java index 66ca43c145..179d371b1b 100644 --- a/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java +++ b/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java @@ -583,28 +583,19 @@ public class PropertyFieldTableTest extends TestCase long length = buffer.getUnsignedInt(); - try - { - FieldTable table2 = new FieldTable(buffer, length); - - Assert.assertEquals((Boolean) true, table2.getBoolean("bool")); - Assert.assertEquals((Byte) Byte.MAX_VALUE, table2.getByte("byte")); - assertBytesEqual(bytes, table2.getBytes("bytes")); - Assert.assertEquals((Character) 'c', table2.getCharacter("char")); - Assert.assertEquals(Double.MAX_VALUE, table2.getDouble("double")); - Assert.assertEquals(Float.MAX_VALUE, table2.getFloat("float")); - Assert.assertEquals((Integer) Integer.MAX_VALUE, table2.getInteger("int")); - Assert.assertEquals((Long) Long.MAX_VALUE, table2.getLong("long")); - Assert.assertEquals((Short) Short.MAX_VALUE, table2.getShort("short")); - Assert.assertEquals("hello", table2.getString("string")); - Assert.assertEquals(null, table2.getString("null-string")); - - } - catch (AMQFrameDecodingException e) - { - e.printStackTrace(); - fail("PFT should be instantiated from bytes." + e.getCause()); - } + FieldTable table2 = new FieldTable(buffer, length); + + Assert.assertEquals((Boolean) true, table2.getBoolean("bool")); + Assert.assertEquals((Byte) Byte.MAX_VALUE, table2.getByte("byte")); + assertBytesEqual(bytes, table2.getBytes("bytes")); + Assert.assertEquals((Character) 'c', table2.getCharacter("char")); + Assert.assertEquals(Double.MAX_VALUE, table2.getDouble("double")); + Assert.assertEquals(Float.MAX_VALUE, table2.getFloat("float")); + Assert.assertEquals((Integer) Integer.MAX_VALUE, table2.getInteger("int")); + Assert.assertEquals((Long) Long.MAX_VALUE, table2.getLong("long")); + Assert.assertEquals((Short) Short.MAX_VALUE, table2.getShort("short")); + Assert.assertEquals("hello", table2.getString("string")); + Assert.assertEquals(null, table2.getString("null-string")); } public void testEncodingSize() -- cgit v1.2.1