Unit testing

As you have already seen earlier, testing applications that rely on the cake design pattern is simple. We have defined the following test environment:

package com.ivan.nikolov.schedulerimport com.ivan.nikolov.scheduler.actors.{ActorFactory, ActorFactoryComponent}import com.ivan.nikolov.scheduler.config.app.AppConfigComponentimport com.ivan.nikolov.scheduler.dao._import com.ivan.nikolov.scheduler.io.IOServiceComponentimport com.ivan.nikolov.scheduler.services.JobConfigReaderServiceComponentimport org.mockito.Mockito._import org.scalatest.mockito.MockitoSugartrait TestEnvironment   extends AppConfigComponent  with IOServiceComponent  with JobConfigReaderServiceComponent  with DatabaseServiceComponent  with MigrationComponent  with 

Get Scala Design Patterns - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.