if (entries != null)
{
Iterator ientry = entries.iterator();
while (ientry.hasNext())
{
Entry entry = (Entry) ientry.next();
Map assertionResults = entry.getAssertionResultList();
if (assertionResults != null)
{
Iterator iassertionResults = assertionResults.values().iterator();
while (iassertionResults.hasNext())
{
AssertionResult ar = (AssertionResult) iassertionResults.next();
if (ar.getResult().equalsIgnoreCase(FAILED) &&
wsiPreferences.getComplianceLevel().equals(WSITestToolsEclipseProperties.STOP_NON_WSI))
{
TestAssertion ta = ar.getAssertion();
if (ta.isEnabled())
{
Iterator errorMessages = ar.getFailureDetailList().iterator();
while (errorMessages.hasNext())
{
FailureDetailImpl fdi = (FailureDetailImpl)errorMessages.next();
int lineNumber = 0;
int columnNumber = 0;
ElementLocation el = fdi.getElementLocation();
if (el != null)
{
lineNumber = el.getLineNumber();
columnNumber = el.getColumnNumber();
}
//TODO: get assertion locations in the log file
assertionerrors.add(
new AssertionError(
ta.getId(),
"Message ID " + entry.getReferenceID() + ":" + ta.getFailureMessage(),
lineNumber,
columnNumber));
}
}
}
else if (ar.getResult().equalsIgnoreCase(FAILED) &&
wsiPreferences.getComplianceLevel().equals(WSITestToolsEclipseProperties.WARN_NON_WSI))
{
TestAssertion ta = ar.getAssertion();
if (ta.isEnabled())
{
Iterator errorMessages = ar.getFailureDetailList().iterator();
while (errorMessages.hasNext())
{
FailureDetailImpl fdi = (FailureDetailImpl)errorMessages.next();
int lineNumber = 0;
int columnNumber = 0;
ElementLocation el = fdi.getElementLocation();
if (el != null)
{
lineNumber = el.getLineNumber();
columnNumber = el.getColumnNumber();
}
//TODO: get assertion locations in the log file
assertionwarnings.add(
new AssertionError(
ta.getId(),
"Message ID " + entry.getReferenceID() + ":" + ta.getFailureMessage(),
lineNumber,
columnNumber));
}
}
}