use of org.drools.workbench.models.guided.dtable.shared.auditlog.UpdateColumnAuditLogEntry in project drools-wb by kiegroup.
the class AuditLogEntryCellHelperTest method getSafeHtml_BrlCondition_DefinitionOnly.
@Test
public void getSafeHtml_BrlCondition_DefinitionOnly() {
BRLConditionColumn originalColumn = new BRLConditionColumn();
originalColumn.setDefinition(Arrays.asList(new FactPattern("FactType1")));
originalColumn.setHeader("condition");
originalColumn.setHideColumn(false);
BRLConditionColumn newColumn = new BRLConditionColumn();
originalColumn.setDefinition(Arrays.asList(new FactPattern("FactType2"), new FactPattern("FactType3")));
newColumn.setHeader("condition");
newColumn.setHideColumn(false);
List<BaseColumnFieldDiff> diffs = originalColumn.diff(newColumn);
SafeHtml result = helper.getSafeHtml(new UpdateColumnAuditLogEntry("mock user", originalColumn, newColumn, diffs));
// Definition diffs are currently not supported, maybe #soon?
// assertEquals(getHeaderRepre(newColumn.getHeader()) + getDiffRepre(diffs), result.asString());
assertEquals(getHeaderRepre(newColumn.getHeader()) + getDiffRepre(new ArrayList<>()), result.asString());
}
Aggregations