I have an actor , which on one of the messages run this method :
def addAuctions(actions:List[String]): Unit = {
var i = 0
for(auction <- actions) {
val x = context.actorOf(Props(new Auction(auction, AUCTION_LIMIT_IN_SECONDS, self)), "auction" + i)
x ! Auction.Init
i= i+1
}
}
Then I have a following test :
"seller" in {
val seller = system.actorOf(Props[Seller],"seller")
seller ! Seller.NewAuctions(List("Laptop"))
// HERE - HOW TO TEST IT ?
}
How Can I test if seller send message Auction.Init ?
Aucun commentaire:
Enregistrer un commentaire