jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Odd output with servlet redirector and assert
Date Tue, 23 Dec 2003 23:06:05 GMT
Hi Jeff,

> -----Original Message-----
> From: Jeff_Mychasiw@nlgroup.ca [mailto:Jeff_Mychasiw@nlgroup.ca]
> Sent: 23 December 2003 20:30
> To: cactus-user@jakarta.apache.org
> Subject: Odd output with servlet redirector and assert
> Greetings:
>       I am using cactus 1.5/jboss3.0.4/tomcat4.0.6 and trying to using
> most simple config option that I can until I get he hang of writing
> So I have both the client and server side Jars in on the serverside
and am
> running tests with a browser.
> I noticed the output from assertEquals() does not show the expected
> actual values.
> Improper Key: expected:<...e> but was:<...>  should be:
> Expected: businessrule.customer.invalid.dat
> Actual:businessrule.customer.invalid.date
> The xml output is:
> <failure message="Improper Key: expected:<...e> but was:<...>"
> type="junit.framework.ComparisonFailure">
> junit.framework.ComparisonFailure: Improper Key: expected:<...e> but
> was:<...>
> at
> owup

This means that the 2 values compared are not the same. The difference
is "e". The fact that the full expected and actual values are not fully
shown is a feature of JUnit 3.8.x.

> I get the same type of output if I have &transform=yes in my url

This is different. Transform=yes means that the XML will be transformed
into HTML using a stylesheet (see

> In this case I am only testing two strings that are message resource
> The passes when the value is the same but when I test for a failure, I
> the output above.
> The test code is.
>       //Check for proper key
>       String msgKey = e.getMessageKey();
>       if(log.isDebugEnabled()) log.debug("Exception Key: " + msgKey);
>       //Should be the proper key
>       assertEquals("Improper Key:
> ","businessrule.customer.invalid.date",msgKey);
> I am very new to Cactus and Junit style testing, so please forgive me
> this a dumb question..


View raw message