|
From: Tony R. <ton...@pr...> - 2002-07-24 14:27:18
|
I agree on the pre/post conditions on the actual XComponent. When it
comes to unit tests though surely a unit test doesn't need to have a
pre/post condition on it. A unit test either is true or false. To me it
looks like there are too many levels of code around an actual XComponent
which strains the simplicity of the model. We could go on forever checking
the checks on the checks on the checks on the XComponents. Personally, I
think a line should be drawn at the unit tests as I don't think there should
be pre-conditions and post-conditions on unit tests...
T.
-----Original Message-----
From: xpi...@li...
[mailto:xpi...@li...]On Behalf Of David
Starr
Sent: 24 July 2002 15:03
To: Michael Coughlan; xpi...@li...
Subject: RE: [Xpipe-developers] Pre and post Conditions in Unit Tests
I always imagined that the pre/post conditions for an XComponent or an
XPipe were an implementation of programming by contract. It's like the same
feature in languages like Eifel. These could be useful for ensuring that
input is valid wrt some schema prior to processing, or that the output was
valid subsequent to passing it on. Similarly it could be used to evaluate
any finer grained constraint to ensure that the XComponent is only ever
executed on input for which it is known to generate correct results.
The pre/post conditions on tests serve a different purpose. These are the
means to determine whether the test passed or failed.
-----Original Message-----
From: xpi...@li...
[mailto:xpi...@li...]On Behalf Of Michael
Coughlan
Sent: Wednesday, July 24, 2002 9:15 AM
To: xpi...@li...
Subject: [Xpipe-developers] Pre and post Conditions in Unit Tests
According to the specification for XComponents, it can have multiple
UnitTests associated with it. This obviously enables an Xcomponent to be
tested by the XPipe engine before running it as a transformation stage in an
Xpipe. A Unit Test, by definition has pre and post conditions. The
XComponent itself has pre and post conditions also. Is it not overkill, for
a unit test to have pre and post conditions ??
Your thoughts please.
|