本文整理了Java中org.kie.workbench.common.stunner.core.graph.content.definition.Definition.setDefinition()
方法的一些代码示例,展示了Definition.setDefinition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Definition.setDefinition()
方法的具体详情如下:
包路径:org.kie.workbench.common.stunner.core.graph.content.definition.Definition
类名称:Definition
方法名:setDefinition
暂无
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-core-common
@Test
@SuppressWarnings("unchecked")
public void testExecute() {
final CommandResult<RuleViolation> result = tested.execute(graphCommandExecutionContext);
assertEquals(CommandResult.Type.INFO,
result.getType());
verify(content).setDefinition(eq(NEW_DEFINITION));
assertEquals(2, labels.size());
assertTrue(labels.contains(NEW_DEFINITION_ID));
assertTrue(labels.contains(NEW_DEFINITION_LABEL));
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-core-common
@Test
@SuppressWarnings("unchecked")
public void testUndo() {
//Execute command and mock new state
tested.execute(graphCommandExecutionContext);
reset(content);
when(content.getDefinition()).thenReturn(NEW_DEFINITION);
final CommandResult<RuleViolation> result = tested.undo(graphCommandExecutionContext);
assertEquals(CommandResult.Type.INFO,
result.getType());
verify(content).setDefinition(eq(CURRENT_DEFINITION));
assertEquals(1, labels.size());
assertTrue(labels.contains(CURRENT_DEFINITION_ID));
}
}
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-core-common
candidate.getContent().setDefinition(newDef);
内容来源于网络,如有侵权,请联系作者删除!