瀏覽代碼

开启生成器模块单元测试.

lanjerry 1 年之前
父節點
當前提交
ea2340ca37

+ 1 - 1
build.gradle

@@ -185,7 +185,7 @@ subprojects {
         }
         exclude("**/phoenix/**")
         exclude("**/postgresql/**")
-        exclude("**/generator/**")
+//        exclude("**/generator/**")
     }
 
     task javadocJar(type: Jar) {

+ 1 - 0
mybatis-plus-generator/build.gradle

@@ -15,5 +15,6 @@ dependencies {
     testImplementation "${lib.sqlite}"
     testImplementation "${lib.firebird}"
     testImplementation "${lib.'swagger-annotations'}"
+    testImplementation "${lib.'logback-classic'}"
     testCompileOnly "org.jetbrains:annotations:22.0.0"
 }

+ 2 - 4
mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/generator/samples/DMGeneratorTest.java

@@ -2,8 +2,6 @@ package com.baomidou.mybatisplus.generator.samples;
 
 import com.baomidou.mybatisplus.generator.AutoGenerator;
 import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
-import org.junit.jupiter.api.Test;
-
 /**
  * 达梦 代码生成
  *
@@ -20,11 +18,11 @@ public class DMGeneratorTest extends BaseGeneratorTest {
         .schema("SYSDBA")
         .build();
 
-    @Test
-    public void testSimple() {
+    public static void main(String[] args) {
         AutoGenerator generator = new AutoGenerator(DATA_SOURCE_CONFIG);
         generator.strategy(strategyConfig().build());
         generator.global(globalConfig().build());
         generator.execute();
     }
+
 }

+ 2 - 3
mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/generator/samples/MySQLGeneratorTest.java

@@ -2,7 +2,6 @@ package com.baomidou.mybatisplus.generator.samples;
 
 import com.baomidou.mybatisplus.generator.AutoGenerator;
 import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
-import org.junit.jupiter.api.Test;
 
 /**
  * MySQL 代码生成
@@ -20,11 +19,11 @@ public class MySQLGeneratorTest extends BaseGeneratorTest {
         .schema("baomidou")
         .build();
 
-    @Test
-    public void testSimple() {
+    public static void main(String[] args) {
         AutoGenerator generator = new AutoGenerator(DATA_SOURCE_CONFIG);
         generator.strategy(strategyConfig().build());
         generator.global(globalConfig().build());
         generator.execute();
     }
+
 }

+ 2 - 4
mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/generator/samples/OracleGeneratorTest.java

@@ -2,8 +2,6 @@ package com.baomidou.mybatisplus.generator.samples;
 
 import com.baomidou.mybatisplus.generator.AutoGenerator;
 import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
-import org.junit.jupiter.api.Test;
-
 /**
  * Oracle 代码生成
  *
@@ -20,11 +18,11 @@ public class OracleGeneratorTest extends BaseGeneratorTest {
         .schema("ANONYMOUS")
         .build();
 
-    @Test
-    public void testSimple() {
+    public static void main(String[] args) {
         AutoGenerator generator = new AutoGenerator(DATA_SOURCE_CONFIG);
         generator.strategy(strategyConfig().build());
         generator.global(globalConfig().build());
         generator.execute();
     }
+
 }

+ 2 - 3
mybatis-plus-generator/src/test/java/com/baomidou/mybatisplus/generator/samples/PostgreSQLGeneratorTest.java

@@ -2,7 +2,6 @@ package com.baomidou.mybatisplus.generator.samples;
 
 import com.baomidou.mybatisplus.generator.AutoGenerator;
 import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
-import org.junit.jupiter.api.Test;
 
 /**
  * PostgreSQL 代码生成
@@ -19,11 +18,11 @@ public class PostgreSQLGeneratorTest extends BaseGeneratorTest {
         .Builder("jdbc:postgresql://xxxx:5432/postgres", "postgres", "postgres")
         .build();
 
-    @Test
-    public void testSimple() {
+    public static void main(String[] args) {
         AutoGenerator generator = new AutoGenerator(DATA_SOURCE_CONFIG);
         generator.strategy(strategyConfig().build());
         generator.global(globalConfig().build());
         generator.execute();
     }
+
 }