feat(tenpayv2): 新增部分接口

This commit is contained in:
RHQYZ
2022-01-25 13:24:49 +08:00
committed by GitHub
parent 122cd5186c
commit 6458d08381
234 changed files with 11734 additions and 891 deletions

View File

@@ -34,8 +34,8 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests
Assert.Equal("ERR_CODE_DESC", parsedObjBySystemTextJson.ErrorCodeDescription);
Assert.Equal("TRANSACTION_ID", parsedObjByNewtonsoftJson.TransactionId);
Assert.Equal("TRANSACTION_ID", parsedObjBySystemTextJson.TransactionId);
Assert.Equal(2, parsedObjByNewtonsoftJson.RecordCount);
Assert.Equal(2, parsedObjBySystemTextJson.RecordCount);
Assert.Equal(2, parsedObjByNewtonsoftJson.TotalRecordCount);
Assert.Equal(2, parsedObjBySystemTextJson.TotalRecordCount);
Assert.Equal("SUB_ORDER_NO_0", parsedObjByNewtonsoftJson.RecordList[0].SubOrderNumber);
Assert.Equal("SUB_ORDER_NO_0", parsedObjBySystemTextJson.RecordList[0].SubOrderNumber);
Assert.Equal("SUB_ORDER_ID_0", parsedObjByNewtonsoftJson.RecordList[0].SubOrderId);
@@ -68,14 +68,24 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2.UnitTests
string unparsedJsonByNewtonsoftJson = newtonsoftJsonSerializer.Serialize(parsedObjByNewtonsoftJson);
string unparsedJsonBySystemTextJson = systemTextJsonSerializer.Serialize(parsedObjByNewtonsoftJson);
Assert.Null(Record.Exception(() => Newtonsoft.Json.JsonConvert.DeserializeObject(unparsedJsonByNewtonsoftJson)));
Assert.Null(Record.Exception(() => System.Text.Json.JsonDocument.Parse(unparsedJsonBySystemTextJson)));
Assert.Contains("return_code", unparsedJsonByNewtonsoftJson);
Assert.Contains("return_code", unparsedJsonBySystemTextJson);
Assert.Contains("RETURN_CODE", unparsedJsonByNewtonsoftJson);
Assert.Contains("RETURN_CODE", unparsedJsonBySystemTextJson);
Assert.Contains("return_msg", unparsedJsonByNewtonsoftJson);
Assert.Contains("return_msg", unparsedJsonBySystemTextJson);
Assert.Contains("RETURN_MSG", unparsedJsonByNewtonsoftJson);
Assert.Contains("RETURN_MSG", unparsedJsonBySystemTextJson);
Assert.Contains("sub_order_no_0", unparsedJsonByNewtonsoftJson);
Assert.Contains("sub_order_no_0", unparsedJsonBySystemTextJson);
Assert.Contains("SUB_ORDER_NO_0", unparsedJsonByNewtonsoftJson);
Assert.Contains("SUB_ORDER_NO_0", unparsedJsonBySystemTextJson);
Assert.Contains("sub_order_id_0", unparsedJsonByNewtonsoftJson);
Assert.Contains("sub_order_id_0", unparsedJsonBySystemTextJson);
Assert.Contains("SUB_ORDER_ID_0", unparsedJsonByNewtonsoftJson);
Assert.Contains("SUB_ORDER_ID_0", unparsedJsonBySystemTextJson);
Assert.DoesNotContain("#n", unparsedJsonByNewtonsoftJson);
Assert.DoesNotContain("#n", unparsedJsonBySystemTextJson);
Assert.DoesNotContain("$n", unparsedJsonByNewtonsoftJson);