You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Russell Butek <bu...@us.ibm.com> on 2001/10/27 20:13:12 UTC

Generated impl template

Right now if --skeleton is turned on we generate a template implementation
where each method throws a not-yet-implemented exception.  For automated
testing purposes it would be very useful if this template didn't fail on
every call so that we could use the default implementation in the test.  In
fact, this would be almost critical because, as it is now, the generated
implementations aren't even being tested.

So I would like to do one of two things:
1.  Generate the template impl like we do now, throwing exceptions, unless
--testCase is turned on, in which case we generate runnable impls.
2.  Always generate runnable impls.

Do folks have a preference?  Mine is 2.

Russell Butek
butek@us.ibm.com




Re: Generated impl template

Posted by Rob Jellinghaus <ro...@unrealities.com>.
In fact, this makes me wonder:  why not actually test *for* the NYI exception being returned?  Wouldn't that be a valid test that the stub was getting called, as well as a valid test that the stub was really NYI as it should be?

If it's not possible to verify the type of the exception without doing some kind of icky string sniffing, then isn't that something that could / should be fixed?  (passing of typed faults over the wire, preserving type?)

Cheers!
Rob


At 01:53 PM 10/28/2001 -0500, Glen Daniels wrote:
>Hi Russell!
>
>I can see this going either way, really.  I kind of like the cleanliness of
>"NYI" exceptions, which remind you to fill something in more than just
>returning null or something.
>
>--G
>
>----- Original Message -----
>From: "Russell Butek" <bu...@us.ibm.com>
>To: <ax...@xml.apache.org>
>Sent: Saturday, October 27, 2001 1:13 PM
>Subject: Generated impl template
>
>
>> Right now if --skeleton is turned on we generate a template implementation
>> where each method throws a not-yet-implemented exception.  For automated
>> testing purposes it would be very useful if this template didn't fail on
>> every call so that we could use the default implementation in the test.
>In
>> fact, this would be almost critical because, as it is now, the generated
>> implementations aren't even being tested.
>>
>> So I would like to do one of two things:
>> 1.  Generate the template impl like we do now, throwing exceptions, unless
>> --testCase is turned on, in which case we generate runnable impls.
>> 2.  Always generate runnable impls.
>>
>> Do folks have a preference?  Mine is 2.
>>
>> Russell Butek
>> butek@us.ibm.com
>>
>>
>>
>
>


Re: Generated impl template

Posted by Glen Daniels <gd...@macromedia.com>.
Hi Russell!

I can see this going either way, really.  I kind of like the cleanliness of
"NYI" exceptions, which remind you to fill something in more than just
returning null or something.

--G

----- Original Message -----
From: "Russell Butek" <bu...@us.ibm.com>
To: <ax...@xml.apache.org>
Sent: Saturday, October 27, 2001 1:13 PM
Subject: Generated impl template


> Right now if --skeleton is turned on we generate a template implementation
> where each method throws a not-yet-implemented exception.  For automated
> testing purposes it would be very useful if this template didn't fail on
> every call so that we could use the default implementation in the test.
In
> fact, this would be almost critical because, as it is now, the generated
> implementations aren't even being tested.
>
> So I would like to do one of two things:
> 1.  Generate the template impl like we do now, throwing exceptions, unless
> --testCase is turned on, in which case we generate runnable impls.
> 2.  Always generate runnable impls.
>
> Do folks have a preference?  Mine is 2.
>
> Russell Butek
> butek@us.ibm.com
>
>
>