river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patricia Shanahan <p...@acm.org>
Subject Re: Please review the river-examples project
Date Mon, 09 Feb 2015 20:50:54 GMT
I think "production" client and test both have value. As far as 
possible, the example should mimic the structure and layout of a 
complete project, but in miniature.

On 2/9/2015 12:37 PM, Dennis Reedy wrote:
>
>> On Feb 9, 2015, at 155PM, Patricia Shanahan <pats@acm.org> wrote:
>>
>> The purpose of a test would be to demonstrate principles of writing tests for River
services and clients, rather than to actually test anything.
>>
>> For example, a test of the service could pick different "name" strings, feed them
to the service, and compare the returned string to an expected value.
>>
>> How should one test a River client? Replace the service with a stub class implementing
its interface???
>
> You could mock out the service, a simple way to do that is Proxy.newProxyInstance(...).
>
> Another way to think about this is to not provide a client at all, because the service's
test is actually a client that discovers and invokes methods on the service. The test client
then becomes a reference on how to develop a client.
>
> Dennis
>

Mime
View raw message