Add simple translate test

This commit is contained in:
JFronny 2021-06-21 16:18:01 +02:00
parent 38d411ef9d
commit b4f402ec19
No known key found for this signature in database
GPG Key ID: BEC5ACBBD4EE17E5
2 changed files with 20 additions and 0 deletions

View File

@ -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()
}

View File

@ -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));
}
}