mirror of
https://github.com/dnpm-dip/mv64e-mtb-dto-dotnet.git
synced 2025-07-02 10:52:54 +00:00
Initial commit
This commit is contained in:
23
MV64e.MTB.Test/MtbTest.cs
Normal file
23
MV64e.MTB.Test/MtbTest.cs
Normal file
@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user