|
From: David S. <ds...@st...> - 2002-07-24 14:02:30
|
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. |