| | |
| | | @Test |
| | | public void testAddAttributeTypeObsoleteEMR() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testAddATObsoleteEMRMatch", "1.3.6.1.4.1.26027.1.999.20", true); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testAddATObsoleteEMRMatch", "1.3.6.1.4.1.26027.1.999.20", true); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testRemoveAttributeTypeReferencedByMRU() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testRemoveATRefByMRUMatch", "1.3.6.1.4.1.26027.1.999.17", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testRemoveATRefByMRUMatch", "1.3.6.1.4.1.26027.1.999.17", false); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testAddMatchingRuleUseSuccessful() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testAddMRUSuccessfulMatch", "1.3.6.1.4.1.26027.1.999.10", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testAddMRUSuccessfulMatch", "1.3.6.1.4.1.26027.1.999.10", false); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testAddMatchingRuleUseToAltSchemaFile() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testAddMRUToAltSchemaFileMatch", "1.3.6.1.4.1.26027.1.999.18", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testAddMRUToAltSchemaFileMatch", "1.3.6.1.4.1.26027.1.999.18", false); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testReplaceMatchingRuleUseSuccessful() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testReplaceMRUSuccessfulMatch", "1.3.6.1.4.1.26027.1.999.11", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testReplaceMRUSuccessfulMatch", "1.3.6.1.4.1.26027.1.999.11", false); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testRemoveAndAddMatchingRuleUse() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testRemoveAndAddMRUMatch", "1.3.6.1.4.1.26027.1.999.12", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testRemoveAndAddMRUMatch", "1.3.6.1.4.1.26027.1.999.12", false); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testAddMatchingRuleUseMRConflict() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testAddMRUMRConflictMatch", "1.3.6.1.4.1.26027.1.999.14", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testAddMRUMRConflictMatch", "1.3.6.1.4.1.26027.1.999.14", false); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testAddMatchingRuleUseAttributeTypeUndefined() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testAddMRUATUndefinedMatch", "1.3.6.1.4.1.26027.1.999.16", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testAddMRUATUndefinedMatch", "1.3.6.1.4.1.26027.1.999.16", false); |
| | | |
| | | try |
| | | { |
| | |
| | | public void testAddMatchingRuleUseAttributeTypeMultipleUndefined() throws Exception |
| | | { |
| | | MatchingRule matchingRule = |
| | | getMatchingRule("testAddMRUATMultipleUndefinedMatch", "1.3.6.1.4.1.26027.1.999.19", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | registerNewMatchingRule("testAddMRUATMultipleUndefinedMatch", "1.3.6.1.4.1.26027.1.999.19", false); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testAddMatchingRuleUseObsoleteMatchingRule() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testAddMRUObsoleteMRMatch", "1.3.6.1.4.1.26027.1.999.21", true); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testAddMRUObsoleteMRMatch", "1.3.6.1.4.1.26027.1.999.21", true); |
| | | |
| | | try |
| | | { |
| | |
| | | @Test |
| | | public void testAddMatchingRuleUseObsoleteAttributeType() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testAddMRUObsoleteATMatch", "1.3.6.1.4.1.26027.1.999.22", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testAddMRUObsoleteATMatch", "1.3.6.1.4.1.26027.1.999.22", false); |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private MatchingRule registerNewMatchingRule(String name, String oid, boolean obsolete) throws DirectoryException |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule(name, oid, obsolete); |
| | | DirectoryServer.getSchema().registerMatchingRules(Arrays.asList(matchingRule), false); |
| | | return matchingRule; |
| | | } |
| | | |
| | | private void runModify(String[] args, String ldifContent, ResultCode expectedRC) |
| | | { |
| | | runModify(args, ldifContent, null, expectedRC); |
| | |
| | | @Test |
| | | public void testRemoveMatchingRuleUseSuccessful() throws Exception |
| | | { |
| | | MatchingRule matchingRule = getMatchingRule("testRemoveMRUSuccessfulMatch", "1.3.6.1.4.1.26027.1.999.13", false); |
| | | DirectoryServer.getSchema().registerMatchingRule(matchingRule, false); |
| | | MatchingRule matchingRule = |
| | | registerNewMatchingRule("testRemoveMRUSuccessfulMatch", "1.3.6.1.4.1.26027.1.999.13", false); |
| | | |
| | | try |
| | | { |