}
@Test
public void testFindFirstViolationError()
{
final FlexPmdViolations violations = new FlexPmdViolations();
final List< IFlexViolation > abstractRowDataViolations = new ArrayList< IFlexViolation >();
assertEquals( "",
PmdEngineUtils.findFirstViolationError( violations ) );
final IFlexFile abstractRowDataFlexFile = getTestFiles().get( "AbstractRowData.as" );
abstractRowDataViolations.add( new Violation( new ViolationPosition( 0 ),
new ErrorRule(),
abstractRowDataFlexFile ) );
abstractRowDataViolations.add( new Violation( new ViolationPosition( 0 ),
new WarningRule(),
abstractRowDataFlexFile ) );
violations.getViolations().put( abstractRowDataFlexFile,
abstractRowDataViolations );
assertEquals( "An error violation has been found on the file AbstractRowData.as at line 0, with the rule"
+ " \"com.adobe.ac.pmd.engines.PmdEngineUtilsTest$ErrorRule\": \n",
PmdEngineUtils.findFirstViolationError( violations ) );
}