Initial implementation of ItemComments.
This commit is contained in:
@ -181,6 +181,28 @@ namespace Tests.Controller.Elements
|
||||
Assert.AreEqual(expected, _document.Range().Text);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ItemCommentWithoutHandler()
|
||||
{
|
||||
Laboratory lab = new Laboratory();
|
||||
TimePoint tp = new TimePoint();
|
||||
tp.TimeStamp = new DateTime(2015, 7, 13, 13, 31, 00);
|
||||
tp.AddItem(new LabItem("Na", "133", "133"));
|
||||
tp.AddItem(new LabItem("K", "6", "5"));
|
||||
lab.AddTimePoint(tp);
|
||||
|
||||
_formatter.Laboratory = lab;
|
||||
_formatter.Settings.Elements.Add(
|
||||
new zaa.Items("Na \"(Zielbereich: <> mmol/l)\""));
|
||||
_formatter.Run();
|
||||
string expected = (
|
||||
StripMarkup(
|
||||
TimePointFormatter.DateAndTimeHeader(new DateTime(2015, 07, 13, 13, 31, 00)) +
|
||||
"Na 133\r\r").Replace(Environment.NewLine, "\r")
|
||||
);
|
||||
Assert.AreEqual(expected, _document.Range().Text);
|
||||
}
|
||||
|
||||
static string StripMarkup(string s)
|
||||
{
|
||||
return _markupStripper.Replace(s, string.Empty);
|
||||
|
Reference in New Issue
Block a user