This is actually JUnit functionality. The main problem is when you are
comparing 2 strings it is often hard to see where the difference is,
especially in an assertion message. So the junit guys (tried to) solve
this by only showing the different parts of the strings. In your case,
HOME and HOME1 only differ on the last character, and this shows as
'...' and '...1'.
Try the following assert to see junit in action:
assertEquals("1234567890", "1324567890");
jWebUnit uses the JUnit framework for this kind of assertions.
Hope this helps,
Martijn
Roger Rustin wrote:
In the main page example the assetion statement is
assertTitleEquals("HttpUnit Home");
It works just fine. I changed the assertion statement to
assertTitleEquals("HttpUnit Home1"); I changed Home to Home1. Now the
test fails which is ok but the failure message is not complete. My
question is why don't I see the actual value that the application got.
D:\eclipse\workspace\unittesting\bin>java javadude.AllTests
.F
Time: 3.024
There was 1 failure:
1) testSearch(javadude.JWebUnitSearchExample)junit.framework.ComparisonFailure:
expected:<...1> but
was:<...>
at
net.sourceforge.jwebunit.WebTester.assertTitleEquals(WebTester.java:91)
at
net.sourceforge.jwebunit.WebTestCase.assertTitleEquals(WebTestCase.java:56)
at
javadude.JWebUnitSearchExample.testSearch(JWebUnitSearchExample.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at javadude.AllTests.main(AllTests.java:19)
FAILURES!!!
Tests run: 1, Failures: 1, Errors: 0
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Jwebunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Jwebunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users