using System;
using System.IO;
using InventoryTraker.Web.Utilities;
using NUnit.Framework;

namespace InventoryTraker.Web.Tests.Utilities
{
	[TestFixture]
	public class InventoryTypeParserTests
	{
		private readonly string _documentFolder = 
			AppDomain.CurrentDomain.BaseDirectory + @"\Utilities\Documents\";

		[Test]
		public void Parse()
		{
			var fileInfo = new FileInfo(Path.Combine(_documentFolder, "InventoryTypeData.xlsx"));

			var parser = new InventoryTypeParser(fileInfo);

			var inventoryTypes = parser.Parse();

			foreach (var inventoryType in inventoryTypes)
			{
				Console.WriteLine($"{inventoryType.Identifier} {inventoryType.Name} {inventoryType.PricePerCase}");
			}
		}
	}
}
