LeafGasComparison extract single curve for optimization

This commit is contained in:
2016-05-13 10:59:46 -04:00
parent dc573ff0bf
commit 48e7578de7
5 changed files with 750 additions and 15 deletions
@@ -24,6 +24,47 @@ namespace LeafWeb.Core.Tests.Parsers
Assert.That(leafGasComparisons.Length, Is.EqualTo(6));
}
[Test]
public void Parse_MatchCurveId()
{
var fileInfo = FileUtility.GetContentFile(ContentDirectory, "multiple_leafgascomparison.csv");
LeafGasComparison[] leafGasComparisons;
using (var parser = new LeafGasComparisonParser(fileInfo))
leafGasComparisons = parser.Parse();
Assert.That(leafGasComparisons.Length, Is.GreaterThan(6));
using (var parser = new LeafGasComparisonParser(fileInfo))
leafGasComparisons = parser.Parse("522Jen1.csv");
Assert.That(leafGasComparisons.Length, Is.EqualTo(6));
}
[Test]
public void ExtractCurveIds_Single()
{
var fileInfo = FileUtility.GetContentFile(ContentDirectory, "leafgascomparison.csv");
string[] curveIds;
using (var parser = new LeafGasComparisonParser(fileInfo))
curveIds = parser.ExtractCurveIds();
Assert.That(curveIds.Length, Is.EqualTo(1));
}
[Test]
public void ExtractCurveIds_Multiple()
{
var fileInfo = FileUtility.GetContentFile(ContentDirectory, "multiple_leafgascomparison.csv");
string[] curveIds;
using (var parser = new LeafGasComparisonParser(fileInfo))
curveIds = parser.ExtractCurveIds();
Assert.That(curveIds.Length, Is.EqualTo(3));
}
//[Test, Explicit]
public void Parse_Timer()
{