예제 #1
0
        public void CanStillCreateLoggerWithoutConfigurationSectionPresent()
        {
            DictionaryConfigurationSource configSource = new DictionaryConfigurationSource();
            DefaultEventLogger            logger       = EnterpriseLibraryFactory.BuildUp <DefaultEventLogger>(configSource);

            Assert.IsFalse(logger.EventLoggingEnabled);
        }
예제 #2
0
        public void CanCreateThroughObjectBuilder()
        {
            DictionaryConfigurationSource       configSource  = new DictionaryConfigurationSource();
            InstrumentationConfigurationSection configSection = new InstrumentationConfigurationSection();

            configSection.EventLoggingEnabled = true;
            configSource.Add(InstrumentationConfigurationSection.SectionName, configSection);
            DefaultEventLogger logger = EnterpriseLibraryFactory.BuildUp <DefaultEventLogger>(configSource);

            Assert.IsTrue(logger.EventLoggingEnabled);
        }