February 2018
Intermediate to advanced
552 pages
13h 46m
English
In this section, we will test three main components of the Akka Stream's API using Akka's actor-testkit Testing module.
Execute the following steps to test Akka Stream Components:
lazy val akkaVersion = "2.5.9"
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % "test"
Write unit tests as shown here:
package com.packt.publishing.akka.streams.hello
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.{Flow, Sink, Source}
import akka.testkit.{TestKit, TestProbe}
import org.scalatest.{BeforeAndAfterAll, MustMatchers, WordSpecLike} import scala.concurrent.duration._ ...Read now
Unlock full access