mirror of
https://github.com/dnpm-dip/mv64e-mtb-dto-dotnet.git
synced 2025-07-01 18:32:54 +00:00
23 lines
645 B
C#
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);
|
|
}
|
|
} |