summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/serialization
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-30 17:24:36 +0300
committerArtur Signell <artur@vaadin.com>2012-08-30 17:24:36 +0300
commit7b25b3886ea95bc6495506fbe9472e45fcbde684 (patch)
tree0b93cb65dab437feb46720659a63b8f1ef48f7f4 /uitest/src/com/vaadin/tests/serialization
parent8941056349e302e687e40e94c13709e75f256d73 (diff)
downloadvaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.tar.gz
vaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.zip
Renamed tests -> uitest and tests/testbench -> uitest/src (#9299)
Diffstat (limited to 'uitest/src/com/vaadin/tests/serialization')
-rw-r--r--uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.html26
-rw-r--r--uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.java42
-rw-r--r--uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.html31
-rw-r--r--uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.java45
-rw-r--r--uitest/src/com/vaadin/tests/serialization/SerializerTest.html111
-rw-r--r--uitest/src/com/vaadin/tests/serialization/SerializerTest.java316
6 files changed, 571 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.html b/uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.html
new file mode 100644
index 0000000000..12228eb9f0
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.html
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.serialization.DelegateToWidgetTest?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationDelegateToWidgetTest::/VVerticalLayout[0]/VVerticalLayout[0]/DelegateWidget[0]</td>
+ <td>My String<br />42<br />true<br />3.141592653589793</td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.java b/uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.java
new file mode 100644
index 0000000000..3a5dd0a326
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/serialization/DelegateToWidgetTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed 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.
+ */
+
+package com.vaadin.tests.serialization;
+
+import com.vaadin.annotations.Widgetset;
+import com.vaadin.server.WrappedRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.tests.widgetset.TestingWidgetSet;
+import com.vaadin.tests.widgetset.server.DelegateToWidgetComponent;
+
+@Widgetset(TestingWidgetSet.NAME)
+public class DelegateToWidgetTest extends AbstractTestUI {
+ @Override
+ protected void setup(WrappedRequest request) {
+ addComponent(new DelegateToWidgetComponent());
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Verifies that @DelegateToWidget has the desired effect";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(9297);
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.html b/uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.html
new file mode 100644
index 0000000000..70d0e905f5
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.html
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.serialization.SerializerNamespaceTest?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerNamespaceTest::/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]</td>
+ <td>The real label</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerNamespaceTest::/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[1]</td>
+ <td>The dummy label</td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.java b/uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.java
new file mode 100644
index 0000000000..0d939a3d18
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/serialization/SerializerNamespaceTest.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed 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.
+ */
+
+package com.vaadin.tests.serialization;
+
+import com.vaadin.annotations.Widgetset;
+import com.vaadin.server.WrappedRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.tests.widgetset.TestingWidgetSet;
+import com.vaadin.tests.widgetset.server.DummyLabel;
+import com.vaadin.ui.Label;
+
+@Widgetset(TestingWidgetSet.NAME)
+public class SerializerNamespaceTest extends AbstractTestUI {
+
+ @Override
+ protected void setup(WrappedRequest request) {
+ addComponent(new Label("The real label"));
+ addComponent(new DummyLabel("The dummy label"));
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Using connectors with different state classes having the same simple name should not cause any client-side exceptions";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(8683);
+ }
+
+}
diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerTest.html b/uitest/src/com/vaadin/tests/serialization/SerializerTest.html
new file mode 100644
index 0000000000..4417fabf14
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/serialization/SerializerTest.html
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8888/" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.serialization.SerializerTest?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[17]</td>
+ <td>1. sendBoolean: false, false, [false, false, true, false, true, true]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[16]</td>
+ <td>2. sendByte: 5, -12, [3, 1, 2]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[15]</td>
+ <td>3. sendChar: Å, ∫, [a, b, c, d]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[14]</td>
+ <td>4. sendInt: 2, 5, [2147483647, 0]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[13]</td>
+ <td>5. sendLong: -57841235865, 577431841358, [57, 0]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[12]</td>
+ <td>6. sendFloat: 1.0000001, 3.14159, [-12.0, 0.0, 57.0]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[11]</td>
+ <td>7. sendDouble: 0.423310825130748, 5.859874482048838, [2.0, 1.7976931348623157E308, 4.9E-324]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[10]</td>
+ <td>8. sendString: Taegghiiiinnrsssstt‡</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[9]</td>
+ <td>9. sendConnector: com.vaadin.tests.widgetset.server.SerializerTestExtension</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[8]</td>
+ <td>10. sendBean: ComplexTestBean [innerBean1=SimpleTestBean(1), innerBean2=SimpleTestBean(3), innerBeanCollection=[SimpleTestBean(6), SimpleTestBean(0)], privimite=6], SimpleTestBean(0), [SimpleTestBean(7)]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[7]</td>
+ <td>11. sendNull: null, Not null</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[6]</td>
+ <td>12. sendNestedArray: [[7, 5]], [[SimpleTestBean(2)], [SimpleTestBean(4)]]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[5]</td>
+ <td>13. sendList: [-234, 5, 8], class com.vaadin.tests.widgetset.server.SerializerTestExtension, class com.vaadin.tests.serialization.SerializerTest, [SimpleTestBean(-568), SimpleTestBean(234)]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[4]</td>
+ <td>14. sendArrayList: [[2], [2]], [[2, 1], [2, 3]], [[SimpleTestBean(7)]]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[3]</td>
+ <td>15. sendSet: [-12, -7, -4], class com.vaadin.tests.serialization.SerializerTest, [SimpleTestBean(2), SimpleTestBean(3)]</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[2]</td>
+ <td>16. sendMap: {a=null}, [com.vaadin.tests.widgetset.server.SerializerTestExtension=false], [2=com.vaadin.tests.widgetset.server.SerializerTestExtension], {SimpleTestBean(4)=SimpleTestBean(-4), SimpleTestBean(-5)=SimpleTestBean(5)}</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[1]</td>
+ <td>17. sendWrappedGenerics: {[SimpleTestBean(1)]={1=[SimpleTestBean(42)]}}</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestsserializationSerializerTest::/VVerticalLayout[0]/VVerticalLayout[0]/VVerticalLayout[0]/VLabel[0]</td>
+ <td>18. sendEnum: PREFORMATTED, [XHTML, RAW], [PREFORMATTED, XML]</td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerTest.java b/uitest/src/com/vaadin/tests/serialization/SerializerTest.java
new file mode 100644
index 0000000000..cb9d9e997d
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/serialization/SerializerTest.java
@@ -0,0 +1,316 @@
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed 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.
+ */
+
+package com.vaadin.tests.serialization;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import com.vaadin.annotations.Widgetset;
+import com.vaadin.server.WrappedRequest;
+import com.vaadin.shared.Connector;
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.tests.util.Log;
+import com.vaadin.tests.widgetset.client.ComplexTestBean;
+import com.vaadin.tests.widgetset.client.SerializerTestRpc;
+import com.vaadin.tests.widgetset.client.SimpleTestBean;
+import com.vaadin.tests.widgetset.server.SerializerTestExtension;
+
+@Widgetset("com.vaadin.tests.widgetset.TestingWidgetSet")
+public class SerializerTest extends AbstractTestUI {
+
+ private Log log = new Log(40);
+
+ @Override
+ protected void setup(WrappedRequest request) {
+ final SerializerTestExtension testExtension = new SerializerTestExtension();
+ addExtension(testExtension);
+ addComponent(log);
+
+ SerializerTestRpc rpc = testExtension
+ .getRpcProxy(SerializerTestRpc.class);
+ rpc.sendBoolean(true, Boolean.FALSE, new boolean[] { true, true, false,
+ true, false, false });
+ rpc.sendByte((byte) 5, Byte.valueOf((byte) -12), new byte[] { 3, 1, 2 });
+ rpc.sendChar('\u222b', Character.valueOf('å'), "aBcD".toCharArray());
+ rpc.sendInt(Integer.MAX_VALUE, Integer.valueOf(0), new int[] { 5, 7 });
+ rpc.sendLong(577431841358l, Long.valueOf(0), new long[] {
+ -57841235865l, 57 });
+ rpc.sendFloat(3.14159f, Float.valueOf(Math.nextUp(1)), new float[] {
+ 57, 0, -12 });
+ rpc.sendDouble(Math.PI, Double.valueOf(-Math.E), new double[] {
+ Double.MAX_VALUE, Double.MIN_VALUE });
+ rpc.sendString("This is a tesing string ‡");
+ rpc.sendConnector(this);
+ rpc.sendBean(
+ new ComplexTestBean(new SimpleTestBean(0),
+ new SimpleTestBean(1), Arrays.asList(
+ new SimpleTestBean(3), new SimpleTestBean(4)),
+ 5), new SimpleTestBean(6),
+ new SimpleTestBean[] { new SimpleTestBean(7) });
+ rpc.sendNull("Not null", null);
+ rpc.sendNestedArray(new int[][] { { 5 }, { 7 } },
+ new SimpleTestBean[][] { { new SimpleTestBean(4),
+ new SimpleTestBean(2) } });
+ rpc.sendList(Arrays.asList(5, 8, -234), Arrays.<Connector> asList(this,
+ testExtension), Arrays.asList(new SimpleTestBean(234),
+ new SimpleTestBean(-568)));
+ rpc.sendArrayList(
+ Arrays.asList(new int[] { 1, 2 }, new int[] { 3, 4 }),
+ Arrays.asList(new Integer[] { 5, 6 }, new Integer[] { 7, 8 }),
+ Collections
+ .singletonList(new SimpleTestBean[] { new SimpleTestBean(
+ 7) }));
+ // Disabled because of #8861
+ // rpc.sendListArray(
+ // new List[] { Arrays.asList(1, 2), Arrays.asList(3, 4) },
+ // new List[] { Collections.singletonList(new SimpleTestBean(-1)) });
+ rpc.sendSet(new HashSet<Integer>(Arrays.asList(4, 7, 12)), Collections
+ .singleton((Connector) this), new HashSet<SimpleTestBean>(
+ Arrays.asList(new SimpleTestBean(1), new SimpleTestBean(2))));
+
+ rpc.sendMap(new HashMap<String, SimpleTestBean>() {
+ {
+ put("1", new SimpleTestBean(1));
+ put("2", new SimpleTestBean(2));
+ }
+ }, new HashMap<Connector, Boolean>() {
+ {
+ put(testExtension, true);
+ put(getUI(), false);
+ }
+ }, new HashMap<Integer, Connector>() {
+ {
+ put(5, testExtension);
+ put(10, getUI());
+ }
+ }, new HashMap<SimpleTestBean, SimpleTestBean>() {
+ {
+ put(new SimpleTestBean(5), new SimpleTestBean(-5));
+ put(new SimpleTestBean(-4), new SimpleTestBean(4));
+ }
+ });
+ rpc.sendWrappedGenerics(new HashMap<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>>() {
+ {
+ put(Collections.singleton(new SimpleTestBean(42)),
+ new HashMap<Integer, List<SimpleTestBean>>() {
+ {
+ put(1, Arrays.asList(new SimpleTestBean(1),
+ new SimpleTestBean(3)));
+ }
+ });
+ }
+ });
+
+ rpc.sendEnum(ContentMode.TEXT, new ContentMode[] {
+ ContentMode.PREFORMATTED, ContentMode.XML },
+ Arrays.asList(ContentMode.XHTML, ContentMode.RAW));
+
+ testExtension.registerRpc(new SerializerTestRpc() {
+ @Override
+ public void sendBoolean(boolean value, Boolean boxedValue,
+ boolean[] array) {
+ log.log("sendBoolean: " + value + ", " + boxedValue + ", "
+ + Arrays.toString(array));
+ }
+
+ @Override
+ public void sendByte(byte value, Byte boxedValue, byte[] array) {
+ log.log("sendByte: " + value + ", " + boxedValue + ", "
+ + Arrays.toString(array));
+ }
+
+ @Override
+ public void sendChar(char value, Character boxedValue, char[] array) {
+ log.log("sendChar: " + value + ", " + boxedValue + ", "
+ + Arrays.toString(array));
+ }
+
+ @Override
+ public void sendInt(int value, Integer boxedValue, int[] array) {
+ log.log("sendInt: " + value + ", " + boxedValue + ", "
+ + Arrays.toString(array));
+ }
+
+ @Override
+ public void sendLong(long value, Long boxedValue, long[] array) {
+ log.log("sendLong: " + value + ", " + boxedValue + ", "
+ + Arrays.toString(array));
+ }
+
+ @Override
+ public void sendFloat(float value, Float boxedValue, float[] array) {
+ log.log("sendFloat: " + value + ", " + boxedValue + ", "
+ + Arrays.toString(array));
+ }
+
+ @Override
+ public void sendDouble(double value, Double boxedValue,
+ double[] array) {
+ log.log("sendDouble: " + value + ", " + boxedValue + ", "
+ + Arrays.toString(array));
+ }
+
+ @Override
+ public void sendString(String value) {
+ log.log("sendString: " + value);
+ }
+
+ @Override
+ public void sendConnector(Connector connector) {
+ log.log("sendConnector: " + connector.getClass().getName());
+ }
+
+ @Override
+ public void sendBean(ComplexTestBean complexBean,
+ SimpleTestBean simpleBean, SimpleTestBean[] array) {
+ log.log("sendBean: " + complexBean + ", " + simpleBean + ", "
+ + Arrays.toString(array));
+ }
+
+ @Override
+ public void sendNull(String value1, String value2) {
+ log.log("sendNull: " + value1 + ", " + value2);
+ }
+
+ @Override
+ public void sendNestedArray(int[][] nestedIntArray,
+ SimpleTestBean[][] nestedBeanArray) {
+ log.log("sendNestedArray: "
+ + Arrays.deepToString(nestedIntArray) + ", "
+ + Arrays.deepToString(nestedBeanArray));
+ }
+
+ @Override
+ public void sendList(List<Integer> intList,
+ List<Connector> connectorList, List<SimpleTestBean> beanList) {
+ log.log("sendList: " + intList + ", "
+ + connectorCollectionToString(connectorList) + ", "
+ + beanList);
+ }
+
+ private String connectorCollectionToString(
+ Collection<Connector> collection) {
+ StringBuilder sb = new StringBuilder();
+
+ for (Connector connector : collection) {
+ if (sb.length() != 0) {
+ sb.append(", ");
+ }
+ sb.append(connector.getClass());
+ }
+
+ String string = sb.toString();
+ return string;
+ }
+
+ @Override
+ public void sendArrayList(List<int[]> primitiveArrayList,
+ List<Integer[]> objectArrayList,
+ List<SimpleTestBean[]> beanArrayList) {
+ log.log("sendArrayList: "
+ + Arrays.deepToString(primitiveArrayList.toArray())
+ + ", " + Arrays.deepToString(objectArrayList.toArray())
+ + ", " + Arrays.deepToString(beanArrayList.toArray()));
+ }
+
+ @Override
+ public void sendListArray(List<Integer>[] objectListArray,
+ List<SimpleTestBean>[] beanListArray) {
+ log.log("sendArrayList: " + Arrays.toString(objectListArray)
+ + ", " + Arrays.toString(beanListArray));
+ }
+
+ @Override
+ public void sendSet(Set<Integer> intSet,
+ Set<Connector> connectorSet, Set<SimpleTestBean> beanSet) {
+ log.log("sendSet: " + intSet + ", "
+ + connectorCollectionToString(connectorSet) + ", "
+ + beanSet);
+ }
+
+ @Override
+ public void sendMap(Map<String, SimpleTestBean> stringMap,
+ Map<Connector, Boolean> connectorMap,
+ Map<Integer, Connector> intMap,
+ Map<SimpleTestBean, SimpleTestBean> beanMap) {
+ StringBuilder sb = new StringBuilder();
+ for (Entry<Connector, Boolean> entry : connectorMap.entrySet()) {
+ if (sb.length() == 0) {
+ sb.append('[');
+ } else {
+ sb.append(", ");
+ }
+ sb.append(entry.getKey().getClass().getName());
+ sb.append('=');
+ sb.append(entry.getValue());
+ }
+ sb.append(']');
+ String connectorMapString = sb.toString();
+
+ sb = new StringBuilder();
+ for (Entry<Integer, Connector> entry : intMap.entrySet()) {
+ if (sb.length() == 0) {
+ sb.append('[');
+ } else {
+ sb.append(", ");
+ }
+ sb.append(entry.getKey());
+ sb.append('=');
+ sb.append(entry.getValue().getClass().getName());
+ }
+ sb.append(']');
+ String intMapString = sb.toString();
+
+ log.log("sendMap: " + stringMap + ", " + connectorMapString
+ + ", " + intMapString + ", " + beanMap);
+ }
+
+ @Override
+ public void sendWrappedGenerics(
+ Map<Set<SimpleTestBean>, Map<Integer, List<SimpleTestBean>>> generics) {
+ log.log("sendWrappedGenerics: " + generics.toString());
+ }
+
+ @Override
+ public void sendEnum(ContentMode contentMode, ContentMode[] array,
+ List<ContentMode> list) {
+ log.log("sendEnum: " + contentMode + ", "
+ + Arrays.toString(array) + ", " + list);
+ }
+
+ });
+ }
+
+ @Override
+ protected String getTestDescription() {
+ return "Test for lots of different cases of encoding and decoding variuos data types";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(8655);
+ }
+
+}