Author: shawkins
Date: 2010-04-13 13:47:07 -0400 (Tue, 13 Apr 2010)
New Revision: 2052
Added:
trunk/runtime/src/test/java/org/teiid/deployers/
trunk/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java
Log:
TEIID-1043 fix to ensure that attachment information errors do not prevent vdb loading
Added: trunk/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java
===================================================================
--- trunk/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java
(rev 0)
+++ trunk/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java 2010-04-13
17:47:07 UTC (rev 2052)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.deployers;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+
+import org.junit.Test;
+
+import com.metamatrix.core.util.UnitTestUtil;
+
+@SuppressWarnings("nls")
+public class TestObjectSerializer {
+
+ @Test public void testLoadSafe() throws Exception {
+ ObjectSerializer os = new ObjectSerializer();
+ File f = UnitTestUtil.getTestScratchFile("foo");
+ os.saveAttachment(f, new Long(2));
+ assertNotNull(os.loadAttachment(f, Long.class));
+ assertNull(os.loadSafe(f, Integer.class));
+ }
+
+}
Property changes on:
trunk/runtime/src/test/java/org/teiid/deployers/TestObjectSerializer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Show replies by date