Update automapper

This commit is contained in:
2016-09-24 00:06:34 -04:00
parent f473c64540
commit 6789c1b3b5
32 changed files with 254 additions and 206 deletions
@@ -10,10 +10,12 @@ namespace InventoryTraker.Web.Tests.Models
[TestFixture]
public class InventoryAddFormTests
{
private IMapper _mapper;
[OneTimeSetUp]
public void StartUp()
{
HeroicAutoMapperConfigurator.LoadMapsFromAssemblyContainingTypeAndReferencedAssemblies<Inventory>();
_mapper = AutoMapperConfig.Config.CreateMapper();
}
[Test]
@@ -28,7 +30,7 @@ namespace InventoryTraker.Web.Tests.Models
Quantity = 32
};
var inventory = Mapper.Map<Inventory>(form);
var inventory = _mapper.Map<Inventory>(form);
Assert.That(inventory.AddedDate, Is.EqualTo(form.AddedDate));
Assert.That(inventory.ExpirationDate, Is.EqualTo(form.ExpirationDate));