コード例 #1
0
        public void Resolve()
        {
            var container = CreateContainer();
            var meConfig = new SimpleMappingEngineConfiguration(container);
            meConfig.Configure();

            var config = new PersonConfiguration(container);
            config.Configure();

            var validator = container.Resolve<IMapper<EnergyTrading.MDM.Contracts.Sample.Person, Person>>();

            // Assert
            Assert.IsNotNull(validator, "Mapper resolution failed");
        }
コード例 #2
0
        public void Resolve()
        {
            var container = CreateContainer();
            var meConfig  = new SimpleMappingEngineConfiguration(container);

            meConfig.Configure();

            var config = new PersonConfiguration(container);

            config.Configure();

            var validator = container.Resolve <IMapper <EnergyTrading.MDM.Contracts.Sample.Person, Person> >();

            // Assert
            Assert.IsNotNull(validator, "Mapper resolution failed");
        }
コード例 #3
0
        public void ValidatorResolution()
        {
            var container = CreateContainer();
            var meConfig  = new SimpleMappingEngineConfiguration(container);

            meConfig.Configure();
            container.RegisterInstance <IRepository>(new Mock <IRepository>().Object);

            var config = new PersonConfiguration(container);

            config.Configure();

            var validator = container.Resolve <IValidator <EnergyTrading.MDM.Contracts.Sample.Person> >("person");

            // Assert
            Assert.IsNotNull(validator, "Validator resolution failed");
        }
コード例 #4
0
        public void ValidatorResolution()
        {
            var container = CreateContainer();
            var meConfig = new SimpleMappingEngineConfiguration(container);
            meConfig.Configure();
            container.RegisterInstance<IRepository>(new Mock<IRepository>().Object);

            var config = new PersonConfiguration(container);
            config.Configure();

            var validator = container.Resolve<IValidator<EnergyTrading.MDM.Contracts.Sample.Person>>("person");

            // Assert
            Assert.IsNotNull(validator, "Validator resolution failed");
        }