public void TestIndirectMapping() { var container = DependencyInjectionConfig.Setup(); var service = container.Resolve <ILddMapperService>(); Assert.IsNotNull(service); var source = new LddPart { DesignId = "50746", Materials = "1" }; var result = service.MapItem(source); Assert.IsNotNull(result); Assert.IsTrue(result.WasSuccessful); Assert.IsNotNull(result.Mapped); Assert.AreEqual("54200", result.Mapped.ItemId); }
public void TestIndirectMapping() { var builder = new ContainerBuilder(); builder.RegisterType <AppConfigBricklinkCredentialProvider>().AsImplementedInterfaces().SingleInstance(); var container = DependencyInjectionConfig.Setup(builder); var service = container.Resolve <ILddMapperService>(); Assert.IsNotNull(service); var source = new LddPart { DesignId = "50746", Materials = "1" }; var result = service.MapItem(source); Assert.IsNotNull(result); Assert.IsTrue(result.WasSuccessful); Assert.IsNotNull(result.Mapped); Assert.AreEqual("54200", result.Mapped.ItemId); }