This commit is contained in:
Looly
2021-04-04 12:12:53 +08:00
parent 78aaab53bc
commit d60b315a20
3 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
package cn.hutool.db.dialect;
import org.junit.Assert;
import org.junit.Test;
public class DriverUtilTest {
@Test
public void identifyDriverTest(){
String url = "jdbc:h2:file:./db/test;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;MODE=MYSQL";
String driver = DriverUtil.identifyDriver(url); // driver 返回 mysql 的 driver
Assert.assertEquals("org.h2.Driver", driver);
}
}