MasstransferExporter/MasstransferCommon.Tests/Utils/JsonUtilTest.cs

21 lines
523 B
C#
Raw Normal View History

2024-09-10 11:25:18 +00:00
using System.IO;
using JetBrains.Annotations;
using MasstransferCommon.Utils;
using MasstransferExporter.DataExporter.Model;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MasstransferCommon.Tests.Utils;
[TestClass]
[TestSubject(typeof(JsonUtil))]
public class JsonUtilTest
{
[TestMethod]
public void Test()
{
var json = File.ReadAllText("C:\\Users\\huangxianguo\\Desktop\\formula.json");
var dto = JsonUtil.FromJson<FormulaDTO>(json);
Assert.IsNotNull(dto);
}
}