Update automapper
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Heroic.AutoMapper;
|
||||
using InventoryTraker.Web.Core;
|
||||
using AutoMapper;
|
||||
using InventoryTraker.Web.Models;
|
||||
using InventoryTraker.Web.Utilities;
|
||||
using NUnit.Framework;
|
||||
@@ -11,6 +10,14 @@ namespace InventoryTraker.Web.Tests.Utilities
|
||||
[TestFixture]
|
||||
public class DistributionReportWriterTests
|
||||
{
|
||||
private IMapper _mapper;
|
||||
|
||||
[OneTimeSetUp]
|
||||
public void StartUp()
|
||||
{
|
||||
_mapper = AutoMapperConfig.Config.CreateMapper();
|
||||
}
|
||||
|
||||
private readonly DistributionReport[] _distributionReports =
|
||||
{
|
||||
new DistributionReport
|
||||
@@ -54,7 +61,7 @@ namespace InventoryTraker.Web.Tests.Utilities
|
||||
(var outputFile
|
||||
= new StreamWriter(Path.Combine(@"c:\temp", "DistributionReport.xlsx")))
|
||||
{
|
||||
var writer = new DistributionReportWriter();
|
||||
var writer = new DistributionReportWriter(_mapper);
|
||||
writer.WriteStream(_distributionReports, outputFile.BaseStream);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Heroic.AutoMapper;
|
||||
using InventoryTraker.Web.Core;
|
||||
using InventoryTraker.Web.Models;
|
||||
using InventoryTraker.Web.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Heroic.AutoMapper;
|
||||
using InventoryTraker.Web.Core;
|
||||
using AutoMapper;
|
||||
using InventoryTraker.Web.Models;
|
||||
using InventoryTraker.Web.Utilities;
|
||||
using NUnit.Framework;
|
||||
@@ -11,6 +10,14 @@ namespace InventoryTraker.Web.Tests.Utilities
|
||||
[TestFixture]
|
||||
public class MovementReportWriterTests
|
||||
{
|
||||
private IMapper _mapper;
|
||||
|
||||
[OneTimeSetUp]
|
||||
public void StartUp()
|
||||
{
|
||||
_mapper = AutoMapperConfig.Config.CreateMapper();
|
||||
}
|
||||
|
||||
private readonly MovementReport _movementReport
|
||||
= new MovementReport
|
||||
{
|
||||
@@ -61,7 +68,7 @@ namespace InventoryTraker.Web.Tests.Utilities
|
||||
(var outputFile
|
||||
= new StreamWriter(Path.Combine(@"c:\temp", "MovementReport.xlsx")))
|
||||
{
|
||||
var writer = new MovementReportWriter();
|
||||
var writer = new MovementReportWriter(_mapper);
|
||||
writer.WriteStream(_movementReport, outputFile.BaseStream);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user