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

namespace InventoryTraker.Web.Tests.Utilities
{
	[TestFixture]
	public class InventoryReportWriterTests
	{
		private readonly InventoryViewModel[] _inventory =
		{
			new InventoryViewModel
			{
				Id = "34634584",
				AddedDate = new DateTime(2015,3,1),
				ShredReadyDate = new DateTime(2017,4,1),
				Quantity = 0,
				Memo = "my memo",
			}
		};

		[Test, Explicit]
		public void Write()
		{
			using 
				(var outputFile 
					= new StreamWriter(Path.Combine(@"c:\temp", "InventoryReport.xlsx")))
			{
				var writer = new InventoryReportWriter();
				writer.WriteStream(_inventory, outputFile.BaseStream);
			}
		}
	}
}
