Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37833
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Calling deprecated methods |
| Date | 2017-12-13 08:21 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <p0r9ga$ikh$1@dont-email.me> (permalink) |
| References | (5 earlier) <p0pg91$b3f$1@news.albasani.net> <c0757a6b-fed6-4ee8-b75d-e6b220bfa894@googlegroups.com> <p0plu3$tqm$1@news.albasani.net> <p0pms6$4o2$1@dont-email.me> <6538543c-98d3-460d-bca1-185227ab9a84@googlegroups.com> |
On 12/13/2017 7:51 AM, Eric Douglas wrote:
> On Tuesday, December 12, 2017 at 5:57:21 PM UTC-5, Eric Sosman wrote:
>> ... or mostly right. A setter that is supposed to enforce a
>> restriction like "the value must be strictly positive" should be
>> tested to ensure that it does in fact throw the proper exception.
>> Similarly for setters with state dependencies like "the value can
>> be changed at will before the doItNowBabe() method is called, but
>> cannot be changed thereafter."
>>
>>> [... good advice about test harnesses ...]
>>> Been there, done that, got the benefits.
>>
>> Ditto, seconded, and Aayy-men!
>
> Interaction is sometimes the hard part of testing. Method A works fine, unless you've called Method B with value C then Method D with value E first?
Lots of things are the hard part of testing. :(
Some practitioners who have given the matter much more thought
than I ever will are scrupulous about distinguishing between "unit
tests" and "integration tests" and "system tests" (Aside: when did
"acceptance tests" go out of fashion?), but to me the demarcation
lines seem not perfectly sharp. A test for your A/B/D example might
be viewed as an integration test of the A/B/D methods, or as a unit
test of the component that owns all three (does it make the advertised
state transitions in the expected way?). Deeper thinkers than I may
have a useful way to classify such things; for myself, I just try to
figure out Some Kind Of Test and let the nomenclature slide.
--
esosman@comcast-dot-net.invalid
Eleven hundred thirty-four days to go.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> - 2017-12-12 08:09 -0800
Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> - 2017-12-12 16:31 +0000
Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> - 2017-12-12 10:24 -0800
Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> - 2017-12-12 20:05 +0000
Re: Calling deprecated methods Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-12-12 15:41 -0500
Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> - 2017-12-12 21:04 +0000
Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> - 2017-12-12 13:33 -0800
Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> - 2017-12-12 22:41 +0000
Re: Calling deprecated methods Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-12-12 17:57 -0500
Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> - 2017-12-13 04:51 -0800
Re: Calling deprecated methods Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-12-13 08:21 -0500
Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> - 2017-12-13 05:40 -0800
Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> - 2017-12-13 15:19 +0000
Re: Calling deprecated methods Eric Douglas <e.d.programmer@gmail.com> - 2017-12-13 07:57 -0800
Re: Calling deprecated methods Kiwi User <martin@mydomain.invalid> - 2017-12-13 17:30 +0000
csiph-web