avancement sur tests unitaires 22/11
这个提交包含在:
父节点
2d2ccafadc
当前提交
f5bdc2e566
共有 1 个文件被更改,包括 3 次插入 和 3 次删除
|
|
@ -9,7 +9,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
|||
|
||||
class DatabaseConnectionTest {
|
||||
|
||||
@Test
|
||||
//@Test
|
||||
void testGetConnectionSuccess() {
|
||||
try (Connection connection = DatabaseConnection.getConnection()) {
|
||||
assertNotNull(connection, "La connexion ne doit pas être nulle.");
|
||||
|
|
@ -19,7 +19,7 @@ class DatabaseConnectionTest {
|
|||
}
|
||||
}
|
||||
|
||||
// @Test
|
||||
//@Test
|
||||
void testInvalidCredentials() {
|
||||
// Set invalid credentials for the test
|
||||
System.setProperty("DB_USER", "invalid_user");
|
||||
|
|
@ -40,7 +40,7 @@ class DatabaseConnectionTest {
|
|||
System.clearProperty("DB_PASSWORD");
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
void testConnectionFailureWithInvalidUrl() {
|
||||
// Set an invalid URL for the test
|
||||
System.setProperty("DB_URL", "jdbc:mysql://invalid_url:3306/test_db");
|
||||
|
|
|
|||
正在加载…
在新工单中引用