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
@@ -1,20 +0,0 @@
using Heroic.AutoMapper;
using InventoryTraker.Web.Tests.Utilities;
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(InventoryTraker.Web.Tests.AutoMapperConfig), "Configure")]
namespace InventoryTraker.Web.Tests
{
public static class AutoMapperConfig
{
public static void Configure()
{
//NOTE: By default, the current project and all referenced projects will be scanned.
// You can customize this by passing in a lambda to filter the assemblies by name,
// like so:
//HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies(x => x.Name.StartsWith("YourPrefix"));
//HeroicAutoMapperConfigurator.LoadMapsFromCallerAndReferencedAssemblies();
//If you run into issues with the maps not being located at runtime, try using this method instead:
HeroicAutoMapperConfigurator.LoadMapsFromAssemblyContainingTypeAndReferencedAssemblies<MovementReportWriterTests>();
}
}
}
+2 -4
View File
@@ -1,6 +1,4 @@
using Heroic.AutoMapper;
using InventoryTraker.Web.Core;
using NUnit.Framework;
using NUnit.Framework;
namespace InventoryTraker.Web.Tests
{
@@ -10,7 +8,7 @@ namespace InventoryTraker.Web.Tests
[OneTimeSetUp]
public void S()
{
HeroicAutoMapperConfigurator.LoadMapsFromAssemblyContainingTypeAndReferencedAssemblies<Inventory>();
AutoMapperConfig.Configure();
}
}
}