Update estimate
This commit is contained in:
@@ -23,6 +23,17 @@ namespace LeafWeb.Core.Tests.Charter
|
||||
Assert.That(curves.Count(),Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Convert_Papaya()
|
||||
{
|
||||
var fileInfo = FileUtility.GetContentFile(ContentDirectory, "Papaya_leafgascomparison.csv");
|
||||
LeafGasComparison[] leafGasComparisons;
|
||||
using (var parser = new LeafGasComparisonParser(fileInfo))
|
||||
leafGasComparisons = parser.Parse();
|
||||
|
||||
var curves = CurveDataConverter.Convert(leafGasComparisons);
|
||||
Assert.That(curves.Count(),Is.EqualTo(23));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Convert_ThrowsExpectionWhenNotEnoughDataSets()
|
||||
|
||||
@@ -102,6 +102,9 @@
|
||||
<Content Include="Parsers\LeafOutputData\multiple_leafgascomparison.csv">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Parsers\LeafOutputData\Papaya_leafgascomparison.csv">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
|
||||
@@ -65,6 +65,18 @@ namespace LeafWeb.Core.Tests.Parsers
|
||||
Assert.That(curveIds.Length, Is.EqualTo(3));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExtractCurveIds_Multiple_Papaya()
|
||||
{
|
||||
var fileInfo = FileUtility.GetContentFile(ContentDirectory, "Papaya_leafgascomparison.csv");
|
||||
|
||||
string[] curveIds;
|
||||
using (var parser = new LeafGasComparisonParser(fileInfo))
|
||||
curveIds = parser.ExtractCurveIds();
|
||||
|
||||
Assert.That(curveIds.Length, Is.EqualTo(23));
|
||||
}
|
||||
|
||||
//[Test, Explicit]
|
||||
public void Parse_Timer()
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -72,6 +72,7 @@ namespace LeafWeb.Core.Parsers
|
||||
{
|
||||
var values = GetNextCsvRowValues();
|
||||
if (CsvReader.IsRecordEmpty())
|
||||
//continue;
|
||||
throw new ParseException($"Encountered empty line while readding fitting info on line {CsvReader.Row}");
|
||||
if (values == null) // end of file
|
||||
yield break;
|
||||
|
||||
@@ -1 +1 @@
|
||||
C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.pq2g8_ru.dll
|
||||
C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.hrgrmhfg.dll
|
||||
@@ -5,9 +5,13 @@
|
||||
var estimater = Model.Item2;
|
||||
|
||||
var totalTimeEstimate = estimater.EstimateTimeInProgress(leafInput);
|
||||
var remaining = totalTimeEstimate - leafInput.TimeInProgress;
|
||||
TimeSpan remaining = totalTimeEstimate - leafInput.TimeInProgress;
|
||||
if (remaining > TimeSpan.Zero)
|
||||
{
|
||||
<text>@remaining.ToRoundedReadableString()</text>
|
||||
}
|
||||
else
|
||||
{
|
||||
<text>@remaining.ToRoundedReadableString() over est.</text>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user