21 lines
523 B
C#
21 lines
523 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|