diff --git a/src/test/java/com/github/App2Test.java b/src/test/java/com/github/App2Test.java new file mode 100644 index 0000000..0c2a415 --- /dev/null +++ b/src/test/java/com/github/App2Test.java @@ -0,0 +1,98 @@ +package com.github; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Collections; +import java.util.List; +import org.junit.Ignore; +import org.junit.Test; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * Unit test for simple App. + */ +public class App2Test { + /** + * Rigorous Test :-) + */ + @Test + public void attachment() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + @Ignore + public void attachment2() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + public void attachment3() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + printLotsToStdOut(); + + assertThat(false, is(true)); + } + + public static void printLotsToStdOut() { + String s = "a"; + int n = 100; + for (int i = 0; i < 100; i++) { + System.out.println(String.join("", Collections.nCopies(n, s))); + } + } + + @Test + public void attachment4() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment5() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + @Ignore + public void attachment6() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } +} diff --git a/src/test/java/com/github/App3Test.java b/src/test/java/com/github/App3Test.java new file mode 100644 index 0000000..5cc625d --- /dev/null +++ b/src/test/java/com/github/App3Test.java @@ -0,0 +1,93 @@ +package com.github; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Collections; +import java.util.List; +import org.junit.Ignore; +import org.junit.Test; + +import static com.github.App2Test.printLotsToStdOut; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * Unit test for simple App. + */ +public class App3Test { + /** + * Rigorous Test :-) + */ + @Test + public void attachment() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + printLotsToStdOut(); + + assertThat(false, is(true)); + } + + @Test + @Ignore + public void attachment2() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + public void attachment3() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + printLotsToStdOut(); + + assertThat(false, is(true)); + } + + @Test + public void attachment4() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + printLotsToStdOut(); + + assertThat(false, is(true)); + } + + @Test + public void attachment5() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + printLotsToStdOut(); + + assertThat(false, is(true)); + } + + @Test + @Ignore + public void attachment6() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } +} diff --git a/src/test/java/com/github/App4Test.java b/src/test/java/com/github/App4Test.java new file mode 100644 index 0000000..e538e65 --- /dev/null +++ b/src/test/java/com/github/App4Test.java @@ -0,0 +1,93 @@ +package com.github; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Collections; +import java.util.List; +import org.junit.Ignore; +import org.junit.Test; + +import static com.github.App2Test.printLotsToStdOut; +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * Unit test for simple App. + */ +public class App4Test { + /** + * Rigorous Test :-) + */ + @Test + public void attachment() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + printLotsToStdOut(); + + assertThat(false, is(true)); + } + + @Test + @Ignore + public void attachment2() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + public void attachment3() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertssThat(false, is(true)); + } + + @Test + public void attachment4() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + public void attachment5() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + @Ignore + public void attachment6() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } +} diff --git a/src/test/java/com/github/App5Test.java b/src/test/java/com/github/App5Test.java new file mode 100644 index 0000000..6af850b --- /dev/null +++ b/src/test/java/com/github/App5Test.java @@ -0,0 +1,90 @@ +package com.github; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Collections; +import java.util.List; +import org.junit.Ignore; +import org.junit.Test; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +/** + * Unit test for simple App. + */ +public class App5Test { + /** + * Rigorous Test :-) + */ + @Test + public void attachment() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + @Ignore + public void attachment2() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + public void attachment3() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + public void attachment4() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + public void attachment5() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } + + @Test + @Ignore + public void attachment6() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(false, is(true)); + } +} diff --git a/src/test/java/com/github/AppTest.java b/src/test/java/com/github/AppTest.java index 0c0ad05..f7a3756 100644 --- a/src/test/java/com/github/AppTest.java +++ b/src/test/java/com/github/AppTest.java @@ -29,6 +29,61 @@ public void attachment() throws IOException { System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); - assertThat(false, is(true)); + assertThat(true, is(true)); + } + + @Test + public void attachment2() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment3() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment4() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment5() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); + } + + @Test + public void attachment6() throws IOException { + Path file = Paths.get("hello.txt"); + List linesInMemory = Collections.singletonList("HEY HEY"); + Files.write(file, linesInMemory, StandardCharsets.UTF_8); + + System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]"); + + assertThat(true, is(true)); } }