// Path: neo4j-jdbc/src/main/java/org/neo4j/jdbc/utils/PreparedStatementBuilder.java
// public static String replacePlaceholders(String raw) {
// 	int index = 1;
// 	String digested = raw;
// 
// 	String regex = "\\?(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)";
// 	Matcher matcher = Pattern.compile(regex).matcher(digested);
// 
// 	while (matcher.find()) {
// 		digested = digested.replaceFirst(regex, "\\$" + index);
// 		index++;
// 	}
// 
// 	return digested;
// }


import static org.junit.Assert.assertEquals;
import org.junit.Test;
import static org.neo4j.jdbc.utils.PreparedStatementBuilder.replacePlaceholders;
/*
 * Copyright (c) 2016 LARUS Business Automation [http://www.larus-ba.it]
 * <p>
 * This file is part of the "LARUS Integration Framework for Neo4j".
 * <p>
 * The "LARUS Integration Framework for Neo4j" is 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
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * 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.
 * <p>
 * Created on 25/03/16
 */
package org.neo4j.jdbc.utils;



/**
 * @author AgileLARUS
 * @since 3.0.0
 */
public class Neo4jPreparedStatementBuilderTest {

	@Test public void replacePlaceholderShouldReturnSameStatementIfNoPlaceholders() {
		String raw = "MATCH statement RETURN same WHERE thereAreNoPlaceholders";
// Path: neo4j-jdbc/src/main/java/org/neo4j/jdbc/utils/PreparedStatementBuilder.java
// public static String replacePlaceholders(String raw) {
// 	int index = 1;
// 	String digested = raw;
// 
// 	String regex = "\\?(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)";
// 	Matcher matcher = Pattern.compile(regex).matcher(digested);
// 
// 	while (matcher.find()) {
// 		digested = digested.replaceFirst(regex, "\\$" + index);
// 		index++;
// 	}
// 
// 	return digested;
// }


// Path: neo4j-jdbc/src/test/java/org/neo4j/jdbc/utils/Neo4jPreparedStatementBuilderTest.java
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import static org.neo4j.jdbc.utils.PreparedStatementBuilder.replacePlaceholders;

/*
 * Copyright (c) 2016 LARUS Business Automation [http://www.larus-ba.it]
 * <p>
 * This file is part of the "LARUS Integration Framework for Neo4j".
 * <p>
 * The "LARUS Integration Framework for Neo4j" is 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
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * 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.
 * <p>
 * Created on 25/03/16
 */
package org.neo4j.jdbc.utils;



/**
 * @author AgileLARUS
 * @since 3.0.0
 */
public class Neo4jPreparedStatementBuilderTest {

	@Test public void replacePlaceholderShouldReturnSameStatementIfNoPlaceholders() {
		String raw = "MATCH statement RETURN same WHERE thereAreNoPlaceholders";
		assertEquals(raw, replacePlaceholders(raw));