ChangeLogSet changelogSets = (ChangeLogSet) changedLogs.get( 0 );
assertEquals( "Test number of revisions on changelog 1", 2, changelogSets.getChangeSets().size() );
ChangeSet changeSet = (ChangeSet) changelogSets.getChangeSets().get( 0 );
Calendar cal = Calendar.getInstance(); // new cal with default TZ
cal.set( 1977, 7, 6, 5, 30, 0); // expected date from min-changelog.xml
cal.set( Calendar.MILLISECOND, 0);
assertEquals( "Test changelog 1 set 1 date/time", cal.getTime().getTime(), changeSet.getDate().getTime() );
assertEquals( "Test changelog 1 set 1 author", "Edwin Punzalan", changeSet.getAuthor() );
assertEquals( "Test changelog 1 set 1 msg", "First commit msg", changeSet.getComment() );
assertEquals( "Test changelog 1 set 1 files", 1, changeSet.getFiles().size() );
ChangeFile changeFile = (ChangeFile) changeSet.getFiles().get( 0 );
assertEquals( "Test changelog 1 set 1 file 1 filename", "/path/to/file.extension", changeFile.getName() );
assertEquals( "Test changelog 1 set 1 file 1 revision", "1", changeFile.getRevision() );
changeSet = (ChangeSet) changelogSets.getChangeSets().get( 1 );
cal.set( 2005, 1, 24, 21, 30, 0 );
assertEquals( "Test changelog 1 set 2 date/time", cal.getTime().getTime(), changeSet.getDate().getTime() );
assertEquals( "Test changelog 1 set 2 author", "Edwin Punzalan", changeSet.getAuthor() );
assertEquals( "Test changelog 1 set 2 msg", "Second commit msg", changeSet.getComment() );
assertEquals( "Test changelog 1 set 2 files", 2, changeSet.getFiles().size() );
changeFile = (ChangeFile) changeSet.getFiles().get( 0 );
assertEquals( "Test changelog 1 set 2 file 1 filename", "/path/to/file.extension", changeFile.getName() );
assertEquals( "Test changelog 1 set 2 file 1 revision", "2", changeFile.getRevision() );
changeFile = (ChangeFile) changeSet.getFiles().get( 1 );
assertEquals( "Test changelog 1 set 2 file 2 filename", "/path/to/file2.extension", changeFile.getName() );
assertEquals( "Test changelog 1 set 2 file 2 revision", "2", changeFile.getRevision() );
changelogSets = (ChangeLogSet) changedLogs.get( 1 );
assertEquals( "Test number of revisions on changelog 2", 2, changelogSets.getChangeSets().size() );
changeSet = (ChangeSet) changelogSets.getChangeSets().get( 0 );
cal.set( 2005, 1, 25, 22, 45, 0 );
assertEquals( "Test changelog 2 set 1 date/time", cal.getTime().getTime(), changeSet.getDate().getTime() );
assertEquals( "Test changelog 2 set 1 author", "Keogh Edrich Punzalan", changeSet.getAuthor() );
assertEquals( "Test changelog 2 set 1 msg", "Third commit msg", changeSet.getComment() );
assertEquals( "Test changelog 2 set 1 files", 1, changeSet.getFiles().size() );
changeFile = (ChangeFile) changeSet.getFiles().get( 0 );
assertEquals( "Test changelog 2 set 1 file 1 filename", "/path/to/file.extension", changeFile.getName() );
assertEquals( "Test changelog 2 set 1 file 1 revision", "3", changeFile.getRevision() );
changeSet = (ChangeSet) changelogSets.getChangeSets().get( 1 );
cal.set( 2100, 1, 25, 5, 30, 0 );
assertEquals( "Test changelog 2 set 2 date/time", cal.getTime().getTime(), changeSet.getDate().getTime() );
assertEquals( "Test changelog 2 set 2 author", "Keogh Edrich Punzalan", changeSet.getAuthor() );
assertEquals( "Test changelog 2 set 2 msg", "Last commit msg", changeSet.getComment() );
assertEquals( "Test changelog 2 set 2 files", 2, changeSet.getFiles().size() );
changeFile = (ChangeFile) changeSet.getFiles().get( 0 );
assertEquals( "Test changelog 2 set 2 file 1 filename", "/path/to/file.extension", changeFile.getName() );
assertEquals( "Test changelog 2 set 2 file 1 revision", "4", changeFile.getRevision() );
changeFile = (ChangeFile) changeSet.getFiles().get( 1 );
assertEquals( "Test changelog 2 set 2 file 2 filename", "/path/to/file2.extension", changeFile.getName() );
assertEquals( "Test changelog 2 set 2 file 2 revision", "4", changeFile.getRevision() );
}