Skip to content

Commit

Permalink
Add a test file with ordinary useJUnitPlatform()
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikurube committed Sep 10, 2024
1 parent ce28cc9 commit f45a1dd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ configurations {
}

dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:5.11.0"

testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.11.0"
}

// A safer and strict alternative to: "dependencies" (and "dependencies --write-locks")
Expand All @@ -32,3 +35,16 @@ allprojects {
}
}
}

test {
useJUnitPlatform()
testLogging {
events "started", "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
showStandardStreams = true
outputs.upToDateWhen { false }
}
}
12 changes: 12 additions & 0 deletions src/test/java/org/embulk/junit5/example/TestExample.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.embulk.junit5.example;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;

public class TestExample {
@Test
public void testExample() {
assertEquals(0, 1 - 1);
}
}

0 comments on commit f45a1dd

Please sign in to comment.