{
@Override
protected boolean argumentMatches( final Object expected, final Object actual )
{
final FileSet e = (FileSet) expected;
final FileSet a = (FileSet) actual;
if ( !eq( e.getDirectory(), a.getDirectory() ) )
{
System.out.println( "FileSet directory expected: " + e.getDirectory() + "\nActual: "
+ a.getDirectory() );
return false;
}
if ( !eq( e.getPrefix(), a.getPrefix() ) )
{
System.out.println( "FileSet prefix expected: " + e.getPrefix() + "\nActual: " + a.getPrefix() );
return false;
}
if ( !areq( e.getIncludes(), a.getIncludes() ) )
{
System.out.println( "FileSet includes expected: " + arToStr( e.getIncludes() ) + "\nActual: "
+ arToStr( a.getIncludes() ) );
return false;
}
if ( !areq( e.getExcludes(), a.getExcludes() ) )
{
System.out.println( "FileSet excludes expected: " + arToStr( e.getExcludes() ) + "\nActual: "
+ arToStr( a.getExcludes() ) );
return false;
}
return true;
}
@Override
protected String argumentToString( final Object argument )
{
final FileSet a = (FileSet) argument;
return argument == null ? "Null FileSet" : "FileSet:[dir=" + a.getDirectory() + ", prefix: "
+ a.getPrefix() + "\nincludes:\n" + arToStr( a.getIncludes() ) + "\nexcludes:\n"
+ arToStr( a.getExcludes() ) + "]";
}
private String arToStr( final String[] array )
{
return array == null ? "-EMPTY-" : StringUtils.join( array, "\n\t" );