October 2018
Intermediate to advanced
370 pages
9h 15m
English
In this section, we will practice writing tests with the Spek framework. We touched on the benefits of this framework and automated testing in the previous sections, and we are ready to test the functionality of the ToDoStorage class from Chapter 10, Exception Handling. Let's modify the build.gradle file to integrate the Spek framework and Unit engine, as follows:
buildscript { //....... dependencies {+ classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0' } } //.........+ apply plugin: 'org.junit.platform.gradle.plugin'+ junitPlatform {+ filters {+ engines {+ include 'spek'+ }+ }+ } repositories { //.........+ maven { url "http://dl.bintray.com/jetbrains/spek" } } dependencies { //.........+ testCompile 'org.jetbrains.spek:spek-api:1.1.5' ...
Read now
Unlock full access