aboutsummaryrefslogtreecommitdiffhomepage
path: root/base_workspace/examples/java-skylark/src/test/java/com/example/myproject/TestHello.java
diff options
context:
space:
mode:
Diffstat (limited to 'base_workspace/examples/java-skylark/src/test/java/com/example/myproject/TestHello.java')
-rw-r--r--base_workspace/examples/java-skylark/src/test/java/com/example/myproject/TestHello.java35
1 files changed, 0 insertions, 35 deletions
diff --git a/base_workspace/examples/java-skylark/src/test/java/com/example/myproject/TestHello.java b/base_workspace/examples/java-skylark/src/test/java/com/example/myproject/TestHello.java
deleted file mode 100644
index d50e6e503f..0000000000
--- a/base_workspace/examples/java-skylark/src/test/java/com/example/myproject/TestHello.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.example.myproject;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import java.nio.charset.StandardCharsets;
-
-/**
- * Tests different numbers of arguments to main().
- *
- * <p>With an empty args array, {@link Greeter} should print "Hello world". If there are one or more
- * args, {@link Greeter} should print "Hello &lt;arg[0]&gt;".</p>
- */
-public class TestHello {
-
- @Test
- public void testNoArgument() throws Exception {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- Greeter.out = new PrintStream(out);
- Greeter.main();
- assertEquals("Hello world\n", new String(out.toByteArray(), StandardCharsets.UTF_8));
- }
-
- @Test
- public void testWithArgument() throws Exception {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- Greeter.out = new PrintStream(out);
- Greeter.main("toto");
- assertEquals("Hello toto\n", new String(out.toByteArray(), StandardCharsets.UTF_8));
- }
-
-}