using TestFSMRef from java code

30 views
Skip to first unread message

Gilad

unread,
Jun 19, 2016, 5:31:23 AM6/19/16
to Akka User List
Hi,

I'm working on an Akka FSM using java/lambda. 
I've seen in the Scala testing doc examples of using TestFSMRef to set the state FSM state. In the matching Java docs there is no reference to TestFSMRef.

Can I use TestFSMRef in java testing code?
If not, can you suggest other ways of setting internal FSM state for testing?

Thank
Gilad

Patrik Nordwall

unread,
Jul 1, 2016, 9:34:14 AM7/1/16
to akka...@googlegroups.com
I think you are right that there is no Java API for TestFSMRef.

I wouldn't use TestFSMRef or TestActorRef, because I think that model of testing is broken. It works for simple cases but it's very easy to hit its limits and then things behave differently from the real thing in unpredictable ways.

Setting the state sounds like you should do via the constructor.

Regards,
Patrik

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Reply all
Reply to author
Forward
0 new messages