public void Configuration_ConfigurationManagerSafe_AppSettings()
        {
            var itemToTest    = new AppSettingSafe();
            var configuration = ConfigurationManagerSafeTests.ConfigurationManagerSafeConstruct();

            itemToTest = configuration.AppSetting("TestAppSetting");
            Assert.IsTrue(itemToTest.Value != TypeExtension.DefaultString);
        }
예제 #2
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 Configuration_ConfigurationManagerFull_AppSettings()
        {
            var itemToTestString = TypeExtension.DefaultString;
            var itemToTest       = new AppSettingSafe();
            var configuration    = new ConfigurationManagerFull();

            itemToTest = configuration.AppSetting("TestAppSetting");
            Assert.IsTrue(itemToTest.Value != TypeExtension.DefaultString);
            itemToTestString = configuration.AppSettings.GetValue("TestAppSetting");
            Assert.IsTrue(itemToTestString != TypeExtension.DefaultString);
        }
        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);
        }