users@jersey.java.net

Re: [Jersey] "simple-servlet" sample tests

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 25 Sep 2008 08:27:46 +0200

On Sep 25, 2008, at 8:24 AM, Srinivas Naresh Bhimisetty wrote:

> Thanks Paul. I shall remember to check such things from the next time.
>

No problem. When testing the simple atom server we may need to use
some XPath to extract IDs from atom feeds and entries. When you are
ready i can point you to some code using XPath for testing WADL.

Paul.

> -Naresh
>
> Paul Sandoz wrote:
>> Hi Naresh,
>>
>> I am got a failure when i run the tests:
>>
>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>> 5.775 sec <<< FAILURE!
>> testResources
>> (com.sun.jersey.samples.servlet.resources.MasterResourceBeanTest)
>> Time elapsed: 5.704 sec <<< FAILURE!
>> junit.framework.AssertionFailedError: Expected reponse not seen
>> with query param '?rep=2'
>> at junit.framework.Assert.fail(Assert.java:47)
>> at junit.framework.Assert.assertTrue(Assert.java:20)
>> at
>> com
>> .sun
>> .jersey
>> .samples
>> .servlet
>> .resources
>> .MasterResourceBeanTest
>> .doTestResource3Page(MasterResourceBeanTest.java:200)
>> at
>> com
>> .sun
>> .jersey
>> .samples
>> .servlet
>> .resources
>> .MasterResourceBeanTest.testResources(MasterResourceBeanTest.java:
>> 115)
>>
>>
>> When the query parameter "rep" equals "2" then a form is returned.
>> You should be using Form instead of checking the encoded value
>> explicitly. I modified the code.
>>
>> Paul.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>