use of org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescription in project directory-ldap-api by apache.
the class SyntaxCheckerDescriptionSchemaParserTest method testSyntaxCheckerExample.
@Test
public void testSyntaxCheckerExample() throws ParseException {
String simple = "( 1.3.6.1.4.1.18060.0.4.1.0.10000 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.syntax.OctetStringSyntaxChecker )";
SyntaxCheckerDescription syntaxCheckerDescription = parser.parseSyntaxCheckerDescription(simple);
assertNotNull(syntaxCheckerDescription);
}
use of org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescription in project directory-ldap-api by apache.
the class SyntaxCheckerDescriptionSchemaParserTest method testBytecode.
@Test
public void testBytecode() throws ParseException {
String value = null;
SyntaxCheckerDescription syntaxCheckerDescription = null;
// FQCN simple p
value = "( 1.1 FQCN org.apache.directory.SimpleSyntaxChecker BYTECODE ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789==== )";
syntaxCheckerDescription = parser.parseSyntaxCheckerDescription(value);
assertNotNull(syntaxCheckerDescription.getBytecode());
assertEquals("ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", syntaxCheckerDescription.getBytecode());
}
use of org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescription in project directory-ldap-api by apache.
the class SyntaxCheckerDescriptionSchemaParserTest method testFqcn.
@Test
public void testFqcn() throws ParseException {
String value = null;
SyntaxCheckerDescription syntaxCheckerDescription = null;
// FQCN simple p
value = "( 1.1 FQCN org.apache.directory.SimpleSyntaxChecker )";
syntaxCheckerDescription = parser.parseSyntaxCheckerDescription(value);
assertNotNull(syntaxCheckerDescription.getFqcn());
assertEquals("org.apache.directory.SimpleSyntaxChecker", syntaxCheckerDescription.getFqcn());
}
use of org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescription in project directory-ldap-api by apache.
the class SyntaxCheckerDescriptionSchemaParserTest method testSyntaxCheckerWithDesc.
@Test
public void testSyntaxCheckerWithDesc() throws ParseException {
String simple = "( " + OID + " DESC '" + DESC + "' FQCN " + FQCN + " )";
SyntaxCheckerDescription syntaxCheckerDescription = parser.parseSyntaxCheckerDescription(simple);
assertNotNull(syntaxCheckerDescription);
assertEquals(OID, syntaxCheckerDescription.getOid());
assertEquals(FQCN, syntaxCheckerDescription.getFqcn());
assertNull(syntaxCheckerDescription.getBytecode());
assertEquals(DESC, syntaxCheckerDescription.getDescription());
}
use of org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescription in project directory-ldap-api by apache.
the class SyntaxCheckerDescriptionSchemaParserTest method testSimpleSyntaxChecker.
@Test
public void testSimpleSyntaxChecker() throws ParseException {
String simple = "( " + OID + " FQCN " + FQCN + " )";
SyntaxCheckerDescription syntaxCheckerDescription = parser.parseSyntaxCheckerDescription(simple);
assertNotNull(syntaxCheckerDescription);
assertEquals(OID, syntaxCheckerDescription.getOid());
assertEquals(FQCN, syntaxCheckerDescription.getFqcn());
assertNull(syntaxCheckerDescription.getBytecode());
assertNull(syntaxCheckerDescription.getDescription());
}
Aggregations