private void assertRuleExport(RuleBaseValues oldRule, RuleBaseValues newRule) { assertFalse("Ids should be different.", oldRule.getId().equals(newRule.getId())); assertEquals(oldRule.isActive(), newRule.isActive()); assertEquals( DateUtils.round(oldRule.getActivationDate(), Calendar.DATE), DateUtils.round(newRule.getActivationDate(), Calendar.DATE)); assertEquals(oldRule.getName(), newRule.getName()); assertEquals(oldRule.getCurrentInd(), newRule.getCurrentInd()); assertEquals(oldRule.getDeactivationDate(), newRule.getDeactivationDate()); assertEquals(oldRule.getDelegateRule(), newRule.getDelegateRule()); assertEquals(oldRule.getDescription(), newRule.getDescription()); assertEquals(oldRule.getDocTypeName(), newRule.getDocTypeName()); if (oldRule.getFromDateValue() == null) { assertNull(newRule.getFromDateValue()); } else { assertEquals( DateUtils.round(oldRule.getFromDateValue(), Calendar.DATE), DateUtils.round(newRule.getFromDateValue(), Calendar.DATE)); } if (oldRule.getToDateValue() == null) { assertNull(newRule.getToDateValue()); } else { assertEquals( DateUtils.round(oldRule.getToDateValue(), Calendar.DATE), DateUtils.round(newRule.getToDateValue(), Calendar.DATE)); } assertEquals(oldRule.getFromDateString(), newRule.getFromDateString()); assertEquals(oldRule.getToDateString(), newRule.getToDateString()); assertEquals(oldRule.isForceAction(), newRule.isForceAction()); if (!oldRule.getDelegateRule().booleanValue()) assertEquals(oldRule.getPreviousVersionId(), newRule.getPreviousVersionId()); assertEquals(oldRule.getDocumentId(), newRule.getDocumentId()); if (oldRule.getRuleTemplate() == null) { assertNull(newRule.getRuleTemplate()); } else { assertEquals(oldRule.getRuleTemplate().getName(), newRule.getRuleTemplate().getName()); } if (oldRule.getRuleExpressionDef() == null) { assertNull(newRule.getRuleExpressionDef()); } else { assertEquals( oldRule.getRuleExpressionDef().getExpression(), newRule.getRuleExpressionDef().getExpression()); assertEquals( oldRule.getRuleExpressionDef().getType(), newRule.getRuleExpressionDef().getType()); } if (!oldRule.getDelegateRule().booleanValue()) assertEquals(oldRule.getVersionNbr(), newRule.getVersionNbr()); assertRuleExtensions(oldRule.getRuleExtensions(), newRule.getRuleExtensions()); assertResponsibilities(oldRule.getRuleResponsibilities(), newRule.getRuleResponsibilities()); }