47 lines
1.5 KiB
C#
Executable File
47 lines
1.5 KiB
C#
Executable File
/* LaurisParagraphTest.cs
|
||
* part of zaaReloaded2
|
||
*
|
||
* Copyright 2015-2017 Daniel Kraus
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
* you may not use this file except in compliance with the License.
|
||
* You may obtain a copy of the License at
|
||
*
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software
|
||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
* See the License for the specific language governing permissions and
|
||
* limitations under the License.
|
||
*/
|
||
using NUnit.Framework;
|
||
using zaaReloaded2.LabModel;
|
||
using zaaReloaded2.Importer.ZaaImporter;
|
||
|
||
namespace Tests.Importer.ZaaImporter
|
||
{
|
||
[TestFixture]
|
||
class LaurisParagraphTest
|
||
{
|
||
[Test]
|
||
public void ParseParagraph()
|
||
{
|
||
string demo = "Klinische Chemie: Natrium: 139 [135 - 145] mmol/l; " +
|
||
"Kalium: 5.2 [3.5 - 5] mmol/l; Calcium: 2.4 [2.0 - 2.7] mmol/l;";
|
||
LaurisParagraph lp = new LaurisParagraph(demo);
|
||
Assert.IsTrue(lp.IsLaurisParagraph);
|
||
Assert.AreEqual(139, lp.Items["Natrium"].NumericalValue);
|
||
Assert.AreEqual(2.4, lp.Items["Calcium"].NumericalValue);
|
||
}
|
||
|
||
[Test]
|
||
public void ParseInvalidParagraph()
|
||
{
|
||
string demo = "Aktuelle Diagnosen:";
|
||
LaurisParagraph lp = new LaurisParagraph(demo);
|
||
Assert.IsFalse(lp.IsLaurisParagraph);
|
||
}
|
||
}
|
||
}
|