1
0
mirror of https://github.com/dnpm-dip/mv64e-mtb-dto-dotnet.git synced 2025-07-01 18:32:54 +00:00
Files
2024-07-10 16:18:02 +02:00

23 lines
645 B
C#

using System.Diagnostics;
using System.Reflection;
namespace MV64e.MTB.Test;
public class MtbTest
{
[Test]
public void ShouldParseJsonData()
{
var assembly = Assembly.GetExecutingAssembly();
const string resourceName = @"MV64e.MTB.Test.TestData.mv64e-mtb-fake-patient.json";
using var stream = assembly.GetManifestResourceStream(resourceName);
Debug.Assert(stream != null, "Cannot find test data file");
using var reader = new StreamReader(stream);
var json = reader.ReadToEnd();
var mtb = Mtb.FromJson(json);
Assert.IsNotNull(mtb);
}
}