diff options
| author | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-08-01 14:20:14 +0000 |
|---|---|---|
| committer | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-08-01 14:20:14 +0000 |
| commit | e2f26a346d21578025c1b27ddbc837bfe452b193 (patch) | |
| tree | fb9edb86b20151e79bab0a3a651027b8f8411b0b /qpid/java/common/src/test | |
| parent | 6c2bc6bc603376dd859ab47611eb9aa647a37dd9 (diff) | |
| download | qpid-python-e2f26a346d21578025c1b27ddbc837bfe452b193.tar.gz | |
QPID-2744: Unify 0-10 and 0-8 error messages for invalid object types in properties
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@981231 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/common/src/test')
| -rw-r--r-- | qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java b/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java index 179d371b1b..d4691ba097 100644 --- a/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java +++ b/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java @@ -529,9 +529,19 @@ public class PropertyFieldTableTest extends TestCase catch (AMQPInvalidClassException aice) { assertEquals("Null values are not allowed to be set", - "Only Primitives objects allowed Object is:null", aice.getMessage()); + AMQPInvalidClassException.INVALID_OBJECT_MSG + "null", aice.getMessage()); } + try + { + table.setObject("Unsupported-object", new Exception()); + fail("Non primitive values are not allowed"); + } + catch (AMQPInvalidClassException aice) + { + assertEquals("Non primitive values are not allowed to be set", + AMQPInvalidClassException.INVALID_OBJECT_MSG + Exception.class, aice.getMessage()); + } Assert.assertEquals((Boolean) true, table.getBoolean("bool")); Assert.assertEquals((Byte) Byte.MAX_VALUE, table.getByte("byte")); |
