コード例 #1
0
        public void ReadConfiguration_invokes_mapper()
        {
            Given_a_configuration_provider_with_toggles_configured();
            _mapper.Map(Arg.Any <FeaturesCollection>()).Returns(new List <Feature>());
            _mockReader.LoadConfiguration <FeatureConfiguration>(FeatureConfiguration.SectionName).Returns(new FeatureConfiguration());

            _configProvider.ReadConfiguration();

            _mapper.Received(1).Map(Arg.Any <FeaturesCollection>());
        }
コード例 #2
0
 public void LoadConfiguration()
 {
     try
     {
         _config = _configurationReader.LoadConfiguration <FeatureConfiguration>(FeatureConfiguration.SectionName);
     }
     catch (Exception e)
     {
         throw new Exception("Unable to load feature toggle configuration. See inner exception for more details", e);
     }
 }