add FSMDocSpec and improve FSM API

- don’t require Option[Duration] and its implicit conversion
- provider “->” extractor inside the FSM trait
This commit is contained in:
Roland 2012-01-23 15:37:43 +01:00
parent 1333700c0d
commit 5e11b2df9d
3 changed files with 109 additions and 18 deletions

View file

@ -62,8 +62,8 @@ class TestFSMRef[S, D, T <: Actor](
* corresponding transition initiated from within the FSM, including timeout
* and stop handling.
*/
def setState(stateName: S = fsm.stateName, stateData: D = fsm.stateData, timeout: Option[Duration] = None, stopReason: Option[FSM.Reason] = None) {
fsm.applyState(FSM.State(stateName, stateData, timeout, stopReason))
def setState(stateName: S = fsm.stateName, stateData: D = fsm.stateData, timeout: Duration = null, stopReason: Option[FSM.Reason] = None) {
fsm.applyState(FSM.State(stateName, stateData, Option(timeout), stopReason))
}
/**