You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
492 B

package com.insigma.utils;
import cn.hutool.db.Session;
import org.junit.Test;
import static org.junit.jupiter.api.Assertions.*;
import java.sql.SQLException;
public class DbUtilTest {
@Test
public void getSessionTest() throws SQLException {
Session session = DbUtil.getSession("jdbc:mysql://127.0.0.1:35017/hy_qggwy", "root", "admin");
String queryString = session.queryString("select count(1) from a01 limit 1");
assertNotEquals("0", queryString);
}
}