Exemple #1
0
        public void Core_Configuration_ApplicationSettingSafe()
        {
            var itemToTest    = new AppSettingSafe();
            var configuration = new ConfigurationManagerCore(ApplicationTypes.Native);

            itemToTest = configuration.AppSetting("TestAppSetting");
            Assert.IsTrue(itemToTest.Value != string.Empty);
        }
        public void Core_Configuration_ConfigurationManagerCore_AppSettings()
        {
            // Specific config entries
            var itemToTestString = string.Empty;
            var itemToTest       = new AppSettingSafe();
            var configuration    = new ConfigurationManagerCore(ApplicationTypes.Native);

            itemToTest = configuration.AppSetting("TestAppSetting");
            Assert.IsTrue(itemToTest.Value != string.Empty);
            itemToTestString = configuration.AppSettings.GetValue("TestAppSetting");
            Assert.IsTrue(itemToTestString != string.Empty);
        }