NUnitForms Class Library

NUnitFormTest.ExpectModal Method (String, ModalFormActivated, Boolean)

One of four overloaded methods to set up a modal dialog handler. If you expect a modal dialog to appear and can handle it during the test, use this method to set up the handler. Because "expected" is usually (always) true if you are calling this, I don't expect it will be used externally.

[Visual Basic]
Overloads Protected Sub ExpectModal( _
   ByVal name As String, _
   ByVal handler As ModalFormActivated, _
   ByVal expected As Boolean _
)
[C#]
protected void ExpectModal(
   string name,
   ModalFormActivated handler,
   bool expected
);

Parameters

name
The caption on the dialog you expect.
handler
The method to call when that dialog appears.
expected
A boolean to indicate whether you expect this modal dialog to appear.

See Also

NUnitFormTest Class | NUnit.Extensions.Forms Namespace | NUnitFormTest.ExpectModal Overload List