Refactor and harden ZaaImporter.

This commit is contained in:
Daniel Kraus
2015-08-04 23:21:38 +02:00
parent ae9cf7fa2e
commit 75c9c984c6
5 changed files with 99 additions and 73 deletions

View File

@ -41,5 +41,15 @@ namespace Tests.Importer.ZaaImporter
// Only 6 distinct time points (see method documentation above).
Assert.AreEqual(6, importer.Laboratory.TimePoints.Count);
}
[Test]
public void ParseInvalidInput()
{
zaa.ZaaImporter importer = new zaa.ZaaImporter();
importer.Import("some arbitrary text\r\nthat does not represent\r\na valid lab");
Assert.IsFalse(importer.Success);
importer.Import("(03.03.1930 13:30:00)\r\nKlinische Chemie: Natrium 135 [135 - 145] mmol/l;");
Assert.IsTrue(importer.Success);
}
}
}