Merge remote-tracking branch 'origin/master'

master
星期八 5 years ago
commit d807557d5f
  1. 16
      panda-aop/src/test/java/org/panda/aop/util/InterfaceProxyFactoryUtilTest.java
  2. 48
      panda-jdbc/src/test/java/org/panda/jdbc/JdbcUtilsTest.java
  3. 113
      panda-jdbc/src/test/java/org/panda/jdbc/sql/MysqlBuilderTest.java
  4. 24
      pom.xml

@ -1,16 +0,0 @@
package org.panda.aop.util;
import org.panda.aop.service.HelloService;
import static org.junit.Assert.*;
public class InterfaceProxyFactoryUtilTest {
public void newMapperProxy() {
}
public void invoke() {
HelloService helloService = InterfaceProxyFactoryUtil.newMapperProxy(HelloService.class);
helloService.sayHello("nihoa");
}
}

@ -1,48 +0,0 @@
package org.panda.jdbc;
import org.junit.Test;
import org.panda.jdbc.mode.DbInfo;
import org.panda.jdbc.mode.Table;
import java.util.List;
import static org.junit.Assert.*;
public class JdbcUtilsTest {
private JdbcUtils jdbcUtils=new JdbcUtils("com.mysql.jdbc.Driver","jdbc:mysql://localhost:3306/ssm?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8","root","mysql");
public void getDBInfo() {
DbInfo dbInfo = jdbcUtils.getDBInfo();
System.out.println(dbInfo);
}
public void getAllTable() {
List<Table> tableList = jdbcUtils.getAllTable();
tableList.forEach((table)->{
System.out.println(table);
});
}
@Test
public void update() {
}
@Test
public void beatchUpdate() {
}
@Test
public void createTable() {
}
@Test
public void query() {
}
@Test
public void release() {
}
}

@ -1,113 +0,0 @@
package org.panda.jdbc.sql;
import com.github.jsonzou.jmockdata.JMockData;
import org.junit.Test;
import org.panda.entity.SysUser;
import java.util.Date;
import static org.junit.Assert.*;
public class MysqlBuilderTest {
private AbstractDbBuiler abstractDbBuiler = new MysqlBuilder();
@Test
public void automaticUpdateDb() {
}
@Test
public void concatPageSql() {
StringBuffer sql = new StringBuffer("select count(*) from sys_users");
String countSql = abstractDbBuiler.concatPageSql(sql.toString(), new PageInterface() {
@Override
public Integer getPage() {
return 2;
}
@Override
public Integer getPageSize() {
return 20;
}
});
System.out.println(countSql);
}
@Test
public void createTableStr() {
}
@Test
public void insertSql() {
SysUser sysUser = new SysUser();
sysUser.setId(1L);
sysUser.setName("admin");
sysUser.setCreateTime(new Date());
String sql = abstractDbBuiler.insertSql(sysUser);
System.out.println(sql);
}
@Test
public void insertSql1() {
}
@Test
public void updateSql() {
}
@Test
public void updateSql1() {
}
@Test
public void deleteSql() {
}
@Test
public void deleteSql1() {
}
@Test
public void automaticUpdateDb1() {
}
@Test
public void concatPageSql1() {
}
@Test
public void createTableStr1() {
}
@Test
public void insertSql2() {
AbstractDbBuiler abstractDbBuiler = new MysqlBuilder();
SysUser sysUser = JMockData.mock(SysUser.class);
System.out.println(sysUser);
sysUser.setId(null);
String insertSql = abstractDbBuiler.insertSql(sysUser);
System.out.println(insertSql);
}
@Test
public void insertSql3() {
}
@Test
public void updateSql2() {
}
@Test
public void updateSql3() {
}
@Test
public void deleteSql2() {
}
@Test
public void deleteSql3() {
}
}

@ -69,4 +69,28 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>nexus-3rd</id>
<url>http://106.12.122.216:8011/nexus/content/repositories/thirdparty/</url>
</repository>
</distributionManagement>
</project>
Loading…
Cancel
Save