Implement getURL() for JDBC4DatabaseMetaData

This commit is contained in:
김선우
2025-02-09 10:49:06 +09:00
parent f6bd58e7a4
commit ea02664f68
4 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
package org.github.tursodatabase.jdbc4;
import static org.junit.jupiter.api.Assertions.*;
import java.util.Properties;
import org.github.tursodatabase.TestUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
class JDBC4DatabaseMetaDataTest {
private JDBC4Connection connection;
private JDBC4DatabaseMetaData metaData;
@BeforeEach
void setUp() throws Exception {
String filePath = TestUtils.createTempFile();
String url = "jdbc:sqlite:" + filePath;
connection = new JDBC4Connection(url, filePath, new Properties());
metaData = new JDBC4DatabaseMetaData(connection);
}
@Test
void getURLShouldReturnNonEmptyString() throws Exception{
assertFalse(metaData.getURL().isEmpty());
}
}