38 lines
929 B
Java
38 lines
929 B
Java
package hhn.temp.project;
|
|
|
|
import hhn.temp.project.provider.DatabaseManager;
|
|
import hhn.temp.project.provider.SimpleDatabaseManager;
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.DisplayName;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
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<>();
|
|
}
|
|
|
|
|
|
@Test
|
|
@DisplayName("Assert connecting to database")
|
|
public void assertConnectToDatabase() throws SQLException {
|
|
databaseManager.connect();
|
|
}
|
|
} |