Search in sources :

Example 1 with TImportedValues

use of org.kie.dmn.model.v1_2.TImportedValues in project kie-wb-common by kiegroup.

the class BaseLiteralExpressionPropertyConverterTest method testWBFromDMN.

@Test
public void testWBFromDMN() {
    final LiteralExpression dmn = new TLiteralExpression();
    final QName typeRef = new QName(KIE.getUri(), LOCAL, KIE.getPrefix());
    final ImportedValues importedValues = new TImportedValues();
    importedValues.setImportedElement(IMPORTED_ELEMENT);
    dmn.setId(UUID);
    dmn.setDescription(DESCRIPTION);
    dmn.setTypeRef(typeRef);
    dmn.setText(TEXT);
    dmn.setImportedValues(importedValues);
    final T wb = convertWBFromDMN(dmn);
    assertThat(wb.getId().getValue()).isEqualTo(UUID);
    assertThat(wb.getDescription().getValue()).isEqualTo(DESCRIPTION);
    assertThat(wb.getTypeRef().getNamespaceURI()).isEqualTo(KIE.getUri());
    assertThat(wb.getTypeRef().getLocalPart()).isEqualTo(LOCAL);
    assertThat(wb.getTypeRef().getPrefix()).isEqualTo(KIE.getPrefix());
    assertThat(wb.getText().getValue()).isEqualTo(TEXT);
    assertThat(wb.getImportedValues().getImportedElement()).isEqualTo(IMPORTED_ELEMENT);
    assertThat(wb.getImportedValues().getParent()).isEqualTo(wb);
}
Also used : QName(javax.xml.namespace.QName) TLiteralExpression(org.kie.dmn.model.v1_2.TLiteralExpression) IsLiteralExpression(org.kie.workbench.common.dmn.api.definition.model.IsLiteralExpression) LiteralExpression(org.kie.dmn.model.api.LiteralExpression) ImportedValues(org.kie.dmn.model.api.ImportedValues) TImportedValues(org.kie.dmn.model.v1_2.TImportedValues) TImportedValues(org.kie.dmn.model.v1_2.TImportedValues) TLiteralExpression(org.kie.dmn.model.v1_2.TLiteralExpression) Test(org.junit.Test)

Aggregations

QName (javax.xml.namespace.QName)1 Test (org.junit.Test)1 ImportedValues (org.kie.dmn.model.api.ImportedValues)1 LiteralExpression (org.kie.dmn.model.api.LiteralExpression)1 TImportedValues (org.kie.dmn.model.v1_2.TImportedValues)1 TLiteralExpression (org.kie.dmn.model.v1_2.TLiteralExpression)1 IsLiteralExpression (org.kie.workbench.common.dmn.api.definition.model.IsLiteralExpression)1