OpenPetra
Free Administration Software for Non-Profits
Ict.Testing.NUnitTools.TNUnitEventHandlerCheck< TEventArgs > Class Template Reference

To be used with NUnit to faciltate checking of Events - if they are getting raised and if they aren't getting raised. More...

Public Member Functions

 TNUnitEventHandlerCheck ()
 Constructor More...
 
void ResetCheck ()
 Use this to re-use the same instance of TNUnitEventHandlerCheck for multiple checks. More...
 
void Handler (object sender, TEventArgs e)
 Subscriber/consumer of the Event that should be tested. More...
 

Properties

object Sender [get]
 Sender of the Event. More...
 
TEventArgs EventArgs [get]
 EventArgs of the Event. More...
 
bool EventGotRaised [get]
 True if the Event got raised, false if it did not get raised. More...
 

Detailed Description

To be used with NUnit to faciltate checking of Events - if they are getting raised and if they aren't getting raised.

To be used in connection with Class TNUnitEventAsserter.

Type Constraints
TEventArgs :EventArgs 

Constructor & Destructor Documentation

◆ TNUnitEventHandlerCheck()

Member Function Documentation

◆ Handler()

void Ict.Testing.NUnitTools.TNUnitEventHandlerCheck< TEventArgs >.Handler ( object  sender,
TEventArgs  e 
)
inline

Subscriber/consumer of the Event that should be tested.

Example: MyWidget.Firing += {your instance of TNUnitEventHandlerCheck}.Handler

Parameters
sender
e

◆ ResetCheck()

void Ict.Testing.NUnitTools.TNUnitEventHandlerCheck< TEventArgs >.ResetCheck ( )
inline

Use this to re-use the same instance of TNUnitEventHandlerCheck for multiple checks.

Property Documentation

◆ EventArgs

TEventArgs Ict.Testing.NUnitTools.TNUnitEventHandlerCheck< TEventArgs >.EventArgs
get

EventArgs of the Event.

◆ EventGotRaised

bool Ict.Testing.NUnitTools.TNUnitEventHandlerCheck< TEventArgs >.EventGotRaised
get

True if the Event got raised, false if it did not get raised.

◆ Sender

object Ict.Testing.NUnitTools.TNUnitEventHandlerCheck< TEventArgs >.Sender
get

Sender of the Event.


The documentation for this class was generated from the following file: