/AkkaActorExample

Example of Akka actors and their unit tests in Scala

Primary LanguageScala

Scala Actor Examples with Unit Tests

This project contains examples of how to create and unit test Akka actors. It consists of two simple actors:

  1. A Calculator which does stateless arithmetic.
  2. An Accumulator which statefully accumulates values passed to it.

The CalculatorSpec unit tests show how to test actors. The Calculator companion object also contains a main function that is an example of how to use for-comprehension on futures.

The AccumulatorSpec unit tests show how to write unit tests which access an actor's internals.