use of org.eclipse.bpmn2.ItemDefinition in project drools by kiegroup.
the class ItemDefinitionDependenciesTest method testOrdering2.
@Test
public void testOrdering2() {
ItemDefinition tMortgageType = build("tMortgageType");
ItemDefinition tObjective = build("tObjective");
ItemDefinition tRequested = build("tRequested", tMortgageType, tObjective);
ItemDefinition tProduct = build("tProduct");
ItemDefinition tProductCollection = build("tProductCollection", tProduct);
ItemDefinition tConformanceType = build("tConformanceType");
ItemDefinition tLoanTypes = build("tLoanTypes", tMortgageType, tConformanceType);
List<ItemDefinition> originalList = Arrays.asList(new ItemDefinition[] { tRequested, tProduct, tProductCollection, tMortgageType, tObjective, tConformanceType, tLoanTypes });
List<ItemDefinition> orderedList = orderingStrategy(originalList);
assertTrue("Index of tMortgageType < tRequested", orderedList.indexOf(tMortgageType) < orderedList.indexOf(tRequested));
assertTrue("Index of tObjective < tRequested", orderedList.indexOf(tObjective) < orderedList.indexOf(tRequested));
assertTrue("Index of tProduct < tProductCollection", orderedList.indexOf(tProduct) < orderedList.indexOf(tProductCollection));
assertTrue("Index of tMortgageType < tLoanTypes", orderedList.indexOf(tMortgageType) < orderedList.indexOf(tLoanTypes));
assertTrue("Index of tConformanceType < tLoanTypes", orderedList.indexOf(tConformanceType) < orderedList.indexOf(tLoanTypes));
}
Aggregations