Exemplo n.º 1
0
        /// <summary>
        /// Setup default LDAP settings
        /// </summary>
        private void SetupDefaultLdapConfig()
        {
            DefaultLdapConfig ldapConfig = new DefaultLdapConfig();

            ldapConfig.SetIfNotExistsLdapLookupFactoryConfig();
            ldapConfig.SetIfNotExistsDefaultLdapConfig();
        }
Exemplo n.º 2
0
        public void SectionsMissingInExistingConfigurationFileShouldBeAddedFromTheDefaultConfiguration()
        {
            // why only test one configuration section... what about all the others?
            FileInfo configFileWithOnlyOneDocumentType = GetConfigFileWithDocumentSectionWithOnlyOneDocumentType();

            ConfigurationHandler.ConfigFilePath = configFileWithOnlyOneDocumentType.FullName;
            ConfigurationHandler.Reset();

            DefaultLdapConfig ldapConfig = new DefaultLdapConfig();

            ldapConfig.SetIfNotExistsLdapLookupFactoryConfig();

            ConfigurationHandler.SaveToFile();

            XmlNode rootNode = GetRaspConfigurationNode(configFileWithOnlyOneDocumentType);

            AssertNodeHasConfigurationSectionWithName(rootNode, "DocumentTypeCollectionConfig");
            AssertNodeHasConfigurationSectionWithName(rootNode, "LdapLookupFactoryConfig");
        }