Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
修复测试文件中多余的空行
Agent-Logs-Url: https://github.com/binarywang/WxJava/sessions/4f76043e-c058-4838-8d60-a43a1c878544

Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
  • Loading branch information
Copilot and binarywang authored Apr 7, 2026
commit dd6d48ea15dc703b0ec1d6391fcf9630a33d75b7
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ public void testAppResultJsonSerializationPackageFieldName() throws Exception {
Assert.assertEquals(jsonObject.get("package").getAsString(), "Sign=WXPay");
Comment on lines +239 to +250
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新增的 JSON 序列化测试目前只校验了 package/packageValue;但如果调用方直接用 Gson 序列化 AppResult,partnerId/prepayId 仍会输出为驼峰 key(partnerId/prepayId),与微信 APP 支付期望的 partnerid/prepayid 不一致。建议在同一组测试里也断言 partnerid/prepayid 的字段名与值(并在代码侧配合补齐 @SerializedName)。

Copilot uses AI. Check for mistakes.
}


@Test(expectedExceptions = IllegalArgumentException.class,
@Test(expectedExceptions = IllegalArgumentException.class,
expectedExceptionsMessageRegExp = "prepayId, appId 和 privateKey 不能为空")
public void testGetJsapiPayInfoWithNullPrepayId() {
WxPayUnifiedOrderV3Result.getJsapiPayInfo(null, "appId", null);
Expand Down