Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of passing #5

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pipeline {
stages {
stage('Build') {
steps {
sh "sleep 20"
// Run Maven on a Unix agent.
sh "mvn -Dmaven.test.failure.ignore=true clean verify"
}
Expand All @@ -17,5 +18,15 @@ pipeline {
}
}
}
stage('Sleep') {
steps {
sh "sleep 3"
}
}
stage('Sleep2') {
steps {
sh "sleep 4"
}
}
}
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# junit-attachments-test

hello world2
87 changes: 87 additions & 0 deletions src/test/java/com/github/App2Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
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.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<String> 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 attachment2() throws IOException {
Path file = Paths.get("hello.txt");
List<String> 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<String> 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<String> 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<String> 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<String> linesInMemory = Collections.singletonList("HEY HEY");
Files.write(file, linesInMemory, StandardCharsets.UTF_8);

System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]");

assertThat(true, is(true));
}
}
57 changes: 56 additions & 1 deletion src/test/java/com/github/AppTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> 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<String> 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<String> 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<String> 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<String> linesInMemory = Collections.singletonList("HEY HEY");
Files.write(file, linesInMemory, StandardCharsets.UTF_8);

System.out.println("[[ATTACHMENT|" + file.toAbsolutePath() + "]]");

assertThat(true, is(true));
}
}