cleanup ProgramConfig Load
This commit is contained in:
parent
da412f2cc5
commit
e071fdb09c
@ -47,11 +47,13 @@ namespace BenchtopParser {
|
||||
if (data.StartsWith("=")) { continue; /* comment line */ }
|
||||
|
||||
var lineConfig = new Configuration();
|
||||
lineConfig.unit = configLine[1];
|
||||
lineConfig.type = configLine[2]; //a, c, f, i
|
||||
var nameValue = data.Split("=");
|
||||
lineConfig.name = nameValue[0];
|
||||
lineConfig.value = nameValue[1];
|
||||
|
||||
lineConfig.unit = configLine[1].Trim();
|
||||
lineConfig.type = configLine[2].Trim(); //a, c, f, i
|
||||
|
||||
lineConfig.name = nameValue[0].Trim();
|
||||
lineConfig.value = nameValue[1].Trim();
|
||||
|
||||
// Deal with this group logic
|
||||
var group = programnumber_group_data[1];
|
||||
|
@ -15,6 +15,10 @@ namespace BenchtopParserTests {
|
||||
// Check that group collecting works -
|
||||
Assert.That(configs["P1"].Group["I"]["3"].value, Is.EqualTo("Unassigned"));
|
||||
Assert.That(configs["P1"].Group["O"]["3"].value, Is.EqualTo("Test Passed"));
|
||||
|
||||
Assert.That(configs["P1"].Group["P"]["Minimum Pressure"].value, Is.EqualTo("95.000"));
|
||||
Assert.That(configs["P1"].Group["P"]["Minimum Pressure"].unit, Is.EqualTo("mbar"));
|
||||
Assert.That(configs["P1"].Group["P"]["Minimum Pressure"].type, Is.EqualTo("f"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Loading…
Reference in New Issue
Block a user