Skip to content

Commit

Permalink
improve unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed Jan 25, 2024
1 parent b43e149 commit 7df21f3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/test/java/me/mrnavastar/sqlib/SQLibTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.nio.file.Path;
import java.util.UUID;

import static org.junit.jupiter.api.Assertions.*;

public class SQLibTest {

private static final Database database = new SQLiteDatabase("test", ".");
private static Database database;

private final String testString = "Test String";
private final int testInt = 37;
Expand All @@ -35,6 +37,13 @@ public class SQLibTest {
private final MutableText testText = (MutableText) Text.of("Test Text");
private final Identifier testIdentifier = new Identifier("test", "identifier");


@BeforeAll
public static void init() {
SQLib.init(Path.of("."), Path.of("."));
database = SQLib.getDatabase();
}

@Test
public void testAllTransactions() {
Table table = database.createTable("test", "table1")
Expand Down

0 comments on commit 7df21f3

Please sign in to comment.