Author: shawkins
Date: 2009-05-19 16:46:31 -0400 (Tue, 19 May 2009)
New Revision: 982
Added:
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java
Log:
TEIID-473 fix for extract function modifier - changing name to util, rather than testutil
Copied: trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java
(from rev 981,
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/TestUtil.java)
===================================================================
--- trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java
(rev 0)
+++
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java 2009-05-19
20:46:31 UTC (rev 982)
@@ -0,0 +1,47 @@
+/*
+ * 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.connector.jdbc;
+
+import static org.junit.Assert.*;
+
+import org.teiid.connector.api.ConnectorException;
+import org.teiid.connector.jdbc.translator.TranslatedCommand;
+import org.teiid.connector.jdbc.translator.Translator;
+import org.teiid.connector.language.ICommand;
+
+import com.metamatrix.cdk.api.EnvironmentUtility;
+
+public class Util {
+
+ public static void helpTestVisitor(String vdb, String input, String expectedOutput,
Translator translator) throws ConnectorException {
+ // Convert from sql to objects
+ ICommand obj = MetadataFactory.helpTranslate(vdb, input);
+
+ TranslatedCommand tc = new
TranslatedCommand(EnvironmentUtility.createSecurityContext("user"), translator);
//$NON-NLS-1$
+ tc.translateCommand(obj);
+
+ // Check stuff
+ assertEquals("Did not get correct sql", expectedOutput, tc.getSql());
//$NON-NLS-1$
+ }
+
+}
Property changes on:
trunk/connectors/connector-jdbc/src/test/java/org/teiid/connector/jdbc/Util.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:mergeinfo
+
Show replies by date