1

Resolved

Add MemoryTrackingParticipant WhenState(state, action) method

description

When unit testing, sometimes the test code needs to do something when the workflow enters a particular state. Using this method the test code can add an action to a list of actions that will be invoked when the workflow under test publishes a StateMachineStateRecord for the named state.
 
Each action in the list will be invoked every time the matching state record is received.

comments

ronjacobs wrote Dec 6, 2011 at 7:40 PM

Example - Test code wants to set a bool value true when the Open state is reached.

host.Tracking.WhenState(States.Open, (smr) => nextIdleCompletes = true);

wrote Jun 18, 2012 at 10:00 PM

wrote Feb 22, 2013 at 12:08 AM

wrote May 16, 2013 at 11:27 AM

wrote May 16, 2013 at 11:27 AM

wrote Jun 14, 2013 at 7:29 AM