Create new namespace zaaReloaded2.Formatter, move settings there.
This commit is contained in:
@ -23,7 +23,7 @@ using NUnit.Framework;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using zaaReloaded2.LabModel;
|
||||
using zaaReloaded2.Formatter;
|
||||
using zaa = zaaReloaded2.Formatter.Elements;
|
||||
using zaa = zaaReloaded2.Controller.Elements;
|
||||
|
||||
namespace Tests.Formatter.Elements
|
||||
{
|
||||
@ -55,9 +55,9 @@ namespace Tests.Formatter.Elements
|
||||
// We do not add a 'Cl' item, and it should not appear in output.
|
||||
lab.AddTimePoint(tp);
|
||||
|
||||
_formatter.ReferenceStyle = ReferenceStyle.IfAbnormal;
|
||||
_formatter.Settings.ReferenceStyle = ReferenceStyle.IfAbnormal;
|
||||
_formatter.Laboratory = lab;
|
||||
_formatter.Elements.Add(new zaa.Items("Na, K, Cl"));
|
||||
_formatter.Settings.Elements.Add(new zaa.Items("Na, K, Cl"));
|
||||
_formatter.Run();
|
||||
Assert.AreEqual("Na 133, K 6 (5)\r", _formatter.Document.Range().Text);
|
||||
}
|
||||
@ -73,9 +73,9 @@ namespace Tests.Formatter.Elements
|
||||
// We do not add a 'Cl' item, and it should not appear in output.
|
||||
lab.AddTimePoint(tp);
|
||||
|
||||
_formatter.ReferenceStyle = ReferenceStyle.IfAbnormal;
|
||||
_formatter.Settings.ReferenceStyle = ReferenceStyle.IfAbnormal;
|
||||
_formatter.Laboratory = lab;
|
||||
_formatter.Elements.Add(new zaa.Items("Klinische Chemie: Na, K, Cl"));
|
||||
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, K, Cl"));
|
||||
_formatter.Run();
|
||||
Assert.AreEqual("Klinische Chemie: Na 133, K 6 (5)\r", _formatter.Document.Range().Text);
|
||||
}
|
||||
@ -91,9 +91,9 @@ namespace Tests.Formatter.Elements
|
||||
// We do not add a 'Cl' item, and it should not appear in output.
|
||||
lab.AddTimePoint(tp);
|
||||
|
||||
_formatter.ReferenceStyle = ReferenceStyle.IfAbnormal;
|
||||
_formatter.Settings.ReferenceStyle = ReferenceStyle.IfAbnormal;
|
||||
_formatter.Laboratory = lab;
|
||||
_formatter.Elements.Add(new zaa.Items("Klinische Chemie: this, does, not, exist"));
|
||||
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: this, does, not, exist"));
|
||||
_formatter.Run();
|
||||
Assert.AreEqual("\r", _formatter.Document.Range().Text);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ using NUnit.Framework;
|
||||
using f = zaaReloaded2.Formatter;
|
||||
using zaaReloaded2.LabModel;
|
||||
using zaaReloaded2.Importer.ZaaImporter;
|
||||
using zaaReloaded2.Controller.Elements;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
|
||||
namespace Tests.Formatter
|
||||
@ -37,7 +38,7 @@ namespace Tests.Formatter
|
||||
ZaaImporter importer = TestHelpers.ZaaImporterFromResource();
|
||||
f.Formatter formatter = new f.Formatter(document);
|
||||
formatter.Laboratory = importer.Laboratory;
|
||||
formatter.Elements.Add(new f.Elements.Items("Klinische Chemie: Na, K, Cl"));
|
||||
formatter.Settings.Elements.Add(new Items("Klinische Chemie: Na, K, Cl"));
|
||||
formatter.Run();
|
||||
Assert.AreEqual("Klinische Chemie: Na 144 mM, K 4,3 mM\r", document.Range().Text);
|
||||
((_Document)document).Close(WdSaveOptions.wdDoNotSaveChanges);
|
||||
|
Reference in New Issue
Block a user