Skip to content

Commit

Permalink
Test with Junit5 added
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Jan 11, 2025
1 parent a8f13bb commit 04f26a3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ link:https://semver.org/spec/v2.0.0.html[Semantic Versioning].

==== Added

* Test with Junit5
* Change FreeMarker version section in README
* SonarCloud scan
* CONTRIBUTING.adoc
Expand Down
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ version = "0.1.9"

val freemarkerVersion = "2.3.34"
val graalSdkVersion = "24.1.1"
val junitJupiterVersion = "5.11.4"

val profile = findProperty("profile") as String? ?: "default"

Expand All @@ -21,6 +22,8 @@ repositories {
dependencies {
implementation("org.freemarker:freemarker:$freemarkerVersion")
compileOnly("org.graalvm.sdk:graal-sdk:$graalSdkVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
}

java {
Expand All @@ -30,6 +33,13 @@ java {
withJavadocJar()
}

tasks.test {
useJUnitPlatform()
testLogging {
events("PASSED", "FAILED", "SKIPPED")
}
}

object Meta {
const val desc = "GraalVM support for ApacheFreemarker."
const val githubRepo = "fugerit-org/freemarker-native"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
@TargetClass(_Log4jOverSLF4JTester.class)
public final class Log4jOverSLF4JTesterSubstitute {

private Log4jOverSLF4JTesterSubstitute() {}

/**
* The original method is substituted with a stub returning always false.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.fugerit.java.freemarkernative;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

class TestLog4jOverSLF4JTesterSubstitute {

@Test
void testOk() {
Assertions.assertFalse( Log4jOverSLF4JTesterSubstitute.test() );
}

}

0 comments on commit 04f26a3

Please sign in to comment.