using LeafWeb.Core.Entities;
using LeafWeb.Core.Parsers;
using LeafWeb.Core.Utility;
using NUnit.Framework;

namespace LeafWeb.Core.Tests.Parsers
{
	[TestFixture]
	public class CntrlComparisonParserTests
	{
		private const string ContentDirectory = @"Parsers\LeafOutputData\";

		[Test]
		public void Parse_Valid()
		{
			var fileInfo = FileUtility.GetContentFile(ContentDirectory, "cntrlcomparison_Wild Capsicum.csv");

			CntrlComparison[] cntrlComparison;
			using (var parser = new CntrlComparisonParser(fileInfo))
				cntrlComparison = parser.Parse();

			Assert.That(cntrlComparison.Length, Is.EqualTo(7 * 4));
		}
	}
}
