Updated MySQL Methods, Tests and Information accordingly. (High security risk btw)

This commit is contained in:
Riley Schneider
2025-12-03 20:15:28 +01:00
parent d3488f1f1c
commit 57144fa772
21 changed files with 53 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.sql.SQLException;
public class DatabaseGoodCasesTest {
@@ -29,10 +30,27 @@ public class DatabaseGoodCasesTest {
databaseManager = new SimpleDatabaseManager<>();
}
@Test
@DisplayName("Assert that the TestClass could be inserted into the database")
public void assertGetTestClass() throws SQLException, IOException {
TestClass testClass = new TestClass(1, "Hello World", 123);
databaseManager.connect();
databaseManager.getObject(1);
}
@Test
@DisplayName("Assert that the TestClass could be inserted into the database")
public void assertInsertTestClass() throws SQLException, IOException {
TestClass testClass = new TestClass(1, "Hello World", 123);
databaseManager.connect();
databaseManager.saveObject(testClass);
}
@Test
@DisplayName("Assert connecting to database")
public void assertConnectToDatabase() throws SQLException {
public void assertConnectToDatabase() throws SQLException, IOException {
databaseManager.connect();
}
}