List< AssertPosition > failures;
failures = new ArrayList< AssertPosition >();
for ( int i = 0; i < expectedPositions.length; i++ )
{
final IFlexViolation violation = violations.get( i );
final ViolationPosition expectedPosition = expectedPositions[ i ];
if ( expectedPosition.getBeginLine() != violation.getBeginLine() )
{
failures.add( AssertPosition.create( BEGIN_LINE_NOT_CORRECT
+ " at " + i + "th violation on " + resourcePath,
expectedPosition.getBeginLine(),
violation.getBeginLine() ) );
}
if ( expectedPosition.getEndLine() != violation.getEndLine() )
{
failures.add( AssertPosition.create( END_LINE_NOT_CORRECT
+ " at " + i + "th violation on " + resourcePath,
expectedPosition.getEndLine(),
violation.getEndLine() ) );
}
}
return failures;
}