Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }