use of org.apache.maven.scm.ChangeFile in project maven-plugins by apache.
the class FileActivityComparatorTest method testCompareByName.
public void testCompareByName() {
List<ChangeFile> list1 = new ArrayList<ChangeFile>();
list1.add(new ChangeFile("changefile-1", "123"));
list1.add(new ChangeFile("changefile-1", "468"));
List<ChangeFile> list2 = new ArrayList<ChangeFile>();
list2.add(new ChangeFile("changefile-2", "246"));
list2.add(new ChangeFile("changefile-2", "468"));
assertTrue("Test compare by name, less than", comparator.compare(list1, list2) < 0);
list1 = new ArrayList<ChangeFile>();
list1.add(new ChangeFile("changefile-1", "246"));
list1.add(new ChangeFile("changefile-1", "468"));
list2 = new ArrayList<ChangeFile>();
list2.add(new ChangeFile("changefile-2", "123"));
list2.add(new ChangeFile("changefile-2", "234"));
assertTrue("Test compare by name, greater than", comparator.compare(list1, list2) > 0);
}
Aggregations