use of io.vertigo.dynamo.plugins.environment.loaders.kpr.rules.DslDynamicDefinitionRule in project vertigo by KleeGroup.
the class DslDefinitionRuleTest method test1.
@Test
public void test1() throws PegNoMatchFoundException {
final DslDefinition dslDefinition = new DslDynamicDefinitionRule("create", dslDefinitionRepository.getGrammar()).parse("create Formatter FMT_TEST { args : \"UPPER\" }", 0).getValue();
Assert.assertNotNull(dslDefinition);
}
use of io.vertigo.dynamo.plugins.environment.loaders.kpr.rules.DslDynamicDefinitionRule in project vertigo by KleeGroup.
the class DslDefinitionRuleTest method test2.
// Exemple de test sur la déclaration d'un Domain
// create Domain DO_CODE_POSTAL (
// dataType : String;
// formatter : FMT_DEFAULT;
// constraint : {CK_CODE_POSTAL}
// )
@Test
public void test2() throws PegNoMatchFoundException {
final DslDefinition dslDefinition = new DslDynamicDefinitionRule("create", dslDefinitionRepository.getGrammar()).parse("create Domain DO_CODE_POSTAL { dataType : String , formatter:FMT_DEFAULT, constraint : [ CK_CODE_POSTAL ] } ", 0).getValue();
Assert.assertNotNull(dslDefinition);
}
Aggregations