List<ChangeSet> modifications = consumer.getModifications();
for ( Iterator<ChangeSet> i = modifications.iterator(); i.hasNext(); )
{
ChangeSet entry = i.next();
assertEquals( "Mark Struberg <struberg@yahoo.de>", entry.getAuthor() );
assertNotNull( entry.getDate() );
assertTrue( entry.getComment() != null && entry.getComment().length() > 0 );
assertNotNull( entry.getRevision() );
assertNotNull( entry.getFiles() );
assertFalse( entry.getFiles().isEmpty() );
}
assertEquals( 8, modifications.size() );
ChangeSet entry = (ChangeSet) modifications.get( 4 );
assertEquals( "Mark Struberg <struberg@yahoo.de>", entry.getAuthor() );
assertNotNull( entry.getDate() );
SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss Z" );
sdf.setTimeZone( TimeZone.getTimeZone( "GMT" ) );
assertEquals( "2007-11-27 13:05:36 +0000", sdf.format( entry.getDate() ) );
assertEquals( "52733aa427041cafd760833cb068ffe897fd35db", entry.getRevision() );
assertEquals( "fixed a GitCommandLineUtil and provice first version of the checkin command.", entry
.getComment() );
assertNotNull( entry.getFiles() );
assertEquals( 10, entry.getFiles().size() );
ChangeFile cf = (ChangeFile) entry.getFiles().get( 0 );
assertEquals(
"maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/GitCommandLineUtils.java",
cf.getName() );
assertTrue( cf.getRevision() != null && cf.getRevision().length() > 0 );
}