JWebUnit Users:

 

I have a table containing a cell with semicolon separated text. When I
try asserting its contents with assertTableRowsEqual, the test fails
with the error below. For some reason, a space is inserted just before
each semicolon. I don't see the space in my HTML or my assert code.
Where is it coming from?

 

junit.framework.AssertionFailedError: Coronary Heart Disease (CHD);
Other Cardiovascular Disease; Diabetes; Stroke do not equal Coronary
Heart Disease (CHD) ; Other Cardiovascular Disease ; Diabetes ; Stroke

 

Here's my code (JWebUnit 1.4):

 

public void testMe() {

beginAt("/test.htm");

assertTableRowsEqual("TABLE_RISK_BIOMARKERS_EXTRA", 0, new String[][] {
new String[] { "Disease History", "Coronary Heart Disease (CHD); Other
Cardiovascular Disease; Diabetes; Stroke" } });

}

 

And here's test.htm

<body>

<table border="1" cellspacing="0" width="100%"
id="TABLE_RISK_BIOMARKERS_EXTRA">

  <tr>

    <td>Disease History</td>

    <td><a id="HEART_DISEASE_MEMBER" href>Coronary Heart Disease
(CHD)</a><a id="CARDIOVASCULAR_OTHER" href>; Other Cardiovascular
Disease</a><a id="DIABETES_MEMBER" href="">; Diabetes</a><a
id="STROKE_MEMBER" href>; Stroke</a></td>

  </tr>

</table>

</body>

 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to