Update automapper
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user