Initiate InventoyTypes from a xlxs
Arrival mostly working
This commit is contained in:
Binary file not shown.
@@ -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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user