You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2012/10/16 10:53:13 UTC

git commit: WICKET-4812 Revert a lost unit test

Updated Branches:
  refs/heads/master d9215bc55 -> 024c7abbd


WICKET-4812 Revert a lost unit test


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/024c7abb
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/024c7abb
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/024c7abb

Branch: refs/heads/master
Commit: 024c7abbd4842cf6e368df4a201ce4c30157c76f
Parents: d9215bc
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Tue Oct 16 10:52:31 2012 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Tue Oct 16 10:52:31 2012 +0200

----------------------------------------------------------------------
 .../wicket/util/io/SerializableCheckerTest.java    |   20 +++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/024c7abb/wicket-core/src/test/java/org/apache/wicket/util/io/SerializableCheckerTest.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/java/org/apache/wicket/util/io/SerializableCheckerTest.java b/wicket-core/src/test/java/org/apache/wicket/util/io/SerializableCheckerTest.java
index bb72bed..642cf66 100644
--- a/wicket-core/src/test/java/org/apache/wicket/util/io/SerializableCheckerTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/util/io/SerializableCheckerTest.java
@@ -76,6 +76,26 @@ public class SerializableCheckerTest extends Assert
 		}
 	}
 
+	/**
+	 * @throws IOException
+	 */
+	@Test
+	public void nonSerializableTypeDetection() throws IOException
+	{
+		SerializableChecker serializableChecker = new SerializableChecker(
+				new NotSerializableException());
+		String exceptionMessage = null;
+		try
+		{
+			serializableChecker.writeObject(new TestType2());
+		}
+		catch (ObjectChecker.ObjectCheckException e)
+		{
+			exceptionMessage = e.getMessage();
+		}
+		assertTrue(exceptionMessage.contains(NonSerializableType.class.getName()));
+	}
+
 	private static class TestType1 implements Serializable
 	{
 		private static final long serialVersionUID = 1L;