279551e9be
modified: Core.Tests/Charter/CurveDataConverterTests.cs modified: Core.Tests/Parsers/CntrlComparisonParserTests.cs modified: Core.Tests/Parsers/LeafInputCsvParserTests.cs modified: Core.Tests/Remote/PiscalSshClientTests.cs modified: Core/Charter/CurveDataConverter.cs modified: Core/Core.csproj modified: Core/DAL/DataService.cs modified: Core/DAL/LeafWebContext.cs modified: Core/DAL/LeafWebInitializer.cs renamed: Core/Models/CntrlComparison.cs -> Core/Entities/CntrlComparison.cs renamed: Core/Models/CntrlComparisonFittingInfo.cs -> Core/Entities/CntrlComparisonFittingInfo.cs renamed: Core/Models/CntrlComparisonPhotosyntheticInfo.cs -> Core/Entities/CntrlComparisonPhotosyntheticInfo.cs renamed: Core/Models/FluxnetSite.cs -> Core/Entities/FluxnetSite.cs renamed: Core/Models/LeafInput.cs -> Core/Entities/LeafInput.cs renamed: Core/Models/LeafInputData.cs -> Core/Entities/LeafInputData.cs renamed: Core/Models/LeafInputFile.cs -> Core/Entities/LeafInputFile.cs renamed: Core/Models/LeafInputInfo.cs -> Core/Entities/LeafInputInfo.cs renamed: Core/Models/LeafInputPhotosynthetic.cs -> Core/Entities/LeafInputPhotosynthetic.cs renamed: Core/Models/LeafInputSite.cs -> Core/Entities/LeafInputSite.cs renamed: Core/Models/LeafInputStatus.cs -> Core/Entities/LeafInputStatus.cs renamed: Core/Models/PhotosynthesisType.cs -> Core/Entities/PhotosynthesisType.cs modified: Core/Parsers/CntrlComparisonParser.cs modified: Core/Parsers/FluxnetSiteCsvParser.cs modified: Core/Parsers/LeafInputCsvParser.cs modified: Web/Controllers/LeafCharterController.cs modified: Web/Controllers/LeafInputController.cs modified: Web/ViewModels/LeafInput/CreateViewModel.cs
26 lines
706 B
C#
26 lines
706 B
C#
using System.Linq;
|
|
using LeafWeb.Core.Charter;
|
|
using LeafWeb.Core.Entities;
|
|
using LeafWeb.Core.Parsers;
|
|
using LeafWeb.Core.Utility;
|
|
using NUnit.Framework;
|
|
|
|
namespace LeafWeb.Core.Tests.Charter
|
|
{
|
|
public class CurveDataConverterTests
|
|
{
|
|
private const string ContentDirectory = @"Parsers\LeafOutputData\";
|
|
|
|
[Test]
|
|
public void Convert_Valid()
|
|
{
|
|
var fileInfo = FileUtility.GetContentFile(ContentDirectory, "cntrlcomparison_Wild Capsicum.csv");
|
|
CntrlComparison[] cntrlComparison;
|
|
using (var parser = new CntrlComparisonParser(fileInfo))
|
|
cntrlComparison = parser.Parse();
|
|
|
|
var curves = CurveDataConverter.Convert(cntrlComparison);
|
|
Assert.That(curves.Count(),Is.EqualTo(7));
|
|
}
|
|
}
|
|
} |