use of org.yakindu.sct.model.sgen.GeneratorModel in project statecharts by Yakindu.
the class SGenJavaValidatorTest method checkInitialValue.
@Test
public void checkInitialValue() {
EObject model = parseExpression("GeneratorModel for yakindu::java { var x : boolean = 5 }", GeneratorModel.class.getSimpleName());
AssertableDiagnostics result = tester.validate(model);
result.assertAny(new MsgPredicate("Incompatible types boolean and integer."));
}
use of org.yakindu.sct.model.sgen.GeneratorModel in project statecharts by Yakindu.
the class SGenJavaValidatorTest method checkGeneratorExists.
/**
* @see SGenJavaValidator#checkGeneratorExists(GeneratorModel)
*/
@Test
public void checkGeneratorExists() {
EObject model = parseExpression("GeneratorModel for yakindu::unknown {}", GeneratorModel.class.getSimpleName());
AssertableDiagnostics result = tester.validate(model);
result.assertAny(new MsgPredicate(UNKOWN_GENERATOR));
}
use of org.yakindu.sct.model.sgen.GeneratorModel in project statecharts by Yakindu.
the class SGenJavaValidatorTest method checkDuplicateGeneratorEntryFeature.
/**
* @see SGenJavaValidator#checkDuplicateGeneratorEntryFeature(FeatureConfiguration)
*/
@Test
public void checkDuplicateGeneratorEntryFeature() {
EObject model = parseExpression("GeneratorModel for yakindu::java { statechart Example { feature Outlet { } feature Outlet { }}}", GeneratorModel.class.getSimpleName());
AssertableDiagnostics result = tester.validate(model);
result.assertAny(new MsgPredicate(DUPLICATE_FEATURE));
}
use of org.yakindu.sct.model.sgen.GeneratorModel in project statecharts by Yakindu.
the class SGenJavaValidatorTest method checkDuplicateFeatureParameter.
/**
* @see SGenJavaValidator#checkDuplicateFeatureParameter(org.yakindu.sct.model.sgen.FeatureParameterValue)
*/
@Test
public void checkDuplicateFeatureParameter() {
EObject model = parseExpression("GeneratorModel for yakindu::java { statechart Example { feature Outlet { targetFolder = true targetFolder = true }}}", GeneratorModel.class.getSimpleName());
AssertableDiagnostics result = tester.validate(model);
result.assertAny(new MsgPredicate(DUPLICATE_PARAMETER));
}
use of org.yakindu.sct.model.sgen.GeneratorModel in project statecharts by Yakindu.
the class SGenJavaValidatorTest method checkContentType.
/**
* @see SGenJavaValidator#checkContentType(org.yakindu.sct.model.sgen.GeneratorEntry)
*/
@Test
public void checkContentType() {
EObject model = parseExpression("GeneratorModel for yakindu::java { unkownType Example {}}", GeneratorModel.class.getSimpleName());
AssertableDiagnostics result = tester.validate(model);
result.assertAny(new MsgPredicate(UNKNOWN_CONTENT_TYPE));
}
Aggregations