April 2018
Intermediate to advanced
396 pages
11h 8m
English
Testing is an important part of every application. We need to make sure that the changes we add do not negatively affect the other parts of our system and that every unit behaves correctly. Testing with the cake design pattern is also really simple to achieve.
The cake design pattern allows us to easily create different environments. This is why we can create the following test environment:
trait TestEnvironment extends UserComponent with DaoComponent with DatabaseComponent with MigrationComponent with MockitoSugar { override val dao: Dao = mock[Dao] override val databaseService: DatabaseService = mock[DatabaseService] override val migrationService: MigrationService = mock[MigrationService] override val userService ...
Read now
Unlock full access