diff --git a/.project b/.project index 700a32c79..267b6cbaf 100644 --- a/.project +++ b/.project @@ -20,4 +20,15 @@ org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature + + + 1609413910592 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + diff --git a/src/main/java/com/mycompany/app/App.java b/src/main/java/com/mycompany/app/App.java index 3abe07856..7a157910e 100644 --- a/src/main/java/com/mycompany/app/App.java +++ b/src/main/java/com/mycompany/app/App.java @@ -9,6 +9,6 @@ public class App { public static void main( String[] args ) { - System.out.println( "Hello Remote World!" ); + System.out.print( "Hello Remote World!" ); } } diff --git a/src/test/java/com/mycompany/app/AppTest.java b/src/test/java/com/mycompany/app/AppTest.java index a315bb5b3..2e36b55ca 100644 --- a/src/test/java/com/mycompany/app/AppTest.java +++ b/src/test/java/com/mycompany/app/AppTest.java @@ -2,6 +2,7 @@ import org.junit.Test; import static org.junit.Assert.*; +import java.io.*; public class AppTest @@ -20,4 +21,18 @@ public void testMore() { assertTrue( true ); } + + @Test + public void testSystemOut() + { + PrintStream originalOut = System.out; + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + System.setOut(new PrintStream(bos)); + + App.main(null); + + assertEquals("Hello Remote World!", bos.toString()); + + System.setOut(originalOut); + } }