Make tests pass again (except not implemented ones).
This commit is contained in:
parent
b7fdf87ea5
commit
742a588083
@ -61,7 +61,7 @@ namespace Tests.Controller.Elements
|
|||||||
_formatter.Laboratory = lab;
|
_formatter.Laboratory = lab;
|
||||||
_formatter.Settings.Elements.Add(new zaa.Items("Na, K, Cl"));
|
_formatter.Settings.Elements.Add(new zaa.Items("Na, K, Cl"));
|
||||||
_formatter.Run();
|
_formatter.Run();
|
||||||
Assert.AreEqual("Na 133, K 6 (5)\r", _document.Range().Text);
|
Assert.AreEqual("\r13.07.2015 13:31:00:\rNa 133, K 6 (5)\r\r", _document.Range().Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -78,7 +78,7 @@ namespace Tests.Controller.Elements
|
|||||||
_formatter.Laboratory = lab;
|
_formatter.Laboratory = lab;
|
||||||
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, K, Cl"));
|
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, K, Cl"));
|
||||||
_formatter.Run();
|
_formatter.Run();
|
||||||
Assert.AreEqual("Klinische Chemie: Na 133, K 6 (5)\r", _document.Range().Text);
|
Assert.AreEqual("\r13.07.2015 13:31:00:\rKlinische Chemie: Na 133, K 6 (5)\r\r", _document.Range().Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -113,7 +113,7 @@ namespace Tests.Controller.Elements
|
|||||||
_formatter.Laboratory = lab;
|
_formatter.Laboratory = lab;
|
||||||
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, *"));
|
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, *"));
|
||||||
_formatter.Run();
|
_formatter.Run();
|
||||||
Assert.AreEqual("Klinische Chemie: Na 133, Cl 110, K 6\r",
|
Assert.AreEqual("\r13.07.2015 13:31:00:\rKlinische Chemie: Na 133, Cl 110, K 6\r\r",
|
||||||
_document.Range().Text);
|
_document.Range().Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ namespace Tests.Controller.Elements
|
|||||||
_formatter.Laboratory = lab;
|
_formatter.Laboratory = lab;
|
||||||
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, SU-*"));
|
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, SU-*"));
|
||||||
_formatter.Run();
|
_formatter.Run();
|
||||||
Assert.AreEqual("Klinische Chemie: Na 133, SU-Protein 2,8\r",
|
Assert.AreEqual("\r13.07.2015 13:31:00:\rKlinische Chemie: Na 133, SU-Protein 2,8\r\r",
|
||||||
_document.Range().Text);
|
_document.Range().Text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ namespace Tests.Controller.Elements
|
|||||||
_formatter.Laboratory = lab;
|
_formatter.Laboratory = lab;
|
||||||
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, SU-*, *"));
|
_formatter.Settings.Elements.Add(new zaa.Items("Klinische Chemie: Na, SU-*, *"));
|
||||||
_formatter.Run();
|
_formatter.Run();
|
||||||
Assert.AreEqual("Klinische Chemie: Na 133, SU-Protein 2,8, Cl 110, U-Na 99\r",
|
Assert.AreEqual("\r13.07.2015 13:31:00:\rKlinische Chemie: Na 133, SU-Protein 2,8, Cl 110, U-Na 99\r\r",
|
||||||
_document.Range().Text);
|
_document.Range().Text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,11 +50,13 @@ namespace Tests.Controller
|
|||||||
string testName = "test";
|
string testName = "test";
|
||||||
s.Name = testName;
|
s.Name = testName;
|
||||||
sr.SettingsList.Add(s);
|
sr.SettingsList.Add(s);
|
||||||
|
int expected = sr.SettingsList.Count;
|
||||||
|
int index = sr.SettingsList.IndexOf(s);
|
||||||
sr.Store();
|
sr.Store();
|
||||||
sr = null;
|
sr = null;
|
||||||
sr = SettingsRepository.Load();
|
sr = SettingsRepository.Load();
|
||||||
Assert.AreEqual(1, sr.SettingsList.Count);
|
Assert.AreEqual(expected, sr.SettingsList.Count);
|
||||||
Assert.AreEqual(testName, sr.SettingsList[0].Name);
|
Assert.AreEqual(testName, sr.SettingsList[index].Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ namespace zaaReloaded2.Controller
|
|||||||
#region Constructors
|
#region Constructors
|
||||||
|
|
||||||
public Settings()
|
public Settings()
|
||||||
: this(string.Empty, new List<ElementBase>())
|
: this(string.Empty, null)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
public Settings(string name)
|
public Settings(string name)
|
||||||
@ -87,6 +87,10 @@ namespace zaaReloaded2.Controller
|
|||||||
Uid = Guid.NewGuid();
|
Uid = Guid.NewGuid();
|
||||||
Name = name;
|
Name = name;
|
||||||
Elements = initialElements;
|
Elements = initialElements;
|
||||||
|
if (Elements == null)
|
||||||
|
{
|
||||||
|
Elements = new List<ElementBase>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -87,7 +87,13 @@ namespace zaaReloaded2.Importer.ZaaImporter
|
|||||||
/// Is true if the LaurisText has time stamp in the first
|
/// Is true if the LaurisText has time stamp in the first
|
||||||
/// paragraph and <see cref="LabItem"/>s in the others.
|
/// paragraph and <see cref="LabItem"/>s in the others.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsValidTimePoint { get; private set; }
|
public bool IsValidTimePoint
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Items.Count > 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the original Lauris text for this timepoint.
|
/// Gets or sets the original Lauris text for this timepoint.
|
||||||
|
Loading…
Reference in New Issue
Block a user