浏览代码

:art: solon-plugins 添加单元测试支持,可触发必要错误用于人工核对

西东 8 月之前
父节点
当前提交
a6e3c86505
共有 19 个文件被更改,包括 249 次插入0 次删除
  1. 6 0
      solon-plugins/pom.xml
  2. 15 0
      solon-plugins/wx-java-channel-solon-plugin/src/test/java/features/test/LoadTest.java
  3. 0 0
      solon-plugins/wx-java-channel-solon-plugin/src/test/resources/app.yml
  4. 15 0
      solon-plugins/wx-java-cp-multi-solon-plugin/src/test/java/features/test/LoadTest.java
  5. 19 0
      solon-plugins/wx-java-cp-multi-solon-plugin/src/test/resources/app.properties
  6. 15 0
      solon-plugins/wx-java-cp-solon-plugin/src/test/java/features/test/LoadTest.java
  7. 20 0
      solon-plugins/wx-java-cp-solon-plugin/src/test/resources/app.properties
  8. 15 0
      solon-plugins/wx-java-miniapp-solon-plugin/src/test/java/features/test/LoadTest.java
  9. 18 0
      solon-plugins/wx-java-miniapp-solon-plugin/src/test/resources/app.properties
  10. 15 0
      solon-plugins/wx-java-mp-multi-solon-plugin/src/test/java/features/test/LoadTest.java
  11. 23 0
      solon-plugins/wx-java-mp-multi-solon-plugin/src/test/resources/app.properties
  12. 15 0
      solon-plugins/wx-java-mp-solon-plugin/src/test/java/features/test/LoadTest.java
  13. 11 0
      solon-plugins/wx-java-mp-solon-plugin/src/test/resources/app.properties
  14. 15 0
      solon-plugins/wx-java-open-solon-plugin/src/test/java/features/test/LoadTest.java
  15. 11 0
      solon-plugins/wx-java-open-solon-plugin/src/test/resources/app.properties
  16. 15 0
      solon-plugins/wx-java-pay-solon-plugin/src/test/java/features/test/LoadTest.java
  17. 6 0
      solon-plugins/wx-java-pay-solon-plugin/src/test/resources/app.yml
  18. 15 0
      solon-plugins/wx-java-qidian-solon-plugin/src/test/java/features/test/LoadTest.java
  19. 0 0
      solon-plugins/wx-java-qidian-solon-plugin/src/test/resources/app.yml

+ 6 - 0
solon-plugins/pom.xml

@@ -40,5 +40,11 @@
       <artifactId>lombok</artifactId>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.noear</groupId>
