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.
23 lines
696 B
23 lines
696 B
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using Senparc.Weixin.TenPayV3.Helpers;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Senparc.Weixin.TenPayV3.Helpers.Tests
|
|
{
|
|
[TestClass()]
|
|
public class TenPayDateTimeHelperTests
|
|
{
|
|
[TestMethod()]
|
|
public void ToTenPayDateTimeTest()
|
|
{
|
|
var dateTime = new DateTime(2021, 1, 24, 2, 16, 54, 666);
|
|
var dtString = dateTime.ToTenPayDateTime();
|
|
Assert.AreEqual("2021-01-24T02:16:54.666+08:00", dtString);
|
|
|
|
dtString = dateTime.ToTenPayDateTime(false);
|
|
Assert.AreEqual("2021-01-24T02:16:54+08:00", dtString);
|
|
}
|
|
}
|
|
} |