Configure() public method

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

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

            var validator = container.Resolve<IMapper<EnergyTrading.Mdm.Contracts.SourceSystem, SourceSystem>>();

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

            var repository = new Mock<IRepository>();
            container.RegisterInstance(repository.Object);

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

            var validator = container.Resolve<IValidator<SourceSystem>>("sourcesystem");

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