package fonzerelly.consorsbank.jsdevwrapper.test;
import static org.junit.Assert.assertEquals;

import org.junit.Test;


public class TestScriptConcatenator extends TestScriptManipulator {
	@Test
	public void itShouldReplaceNewLinePlaceholderWithProperNewLine() {
		String scriptWithPlaceholders = "var/*ScriptEscaper:rn*/k = 42,/*ScriptEscaper:n*/timesTwo=double(k);";
		String resolvedScript = "var\r\n" +
		                        "k = 42,\n" +
				                "timesTwo=double(k);";
		ScriptConcatenator concatenator = new ScriptConcatenator(scriptWithPlaceholders);
		concatenator.multilineToNewline();
		System.out.println("\"" + concatenator.toString() + "\"");
		System.out.println("\"" + resolvedScript + "\"");
		assertEquals(concatenator.toString(), resolvedScript);
	}
}

@@ -609,121 +609,8 @@
 ();%0A
-%09%09System.out.println(%22%5C%22%22 + concatenator.toString() + %22%5C%22%22);%0A%09%09System.out.println(%22%5C%22%22 + resolvedScript + %22%5C%22%22);%0A
 %09%09as

remove debug code