public void CanStillCreateLoggerWithoutConfigurationSectionPresent() { DictionaryConfigurationSource configSource = new DictionaryConfigurationSource(); DefaultEventLogger logger = EnterpriseLibraryFactory.BuildUp <DefaultEventLogger>(configSource); Assert.IsFalse(logger.EventLoggingEnabled); }
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); }