You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

using Microsoft.VisualStudio.TestTools.UnitTesting;
using Senparc.WeixinTests;
using System;
using System.Collections.Generic;
using System.Text;
namespace Senparc.Weixin.MP.Test.NetCore3.AdvancedAPIs.Invoice.InvoiceJson
{
/// <summary>
/// 序列化测试
/// </summary>
[TestClass]
public class InvoiceJsonSerializeTests : BaseTest
{
[TestMethod]
public void InvoiceJsonSerializeTest()
{
var data = new Senparc.Weixin.MP.AdvancedAPIs.GetAuthUrlData()
{
s_pappid = "appid",
order_id = "1234",
money = 11,
timestamp = 1474875876,
source = SourceType.web.ToString(),
redirect_url = "https://mp.weixin.qq.com",
type = AuthType.,
ticket = "ticket"
};
var jsonStr = Senparc.CO2NET.Helpers.SerializerHelper.GetJsonString(data);
Console.WriteLine(jsonStr);
Assert.IsTrue(jsonStr.Contains("web"));
}
}
}