+      <artifactId>solon-test</artifactId>
+      <version>${solon.version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>

+ 15 - 0
solon-plugins/wx-java-channel-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 0 - 0
solon-plugins/wx-java-channel-solon-plugin/src/test/resources/app.yml


+ 15 - 0
solon-plugins/wx-java-cp-multi-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 19 - 0
solon-plugins/wx-java-cp-multi-solon-plugin/src/test/resources/app.properties

@@ -0,0 +1,19 @@
+# ?? 1 ??
+wx.cp.corps.tenantId1.corp-id = @corp-id
+wx.cp.corps.tenantId1.corp-secret = @corp-secret
+  ## ??
+wx.cp.corps.tenantId1.agent-id = @agent-id
+wx.cp.corps.tenantId1.token = @token
+wx.cp.corps.tenantId1.aes-key = @aes-key
+wx.cp.corps.tenantId1.msg-audit-priKey = @msg-audit-priKey
+wx.cp.corps.tenantId1.msg-audit-lib-path = @msg-audit-lib-path
+
+  # ?? 2 ??
+wx.cp.corps.tenantId2.corp-id = @corp-id
+wx.cp.corps.tenantId2.corp-secret = @corp-secret
+  ## ??
+wx.cp.corps.tenantId2.agent-id = @agent-id
+wx.cp.corps.tenantId2.token = @token
+wx.cp.corps.tenantId2.aes-key = @aes-key
+wx.cp.corps.tenantId2.msg-audit-priKey = @msg-audit-priKey
+wx.cp.corps.tenantId2.msg-audit-lib-path = @msg-audit-lib-path

+ 15 - 0
solon-plugins/wx-java-cp-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 20 - 0
solon-plugins/wx-java-cp-solon-plugin/src/test/resources/app.properties

@@ -0,0 +1,20 @@
+# ???????(??)
+wx.cp.corp-id = @corp-id
+wx.cp.corp-secret = @corp-secret
+# ??
+wx.cp.agent-id = @agent-id
+wx.cp.token = @token
+wx.cp.aes-key = @aes-key
+wx.cp.msg-audit-priKey = @msg-audit-priKey
+wx.cp.msg-audit-lib-path = @msg-audit-lib-path
+# ConfigStorage ??????
+wx.cp.config-storage.type=memory # ????: memory(??), jedis, redisson, redistemplate
+# http ?????????
+wx.cp.config-storage.http-proxy-host=
+wx.cp.config-storage.http-proxy-port=
+wx.cp.config-storage.http-proxy-username=
+wx.cp.config-storage.http-proxy-password=
+# ??????????5 ?????? 0??? 0
+wx.cp.config-storage.max-retry-times=5
+# ????????????1000 ??????? 0??? 1000
+wx.cp.config-storage.retry-sleep-millis=1000

+ 15 - 0
solon-plugins/wx-java-miniapp-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 18 - 0
solon-plugins/wx-java-miniapp-solon-plugin/src/test/resources/app.properties

@@ -0,0 +1,18 @@
+# ?????(??)
+wx.miniapp.appid = appId
+wx.miniapp.secret = @secret
+wx.miniapp.token = @token
+wx.miniapp.aesKey = @aesKey
+wx.miniapp.msgDataFormat = @msgDataFormat                  # ?????XML??JSON.
+# ????redis(??)
+# ??: ??redis.host???????????redis??(JedisPool)
+wx.miniapp.config-storage.type = Jedis                     # ????: Memory(??), Jedis, RedisTemplate
+wx.miniapp.config-storage.key-prefix = wa                  # ??redis????: wa(??)
+wx.miniapp.config-storage.redis.host = 127.0.0.1
+wx.miniapp.config-storage.redis.port = 6379
+# http?????
+wx.miniapp.config-storage.http-client-type=HttpClient      # http?????: HttpClient(??), OkHttp, JoddHttp
+wx.miniapp.config-storage.http-proxy-host=
+wx.miniapp.config-storage.http-proxy-port=
+wx.miniapp.config-storage.http-proxy-username=
+wx.miniapp.config-storage.http-proxy-password=

+ 15 - 0
solon-plugins/wx-java-mp-multi-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 23 - 0
solon-plugins/wx-java-mp-multi-solon-plugin/src/test/resources/app.properties

@@ -0,0 +1,23 @@
+# ?????
+## ?? 1 ??(??)
+wx.mp.apps.tenantId1.app-id=appId
+wx.mp.apps.tenantId1.app-secret=@secret
+## ??
+wx.mp.apps.tenantId1.token=@token
+wx.mp.apps.tenantId1.aes-key=@aesKey
+wx.mp.apps.tenantId1.use-stable-access-token=@useStableAccessToken
+## ?? 2 ??(??)
+wx.mp.apps.tenantId2.app-id=@appId
+wx.mp.apps.tenantId2.app-secret =@secret
+## ??
+wx.mp.apps.tenantId2.token=@token
+wx.mp.apps.tenantId2.aes-key=@aesKey
+wx.mp.apps.tenantId2.use-stable-access-token=@useStableAccessToken
+
+# ConfigStorage ??????
+## ????: memory(??), jedis, redisson, redis_template
+wx.mp.config-storage.type=memory
+## ??redis????: wx:mp:multi(??)
+wx.mp.config-storage.key-prefix=wx:mp:multi
+wx.mp.config-storage.redis.host=127.0.0.1
+wx.mp.config-storage.redis.port=6379

+ 15 - 0
solon-plugins/wx-java-mp-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 11 - 0
solon-plugins/wx-java-mp-solon-plugin/src/test/resources/app.properties

@@ -0,0 +1,11 @@
+# ?????(??)
+wx.mp.app-id=appId
+wx.mp.secret=@secret
+wx.mp.token=@token
+wx.mp.aes-key=@aesKey
+wx.mp.use-stable-access-token=@useStableAccessToken
+# ????redis(??)
+wx.mp.config-storage.type= edis                     # ????: Memory(??), Jedis, RedisTemplate
+wx.mp.config-storage.key-prefix=wx                  # ??redis????: wx(??)
+wx.mp.config-storage.redis.host=127.0.0.1
+wx.mp.config-storage.redis.port=6379

+ 15 - 0
solon-plugins/wx-java-open-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 11 - 0
solon-plugins/wx-java-open-solon-plugin/src/test/resources/app.properties

@@ -0,0 +1,11 @@
+# ?????(??)
+wx.open.appId = appId
+wx.open.secret = @secret
+wx.open.token = @token
+wx.open.aesKey = @aesKey
+# ????redis(??)
+# ???????(JedisPool, RedissonClient), ????wx.open.config-storage.redis.host, ????????redis????
+wx.open.config-storage.type = redis                     # ????: memory(??), redis(jedis), jedis, redisson, redistemplate
+wx.open.config-storage.key-prefix = wx                  # ??redis????: wx(??)
+wx.open.config-storage.redis.host = 127.0.0.1
+wx.open.config-storage.redis.port = 6379

+ 15 - 0
solon-plugins/wx-java-pay-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 6 - 0
solon-plugins/wx-java-pay-solon-plugin/src/test/resources/app.yml

@@ -0,0 +1,6 @@
+wx:
+  pay:
+    appId:
+    mchId:
+    mchKey:
+    keyPath:

+ 15 - 0
solon-plugins/wx-java-qidian-solon-plugin/src/test/java/features/test/LoadTest.java

@@ -0,0 +1,15 @@
+package features.test;
+
+import org.junit.jupiter.api.Test;
+import org.noear.solon.test.SolonTest;
+
+/**
+ * @author noear 2024/9/4 created
+ */
+@SolonTest
+public class LoadTest {
+  @Test
+  public void load(){
+
+  }
+}

+ 0 - 0
solon-plugins/wx-java-qidian-solon-plugin/src/test/resources/app.yml