O'Reilly logo

Scala Reactive Programming by Rambabu Posa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test HelloWorld without using DI Controller

In this section, we are going to refer play-scala-helloworld-app Play Scala-based HelloWorld application available in the Chapter-6 folder from the GitHub repository (https://github.com/rposa-srp-book/srp-book-examples/tree/master/Chapter-6/play-scala-helloworld-app) and write unit tests for its controller.

Perform the following steps to write unit tests for this application:

  1. Add the following entry in the build.sbt file available in the root folder of this project:
      libraryDependencies ++= Seq( 
        "org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test 
      ) 

Here, we have configured the ScalaTest Plus unit testing framework in the Test scope. It provides all the required components to test ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required