diff --git a/build.gradle b/build.gradle index 5bae931..9987c0f 100644 --- a/build.gradle +++ b/build.gradle @@ -19,4 +19,10 @@ dependencies { download("https://gitlab.com/jfmods/LibJF/-/jobs/artifacts/master/raw/latest-dev.jar?job=build_test", "libjf") modImplementation "com.terraformersmc:modmenu:2.0.0-beta.7" + + testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') +} + +test { + useJUnitPlatform() } diff --git a/src/test/java/io/gitlab/jfronny/translater/GoogleBackendTest.java b/src/test/java/io/gitlab/jfronny/translater/GoogleBackendTest.java new file mode 100644 index 0000000..b6a63c4 --- /dev/null +++ b/src/test/java/io/gitlab/jfronny/translater/GoogleBackendTest.java @@ -0,0 +1,14 @@ +package io.gitlab.jfronny.translater; + +import io.gitlab.jfronny.translater.translation.GoogleService; +import io.gitlab.jfronny.translater.translation.WurstGoogleBackend; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +public class GoogleBackendTest { + @Test + void simpleTranslate() { + WurstGoogleBackend gb = new WurstGoogleBackend(); + assertEquals("Guten Morgen.", gb.translate("Good morning.", GoogleService.Language.GERMAN, GoogleService.Language.ENGLISH)); + } +}