Type: info
         Title: OOoRunner: complexlib.Assurance: +assureException
     Posted by: frank.schoenh...@sun.com
      Affected: -
Effective from: CWS dba32b
           CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/dba32b>
    CWS status: new


*Summary*
--------
class complexlib.Assurance:
+ protected void assureException( final String _message,
    final Object _object, final String _methodName,
    final Class[] _argClasses, final Object[] _methodArgs,
    final Class _expectedExceptionClass )
+ various flavours


*Description*
-------------
complexlib.Assurance, base class of complexlib.ComplexTestCase, now
has a facility to check a certain exception being thrown (or not
thrown) when invoking a given method.

For this, the method with the given name is looked up at the given
object (using introspection), and called with the given parameters. If
the given exception class is not null, then the method is expected to
throw an exception of the given class. If the exception class is null,
then the method is expected to throw no exception.
If this expectation does not meet reality, this is delegated (with the
given message) to the Assurance.assure method, effectively throwing an
AssureException this way.

For convenience, and as usual for the other assureSomething methods,
there are versions of assureException which do not take a message, but
generate a default one. Also, there are versions which do not take the
_argClasses parameter, but deduce the classes of the parameters of the
given method from _methodArgs (which works only if those are not null).


Send feedback to interface-announce@openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: interface-announce-unsubscr...@openoffice.org
For additional commands, e-mail: interface-announce-h...@openoffice.org

Reply via email to