X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=library%2Fimpl%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fovsdb%2Flib%2Fjsonrpc%2FJsonRpcDecoderTest.java;h=48c58e62f61c7c9165038ed5e526759c7ed48bb3;hb=324828f6ddb7f8e3f514adc2a54d0bd10d48d589;hp=a061d66bdc330f34a83b9e0fcb6f148ca8b78167;hpb=64d8068da63a99b77b7fe864122de76b6022088a;p=ovsdb.git diff --git a/library/impl/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoderTest.java b/library/impl/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoderTest.java index a061d66bd..48c58e62f 100644 --- a/library/impl/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoderTest.java +++ b/library/impl/src/test/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoderTest.java @@ -1,13 +1,10 @@ /* - * Copyright (C) 2014 Red Hat, Inc. + * Copyright (C) 2014 Red Hat, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html - * - * Authors : Dave Tucker */ - package org.opendaylight.ovsdb.lib.jsonrpc; import static io.netty.buffer.Unpooled.copiedBuffer; @@ -17,13 +14,13 @@ import com.google.common.base.Charsets; import com.google.common.io.Resources; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.DecoderException; -import io.netty.handler.codec.TooLongFrameException; import io.netty.util.CharsetUtil; import java.net.URL; import org.junit.Before; import org.junit.Test; public class JsonRpcDecoderTest { + static int testJson_BYTES = 179; String testJson; String prettyTestJson; @@ -48,7 +45,6 @@ public class JsonRpcDecoderTest { /** * Test decoding the Stringified Json text in test.json to * individual Json node objects. - * @throws Exception */ @Test public void testDecode() throws Exception { @@ -63,7 +59,6 @@ public class JsonRpcDecoderTest { /** * Test decoding the Stringified Json text in pretty-test.json to * individual Json node objects. - * @throws Exception */ @Test public void testDecodePrettyJson() throws Exception { @@ -76,7 +71,6 @@ public class JsonRpcDecoderTest { /** * Test decoding the Stringified Json text with large spaces to * individual Json node objects. - * @throws Exception */ @Test public void testDecodeSkipSpaces() throws Exception { @@ -90,7 +84,6 @@ public class JsonRpcDecoderTest { * Test whether phased decoding is allowed with JsonRpcDecoder by * writing Json string over two separate iterations, and checking if * the decoder collates the record appropriately. - * @throws Exception */ @Test public void testDecodePartial() throws Exception { @@ -107,14 +100,14 @@ public class JsonRpcDecoderTest { * Test whether decoder throws appropriate DecoderException when * passing a Json string using an unsupported (i.e., UTF-16) * character set. - * @throws Exception */ - @Test(expected= DecoderException.class) + @Test(expected = DecoderException.class) public void testDecodeInvalidEncoding() throws Exception { ch.writeInbound(copiedBuffer(testJson, CharsetUtil.UTF_16)); ch.finish(); } - /* Disabling this test as the limit was changed + + /* Disabling this test as the limit was changed * from exception to a log warning... /** * Test whether decoder throws appropriate TooLongFrameException