diff --git a/Core/src/test/java/FileTest.java b/Core/src/test/java/FileTest.java new file mode 100644 index 0000000..e338b82 --- /dev/null +++ b/Core/src/test/java/FileTest.java @@ -0,0 +1,13 @@ +import me.zacharias.chat.core.files.FileHandler; +import me.zacharias.chat.core.files.FileHandlerException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +public class FileTest { + @Test + void TestError() + { + FileHandler fileHandler = new FileHandler("./test/files"); + Assertions.assertThrowsExactly(FileHandlerException.class, () -> fileHandler.readFile("../build.gradle")); + } +} diff --git a/build.gradle b/build.gradle index da829b0..37ee291 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,12 @@ subprojects { implementation("org.json:json:20250107") implementation("com.github.docker-java:docker-java:3.4.1") implementation("org.jetbrains:annotations:23.1.0") + + testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0' + } + + test { + useJUnitPlatform() } task sourcesJar(type: Jar, dependsOn: classes) {