Search in sources :

Example 16 with Definitions

use of org.camunda.bpm.model.dmn.instance.Definitions in project camunda-dmn-model by camunda.

the class DmnModelInstanceTest method testClone.

@Test
public void testClone() throws Exception {
    DmnModelInstance modelInstance = Dmn.createEmptyModel();
    Definitions definitions = modelInstance.newInstance(Definitions.class);
    definitions.setId("TestId");
    modelInstance.setDefinitions(definitions);
    DmnModelInstance cloneInstance = modelInstance.clone();
    cloneInstance.getDefinitions().setId("TestId2");
    assertThat(modelInstance.getDefinitions().getId(), is(equalTo("TestId")));
    assertThat(cloneInstance.getDefinitions().getId(), is(equalTo("TestId2")));
}
Also used : Definitions(org.camunda.bpm.model.dmn.instance.Definitions) Test(org.junit.Test)

Aggregations

Definitions (org.camunda.bpm.model.dmn.instance.Definitions)16 Decision (org.camunda.bpm.model.dmn.instance.Decision)11 Test (org.junit.Test)11 DecisionTable (org.camunda.bpm.model.dmn.instance.DecisionTable)9 Output (org.camunda.bpm.model.dmn.instance.Output)9 Input (org.camunda.bpm.model.dmn.instance.Input)7 InputEntry (org.camunda.bpm.model.dmn.instance.InputEntry)6 InputExpression (org.camunda.bpm.model.dmn.instance.InputExpression)6 OutputEntry (org.camunda.bpm.model.dmn.instance.OutputEntry)6 Rule (org.camunda.bpm.model.dmn.instance.Rule)6 InputValues (org.camunda.bpm.model.dmn.instance.InputValues)5 OutputValues (org.camunda.bpm.model.dmn.instance.OutputValues)5 Text (org.camunda.bpm.model.dmn.instance.Text)4 ArrayList (java.util.ArrayList)3 DmnModelInstance (org.camunda.bpm.model.dmn.DmnModelInstance)3 DmnDecision (org.camunda.bpm.dmn.engine.DmnDecision)2 BusinessContextElement (org.camunda.bpm.model.dmn.instance.BusinessContextElement)2 DrgElement (org.camunda.bpm.model.dmn.instance.DrgElement)2 ElementCollection (org.camunda.bpm.model.dmn.instance.ElementCollection)2 Import (org.camunda.bpm.model.dmn.instance.Import)2