Updated build.gradle to now include some Unit tests

Started implumenting Unit Tests
This commit is contained in:
2025-03-25 23:34:07 +01:00
parent 9b3c6c20b8
commit 58c23c5897
2 changed files with 19 additions and 0 deletions

View File

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

View File

@@ -21,6 +21,12 @@ subprojects {
implementation("org.json:json:20250107") implementation("org.json:json:20250107")
implementation("com.github.docker-java:docker-java:3.4.1") implementation("com.github.docker-java:docker-java:3.4.1")
implementation("org.jetbrains:annotations:23.1.0") implementation("org.jetbrains:annotations:23.1.0")
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
}
test {
useJUnitPlatform()
} }
task sourcesJar(type: Jar, dependsOn: classes) { task sourcesJar(type: Jar, dependsOn: classes) {