Initiate InventoyTypes from a xlxs

Arrival mostly working
This commit is contained in:
2016-08-22 11:03:00 -04:00
parent 7e4d8a6d2a
commit 53ed1b3af9
40 changed files with 798 additions and 208 deletions
@@ -0,0 +1,29 @@
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}");
}
}
}
}