예제 #1
0
        public void ConfigurationContext_System_GetSection1_TIsMappedToAnotherType()
        {
            ConfigurationContext target = new ConfigurationContext();

            String path = "vizistata.diagnostics/test";
            target.AddPath<System.Net.Configuration.AuthenticationModulesSection>(path);

            target.GetSection<System.Net.Configuration.AuthenticationModulesSection>();
        }
예제 #2
0
        public void ConfigurationContext_System_GetSection1_Optimal()
        {
            ConfigurationContext target = new ConfigurationContext();

            String path = "vizistata.diagnostics/test";
            target.AddPath<MockConfigurationSection>(path);

            MockConfigurationSection actual = target.GetSection<MockConfigurationSection>();
            Assert.IsNotNull(actual);
        }
예제 #3
0
        public void ConfigurationContext_Unit_GetSection2_TypeIsNull()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = null;
            target.GetSection(type);
        }
예제 #4
0
        public void ConfigurationContext_Unit_GetSection2_TypeIsAbstract()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = typeof(ConfigurationSection);
            target.GetSection(type);
        }
예제 #5
0
        public void ConfigurationContext_Unit_GetSection2_TypeIsNotKnown()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = typeof(MockConfigurationSection);
            target.GetSection(type);
        }
예제 #6
0
        public void ConfigurationContext_Unit_GetSection2_TypeHasInvalidBaseType()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = typeof(Object);
            target.GetSection(type);
        }
예제 #7
0
        public void ConfigurationContext_Unit_GetSection1_TIsNotKnown()
        {
            ConfigurationContext target = new ConfigurationContext();

            target.GetSection<MockConfigurationSection>();
        }
예제 #8
0
        public void ConfigurationContext_System_GetSection4_PathIsNull()
        {
            ConfigurationContext target = new ConfigurationContext();

            String path = null;
            target.GetSection(path);
        }
예제 #9
0
        public void ConfigurationContext_System_GetSection4_PathIsInvalid()
        {
            ConfigurationContext target = new ConfigurationContext();

            String path = "\\This is / not a valid path!";
            target.GetSection(path);
        }
예제 #10
0
        public void ConfigurationContext_System_GetSection4_ConfigurationSectionNotCached()
        {
            ConfigurationContext target = new ConfigurationContext(true);

            String path = "vizistata.diagnostics/test";
            ConfigurationSection actual = target.GetSection(path);
            Assert.IsNotNull(actual);
        }