You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2018/08/10 16:54:53 UTC
qpid-proton-j git commit: PROTON-1911: have test verify the method of
interest is actually a default
Repository: qpid-proton-j
Updated Branches:
refs/heads/master 7eac8b945 -> 8ee984700
PROTON-1911: have test verify the method of interest is actually a default
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton-j/commit/8ee98470
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton-j/tree/8ee98470
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton-j/diff/8ee98470
Branch: refs/heads/master
Commit: 8ee984700a942971c9e62d3db0c89182f7fb4ef3
Parents: 7eac8b9
Author: Robbie Gemmell <ro...@apache.org>
Authored: Fri Aug 10 17:54:36 2018 +0100
Committer: Robbie Gemmell <ro...@apache.org>
Committed: Fri Aug 10 17:54:36 2018 +0100
----------------------------------------------------------------------
.../java/org/apache/qpid/proton/codec/StringTypeTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton-j/blob/8ee98470/proton-j/src/test/java/org/apache/qpid/proton/codec/StringTypeTest.java
----------------------------------------------------------------------
diff --git a/proton-j/src/test/java/org/apache/qpid/proton/codec/StringTypeTest.java b/proton-j/src/test/java/org/apache/qpid/proton/codec/StringTypeTest.java
index 3ba2007..03297f1 100644
--- a/proton-j/src/test/java/org/apache/qpid/proton/codec/StringTypeTest.java
+++ b/proton-j/src/test/java/org/apache/qpid/proton/codec/StringTypeTest.java
@@ -21,8 +21,10 @@
package org.apache.qpid.proton.codec;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.lang.Character.UnicodeBlock;
+import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.Arrays;
@@ -247,11 +249,15 @@ public class StringTypeTest
}
@Test
- public void testEncodeAndDecodeUsingWritableBufferDefaultPutString() {
+ public void testEncodeAndDecodeUsingWritableBufferDefaultPutString() throws Exception {
final DecoderImpl decoder = new DecoderImpl();
final EncoderImpl encoder = new EncoderImpl(decoder);
AMQPDefinedTypes.registerAllTypes(decoder, encoder);
+ // Verify that the default put(String) impl is being used by the buffers
+ Method m = WritableBufferWithoutPutStringOverride.class.getMethod("put", String.class);
+ assertTrue("Expected method to be default", m.isDefault());
+
for (final String input : TEST_DATA) {
final WritableBufferWithoutPutStringOverride sink = new WritableBufferWithoutPutStringOverride(16);
final AmqpValue inputValue = new AmqpValue(input);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org