Author: davsclaus
Date: Fri Jul 22 06:57:23 2011
New Revision: 1149480
URL: http://svn.apache.org/viewvc?rev=1149480&view=rev
Log:
CAMEL-4255: Using os dependent line separator in unit tests and log component.
Thanks to Babak Vahdat for the patch.
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/component/log/LogFormatter.java
camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/component/log/LogFormatterTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/CachedOutputStreamTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/issues/FileSplitStreamingWithChoiceTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/idempotent/FileConsumerIdempotentLoadStoreTest.java
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/component/log/LogFormatter.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/log/LogFormatter.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/main/java/org/apache/camel/component/log/LogFormatter.java
(original)
+++
camel/trunk/camel-core/src/main/java/org/apache/camel/component/log/LogFormatter.java
Fri Jul 22 06:57:23 2011
@@ -31,6 +31,8 @@ import org.apache.camel.util.ObjectHelpe
*/
public class LogFormatter implements ExchangeFormatter {
+ protected static final String LS = System.getProperty("line.separator");
+
private boolean showExchangeId;
private boolean showExchangePattern = true;
private boolean showProperties;
@@ -50,41 +52,41 @@ public class LogFormatter implements Exc
public String format(Exchange exchange) {
Message in = exchange.getIn();
- StringBuilder sb = new StringBuilder("");
+ StringBuilder sb = new StringBuilder();
if (showAll || showExchangeId) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", Id:").append(exchange.getExchangeId());
}
if (showAll || showExchangePattern) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", ExchangePattern:").append(exchange.getPattern());
}
if (showAll || showProperties) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", Properties:").append(exchange.getProperties());
}
if (showAll || showHeaders) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", Headers:").append(in.getHeaders());
}
if (showAll || showBodyType) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", BodyType:").append(getBodyTypeAsString(in));
}
if (showAll || showBody) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", Body:").append(getBodyAsString(in));
}
@@ -102,7 +104,7 @@ public class LogFormatter implements Exc
if (exception != null) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
if (caught) {
sb.append(",
CaughtExceptionType:").append(exception.getClass().getCanonicalName());
@@ -124,25 +126,25 @@ public class LogFormatter implements Exc
Message out = exchange.getOut();
if (showAll || showHeaders) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", OutHeaders:").append(out.getHeaders());
}
if (showAll || showBodyType) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(",
OutBodyType:").append(getBodyTypeAsString(out));
}
if (showAll || showBody) {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", OutBody:").append(getBodyAsString(out));
}
} else {
if (multiline) {
- sb.append('\n');
+ sb.append(LS);
}
sb.append(", Out: null");
}
@@ -150,7 +152,7 @@ public class LogFormatter implements Exc
if (maxChars > 0) {
StringBuilder answer = new StringBuilder();
- for (String s : sb.toString().split("\n")) {
+ for (String s : sb.toString().split(LS)) {
if (s != null) {
if (s.length() > maxChars) {
s = s.substring(0, maxChars);
@@ -159,7 +161,7 @@ public class LogFormatter implements Exc
answer.append(s);
}
if (multiline) {
- answer.append("\n");
+ answer.append(LS);
}
}
}
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java Fri
Jul 22 06:57:23 2011
@@ -44,6 +44,7 @@ import org.slf4j.LoggerFactory;
public abstract class TestSupport extends TestCase {
private static final Logger LOG =
LoggerFactory.getLogger(TestSupport.class);
+ protected static final String LS = System.getProperty("line.separator");
protected transient Logger log = LoggerFactory.getLogger(getClass());
// Builder methods for expressions used when testing
@@ -434,7 +435,8 @@ public abstract class TestSupport extend
deleteDirectory(files[i]);
}
}
- file.delete();
+
+ file.delete();
}
/**
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConcurrentWriteAppendSameFileTest.java
Fri Jul 22 06:57:23 2011
@@ -43,7 +43,7 @@ public class FileConcurrentWriteAppendSa
// create file with many lines
StringBuilder sb = new StringBuilder();
for (int i = 0; i < size; i++) {
- sb.append("Line " + i + "\n");
+ sb.append("Line " + i + LS);
}
template.sendBodyAndHeader("file:target/concurrent", sb.toString(),
Exchange.FILE_NAME, "input.txt");
@@ -62,7 +62,7 @@ public class FileConcurrentWriteAppendSa
String txt = context.getTypeConverter().convertTo(String.class, new
File("target/concurrent/outbox/result.txt"));
assertNotNull(txt);
- String[] lines = txt.split("\n");
+ String[] lines = txt.split(LS);
assertEquals("Should be " + size + " lines", size, lines.length);
// should be 10000 unique
@@ -78,8 +78,8 @@ public class FileConcurrentWriteAppendSa
@Override
public void configure() throws Exception {
from("file:target/concurrent").routeId("foo").noAutoStartup()
-
.split(body().tokenize("\n")).parallelProcessing().streaming()
- .setBody(body().append(":Status=OK\n"))
+
.split(body().tokenize(LS)).parallelProcessing().streaming()
+ .setBody(body().append(":Status=OK").append(LS))
.to("file:target/concurrent/outbox?fileExist=Append&fileName=result.txt")
.to("mock:result")
.end();
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/FileChangedReadLockTest.java
Fri Jul 22 06:57:23 2011
@@ -45,11 +45,10 @@ public class FileChangedReadLockTest ext
assertMockEndpointsSatisfied();
String content = context.getTypeConverter().convertTo(String.class,
new File("target/changed/out/slowfile.dat").getAbsoluteFile());
- String[] lines = content.split("\n");
+ String[] lines = content.split(LS);
assertEquals("There should be 20 lines in the file", 20, lines.length);
for (int i = 0; i < 20; i++) {
- // there may be windows line terminators
- assertTrue(lines[i].startsWith("Line " + i));
+ assertEquals("Line " + i, lines[i]);
}
}
@@ -58,7 +57,7 @@ public class FileChangedReadLockTest ext
FileOutputStream fos = new
FileOutputStream("target/changed/in/slowfile.dat");
for (int i = 0; i < 20; i++) {
- fos.write(("Line " + i + "\n").getBytes());
+ fos.write(("Line " + i + LS).getBytes());
LOG.debug("Writing line " + i);
Thread.sleep(200);
}
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/strategy/MarkerFileExclusiveReadLockStrategyTest.java
Fri Jul 22 06:57:23 2011
@@ -51,16 +51,15 @@ public class MarkerFileExclusiveReadLock
assertMockEndpointsSatisfied();
String content = context.getTypeConverter().convertTo(String.class,
new File("target/marker/out/file1.dat").getAbsoluteFile());
- String[] lines = content.split("\n");
+ String[] lines = content.split(LS);
for (int i = 0; i < 20; i++) {
assertEquals("Line " + i, lines[i]);
}
content = context.getTypeConverter().convertTo(String.class, new
File("target/marker/out/file2.dat").getAbsoluteFile());
- lines = content.split("\n");
+ lines = content.split(LS);
for (int i = 0; i < 20; i++) {
- // there may be windows line terminators
- assertTrue(lines[i].startsWith("Line " + i));
+ assertEquals("Line " + i, lines[i]);
}
waitUntilCompleted();
@@ -80,8 +79,8 @@ public class MarkerFileExclusiveReadLock
FileOutputStream fos = new
FileOutputStream("target/marker/in/file1.dat");
FileOutputStream fos2 = new
FileOutputStream("target/marker/in/file2.dat");
for (int i = 0; i < 20; i++) {
- fos.write(("Line " + i + "\n").getBytes());
- fos2.write(("Line " + i + "\n").getBytes());
+ fos.write(("Line " + i + LS).getBytes());
+ fos2.write(("Line " + i + LS).getBytes());
LOG.debug("Writing line " + i);
}
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/component/log/LogFormatterTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/log/LogFormatterTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/component/log/LogFormatterTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/component/log/LogFormatterTest.java
Fri Jul 22 06:57:23 2011
@@ -34,7 +34,6 @@ public class LogFormatterTest extends Co
template.sendBody("log:org.apache.camel.TEST", "Hello World");
}
- @SuppressWarnings("unchecked")
public void testSendMessageToLogSingleOptions() throws Exception {
template.sendBody("log:org.apache.camel.TEST?showExchangeId=true",
"Hello World");
template.sendBody("log:org.apache.camel.TEST?showExchangePattern=true", "Hello
World");
@@ -49,13 +48,13 @@ public class LogFormatterTest extends Co
template.sendBody("log:org.apache.camel.TEST?showOut=true&showBody=true",
"Hello World");
template.sendBody("log:org.apache.camel.TEST?showAll=true", "Hello
World");
- template.sendBody("log:org.apache.camel.TEST?showFuture=true", new
MyFuture(new Callable() {
- public Object call() throws Exception {
+ template.sendBody("log:org.apache.camel.TEST?showFuture=true", new
MyFuture(new Callable<String>() {
+ public String call() throws Exception {
return "foo";
}
}));
- template.sendBody("log:org.apache.camel.TEST?showFuture=false", new
MyFuture(new Callable() {
- public Object call() throws Exception {
+ template.sendBody("log:org.apache.camel.TEST?showFuture=false", new
MyFuture(new Callable<String>() {
+ public String call() throws Exception {
return "bar";
}
}));
@@ -178,13 +177,13 @@ public class LogFormatterTest extends Co
assertEquals(0, formatter.getMaxChars());
}
- private class MyFuture extends FutureTask<Object> {
+ private class MyFuture extends FutureTask<String> {
- public MyFuture(Callable<Object> callable) {
+ public MyFuture(Callable<String> callable) {
super(callable);
}
- public MyFuture(Runnable runnable, Object o) {
+ public MyFuture(Runnable runnable, String o) {
super(runnable, o);
}
@@ -194,7 +193,7 @@ public class LogFormatterTest extends Co
}
@Override
- public Object get() throws InterruptedException, ExecutionException {
+ public String get() throws InterruptedException, ExecutionException {
return "foo";
}
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/CachedOutputStreamTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/CachedOutputStreamTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/CachedOutputStreamTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/converter/stream/CachedOutputStreamTest.java
Fri Jul 22 06:57:23 2011
@@ -52,7 +52,7 @@ public class CachedOutputStreamTest exte
private static String toString(InputStream input) throws IOException {
BufferedReader reader = new BufferedReader(new
InputStreamReader(input));
- CollectionStringBuffer builder = new CollectionStringBuffer("\n");
+ CollectionStringBuffer builder = new CollectionStringBuffer();
while (true) {
String line = reader.readLine();
if (line == null) {
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/issues/FileSplitStreamingWithChoiceTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/FileSplitStreamingWithChoiceTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/issues/FileSplitStreamingWithChoiceTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/issues/FileSplitStreamingWithChoiceTest.java
Fri Jul 22 06:57:23 2011
@@ -41,7 +41,7 @@ public class FileSplitStreamingWithChoic
// should be moved to this directory after we are done
mock.expectedFileExists("target/filesplit/.camel/splitme.txt");
- String body = "line1\nline2\nline3";
+ String body = "line1" + LS + "line2" + LS + "line3";
template.sendBodyAndHeader("file://target/filesplit", body,
Exchange.FILE_NAME, "splitme.txt");
assertMockEndpointsSatisfied();
@@ -53,7 +53,7 @@ public class FileSplitStreamingWithChoic
@Override
public void configure() throws Exception {
from("file://target/filesplit")
- .split(body().tokenize("\n")).streaming()
+ .split(body().tokenize(LS)).streaming()
.to("mock:split")
.choice()
.when(body(String.class).isNotNull()).to("mock:body")
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java
Fri Jul 22 06:57:23 2011
@@ -31,7 +31,7 @@ import org.apache.camel.component.mock.M
*/
public class SplitPropertiesFileIssueTest extends ContextTestSupport {
- private String body = "foo=1\nbar=2\nbar=3\nfoo=4";
+ private String body = "foo=1" + LS + "bar=2" + LS + "bar=3" + LS + "foo=4";
@Override
protected void setUp() throws Exception {
@@ -89,7 +89,7 @@ public class SplitPropertiesFileIssueTes
List<String> data2 = new ArrayList<String>();
String body = exchange.getIn().getBody(String.class);
- String[] lines = body.split("\n");
+ String[] lines = body.split(LS);
for (String line : lines) {
if (line.startsWith("foo")) {
data1.add(line);
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterParallelBigFileTest.java
Fri Jul 22 06:57:23 2011
@@ -47,7 +47,7 @@ public class SplitterParallelBigFileTest
File file = new File("target/split/bigfile.txt");
FileOutputStream fos = new FileOutputStream(file);
for (int i = 0; i < lines; i++) {
- String line = "line-" + i + "\n";
+ String line = "line-" + i + LS;
fos.write(line.getBytes());
}
IOHelper.close(fos);
@@ -83,7 +83,7 @@ public class SplitterParallelBigFileTest
//context.getExecutorServiceStrategy().getDefaultThreadPoolProfile().setMaxPoolSize(10);
from("file:target/split")
-
.split(body().tokenize("\n")).streaming().parallelProcessing()
+
.split(body().tokenize(LS)).streaming().parallelProcessing()
.to("log:split?groupSize=1000")
.end()
.log("Done splitting ${file:name}");
Modified:
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java
(original)
+++
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpChangedReadLockTest.java
Fri Jul 22 06:57:23 2011
@@ -47,11 +47,10 @@ public class FtpChangedReadLockTest exte
assertMockEndpointsSatisfied();
String content = context.getTypeConverter().convertTo(String.class,
new File("target/changed/out/slowfile.dat").getAbsoluteFile());
- String[] lines = content.split("\n");
+ String[] lines = content.split(LS);
assertEquals("There should be 20 lines in the file", 20, lines.length);
for (int i = 0; i < 20; i++) {
- // there may be windows line terminators
- assertTrue(lines[i].startsWith("Line " + i));
+ assertEquals("Line " + i, lines[i]);
}
}
@@ -61,7 +60,7 @@ public class FtpChangedReadLockTest exte
createDirectory(FTP_ROOT_DIR + "/changed");
FileOutputStream fos = new FileOutputStream(FTP_ROOT_DIR +
"changed/slowfile.dat", true);
for (int i = 0; i < 20; i++) {
- fos.write(("Line " + i + "\n").getBytes());
+ fos.write(("Line " + i + LS).getBytes());
LOG.debug("Writing line " + i);
Thread.sleep(200);
}
Modified:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/idempotent/FileConsumerIdempotentLoadStoreTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/idempotent/FileConsumerIdempotentLoadStoreTest.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/idempotent/FileConsumerIdempotentLoadStoreTest.java
(original)
+++
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/idempotent/FileConsumerIdempotentLoadStoreTest.java
Fri Jul 22 06:57:23 2011
@@ -48,7 +48,7 @@ public class FileConsumerIdempotentLoadS
// insert existing name to the file repo, so we should skip this file
String name = FileUtil.normalizePath(new
File("target/fileidempotent/report.txt").getAbsolutePath());
fos.write(name.getBytes());
- fos.write("\n".getBytes());
+ fos.write(LS.getBytes());
fos.close();
Modified:
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
(original)
+++
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
Fri Jul 22 06:57:23 2011
@@ -49,8 +49,9 @@ import org.slf4j.LoggerFactory;
* @version
*/
public abstract class TestSupport extends TestCase {
- private static final Logger LOG =
LoggerFactory.getLogger(TestSupport.class);
- protected transient Logger log = LoggerFactory.getLogger(getClass());
+ private static final Logger LOG =
LoggerFactory.getLogger(TestSupport.class);
+ protected static final String LS = System.getProperty("line.separator");
+ protected transient Logger log = LoggerFactory.getLogger(getClass());
/**
* Runs the bare test sequence only if this platform is supported
Modified:
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
(original)
+++
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
Fri Jul 22 06:57:23 2011
@@ -53,6 +53,7 @@ import org.slf4j.LoggerFactory;
public abstract class TestSupport extends Assert {
private static final Logger LOG =
LoggerFactory.getLogger(TestSupport.class);
+ protected static final String LS = System.getProperty("line.separator");
protected transient Logger log = LoggerFactory.getLogger(getClass());
// CHECKSTYLE:OFF
Modified:
camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java
URL:
http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java?rev=1149480&r1=1149479&r2=1149480&view=diff
==============================================================================
---
camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java
(original)
+++
camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java
Fri Jul 22 06:57:23 2011
@@ -51,6 +51,7 @@ import org.testng.Assert;
public abstract class TestSupport extends Assert {
private static final Logger LOG =
LoggerFactory.getLogger(TestSupport.class);
protected transient Logger log = LoggerFactory.getLogger(getClass());
+ protected static final String LS = System.getProperty("line.separator");
// Builder methods for expressions used when testing
//
-------------------------------------------------------------------------