Example with Akka.Net: testing the DFS algorithm with Akka.Net TestKit

Introduction In my first post, I introduced an example with Akka.Net by implementing an algorithm: create a tree and visit it using depth first search (DFS). In this article, we are going to test this algorithm using Akka.Net TestKit. After explaining general principles of uniting testing with Akka.Net TestKit, I will present the particular implementation used for the … Continue reading Example with Akka.Net: testing the DFS algorithm with Akka.Net TestKit

Advertisements

Example with Akka.Net: create a tree and visit it using depth first search

Akka.Net helps building asynchronous and distributed programs. This framework is based on the actor model. In this model, actors are classes that communicate with messages only, and do not share mutable variables with other actors. Therefore, actors can safely run concurrently without synchronization mechanisms. I propose to have a look at this framework by implementing an algorithm : creating a tree, and visiting it using depth first search. In this article, I will focus on running the program in a single machine, but with multiple cores (distributed programming with Akka.Net will not be discussed). After describing the algorithm and its expected behavior in Akka.Net, I will explain the implementation.