Пример #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_AddPath2_TypeIsNull()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = null;
            String path = "vizistata.diagnostics/test";
            target.AddPath(type, path);
        }
Пример #4
0
        public void ConfigurationContext_Unit_IsPathKnown2_True()
        {
            ConfigurationContext target = new ConfigurationContext();

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

            Boolean expected = true;
            Type type = typeof(MockConfigurationSection);
            Boolean actual = target.IsPathKnown(type);
            Assert.AreEqual(expected, actual);
        }
Пример #5
0
        public void ConfigurationContext_Unit_AddPath2_TypeHasInvalidBaseType()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = typeof(String);
            String path = "vizistata.diagnostics/test";
            target.AddPath(type, path);
        }
Пример #6
0
        public void ConfigurationContext_Unit_AddPath2_TypeIsKnown()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = typeof(MockConfigurationSection);
            String path = "vizistata.diagnostics/test";
            target.AddPath(type, path);
            target.AddPath(type, path);
        }
Пример #7
0
        public void ConfigurationContext_Unit_AddPath2_PathIsNull()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = typeof(MockConfigurationSection);
            String path = null;
            target.AddPath(type, path);
        }
Пример #8
0
        public void ConfigurationContext_Unit_AddPath2_PathIsInvalid()
        {
            ConfigurationContext target = new ConfigurationContext();

            Type type = typeof(MockConfigurationSection);
            String path = "\\This is / not a valid path!";
            target.AddPath(type, path);
        }
Пример #9
0
        public void ConfigurationContext_Unit_AddPath1_TIsKnown()
        {
            ConfigurationContext target = new ConfigurationContext();

            String path = "vizistata.diagnostics/test";
            target.AddPath<MockConfigurationSection>(path);
            target.AddPath<MockConfigurationSection>(path);
        }
Пример #10
0
        public void ConfigurationContext_Unit_AddPath1_PathIsNull()
        {
            ConfigurationContext target = new ConfigurationContext();

            String path = null;
            target.AddPath<MockConfigurationSection>(path);
        }
Пример #11
0
        public void ConfigurationContext_Unit_AddPath1_PathIsInvalid()
        {
            ConfigurationContext target = new ConfigurationContext();

            String path = "\\This is / not a valid path!";
            target.AddPath<MockConfigurationSection>(path);
        }