object MyAwesomeSnippet extends MyAwesomeSnippet {
val myAwesomeActor: LiftActor = MyAwesomeActor // My awesome actor is a singleton LiftActor.
}
trait MyAwesomeSnippet {
def myAwesomeActor: LiftActor
def sendTheActorAMessage {
myAwesomeActor ! SomeMessage
}
}
"My Awesome Snippet" should { "Dispatch the SomeMessage message to the MyAwesomeActor" in { val myAwesomeSnippetMock = new MyAwesomeSnippet { val myAwesomeActor = new MockLiftActor() }
myAwesomeSnippetMock.sendTheActorMessage
myAwesomeSnippetMock.myAwesomeActor.messageCount must_== 1 myAwesomeSnippetMock.myAwesomeActor.hasMessage_?(SomeMessage) must_== true }}
You can currently send messages synchronously using the !! call, can't you?
Hi Matt,
Does the containsMessage find case clssses with different values.
MyCaseClass (1) vs MyCaseClass (2)
?
Sent from my tablet
Diego
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to a topic in the Google Groups "Lift" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/liftweb/V7ixZLhc2TI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to liftweb+u...@googlegroups.com.
case class BroadcastNewUserRecord(id: Long, username: String)
You can currently send messages synchronously using the !! call, can't you?
Ok, after some further thinking about it, I decided to go ahead and expose the entire mailbox through the "messages" function. That should enable whatever kind of edge case beyond "has the mock actor received this message?" and "how many messages has the mock actor received?"Let me know if y'all have any additional thoughts. :)
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.