lundi 26 janvier 2015

Akka Java create testprobe ref with path ?

i'm still a little new to testing with akka. In a system i'm building i'm doing something like



private void tellPublisherAboutUpdates(Map<String,Update> updates){
if(updates.isEmpty()){
getContext().actorSelection(ActorSelectionPath.UPDATE_PUBLISHER.path()).tell(new InfoMessage<Map<String,Update>>(updates), getSelf());
}
}


Now, my first thoughts were, using TestProbe, to create a test ref with the relevant path, but i'm not sure how to do this ? If there's an alternative method that is better suited to testing these kind of interactions i'm also keen to understand it.


Aucun commentaire:

Enregistrer un commentaire