October 2018
Intermediate to advanced
370 pages
9h 15m
English
This style assumes the use of the following DSL blocks:
Let's test the set method of the ToDoStorage class. This test may look as follows:
@RunWith(JUnitPlatform::class)object ToDoSpek : Spek({ given("A storage") { val storage = ToDoStorage() on("set a todo with with args: name and context") { val todo = ToDo("name", "content") val result = storage.set("name", todo) it("returns true") { assert(result) } } }})
Press the Run button and you will see the following window: ...
Read now
Unlock full access