[hibernate-commits] Hibernate SVN: r15239 - in core/branches/Branch_3_2/test/org/hibernate/test: engine and 1 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Wed Oct 1 15:03:53 EDT 2008


Author: steve.ebersole at jboss.com
Date: 2008-10-01 15:03:53 -0400 (Wed, 01 Oct 2008)
New Revision: 15239

Added:
   core/branches/Branch_3_2/test/org/hibernate/test/engine/
   core/branches/Branch_3_2/test/org/hibernate/test/engine/query/
   core/branches/Branch_3_2/test/org/hibernate/test/engine/query/ParameterParserTest.java
Log:
HHH-3216 : ParameterParser + escaped function call syntax

Added: core/branches/Branch_3_2/test/org/hibernate/test/engine/query/ParameterParserTest.java
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/engine/query/ParameterParserTest.java	                        (rev 0)
+++ core/branches/Branch_3_2/test/org/hibernate/test/engine/query/ParameterParserTest.java	2008-10-01 19:03:53 UTC (rev 15239)
@@ -0,0 +1,41 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program 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 distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ *
+ */
+package org.hibernate.test.engine.query;
+
+import junit.framework.TestCase;
+
+import org.hibernate.engine.query.ParameterParser;
+
+/**
+ * Unit tests of the ParameterParser class
+ *
+ * @author Steve Ebersole
+ */
+public class ParameterParserTest extends TestCase {
+	public void testEscapeCallRecognition() {
+		assertTrue( ParameterParser.startsWithEscapeCallTemplate( "{ ? = call abc(?) }" ) );
+		assertFalse( ParameterParser.startsWithEscapeCallTemplate( "from User u where u.userName = ? and u.userType = 'call'" ) );
+	}
+}




More information about the hibernate-commits mailing list