|
From: Sean M. <sea...@pr...> - 2002-07-24 13:27:53
|
At 14:15 24/07/2002 +0100, Michael Coughlan wrote: >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. > The idea of the pre-condition on a unit test is to allow you to test something known to be a pre-requisite to executing the test case. For example, an XComponent unit test that will connect to JDBC source FOO can only be executed if FOO exists. The idea of the post-condition on a unit test is to allow you to test for desired side-effects of executing an XComponent. For example, if an XComponent creates a copy of its input file on a WebDav server somewhere, the post-condition could be a test to ensure the file has been written to the WebDav server sucessfully. Maybe this is making XComponents too clever? Sean |