First runnable tests for Database / Commented out Good/BadCasesTests (not relevant to this branch)
This commit is contained in:
33
test/hhn/temp/project/DatabaseGoodCasesTest.java
Normal file
33
test/hhn/temp/project/DatabaseGoodCasesTest.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package hhn.temp.project;
|
||||
|
||||
import hhn.temp.project.provider.DatabaseManager;
|
||||
import hhn.temp.project.provider.SimpleDatabaseManager;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class DatabaseGoodCasesTest {
|
||||
|
||||
private DatabaseManager<DatabaseGoodCasesTest.TestClass> databaseManager;
|
||||
|
||||
public class TestClass {
|
||||
private int id;
|
||||
private String dataString;
|
||||
private int dataInteger;
|
||||
|
||||
public TestClass(int id, String dataString, int dataInteger) {
|
||||
this.id = id;
|
||||
this.dataString = dataString;
|
||||
this.dataInteger = dataInteger;
|
||||
}
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
databaseManager = new SimpleDatabaseManager<>();
|
||||
}
|
||||
|
||||
public void assertConnectToDatabase() throws SQLException {
|
||||
databaseManager.connect();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user