CntrlComparison parsing
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using LeafWeb.Core.Models;
|
||||
using LeafWeb.Core.Parsers;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace LeafWeb.Core.Tests.Parsers
|
||||
{
|
||||
[TestFixture]
|
||||
public class CntrlComparisonParserTests
|
||||
{
|
||||
protected const string ContentDirectory = @"Parsers\LeafOutputData\";
|
||||
|
||||
private static FileInfo GetContentFile(string fileName)
|
||||
{
|
||||
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ContentDirectory);
|
||||
return new FileInfo(path + fileName);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Parse_Valid()
|
||||
{
|
||||
var fileInfo = GetContentFile("cntrlcomparison_Wild Capsicum.csv");
|
||||
|
||||
CntrlComparison[] cntrlComparison;
|
||||
using (var parser = new CntrlComparisonParser(fileInfo))
|
||||
cntrlComparison = parser.Parse();
|
||||
|
||||
Assert.That(cntrlComparison.Length, Is.EqualTo(7 * 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user