October 2016
Intermediate to advanced
198 pages
3h 52m
English
In this chapter, we will look at some examples of writing clean test code. You will also continue your learning of ScalaTest. We will explore the following:
Some of the text and examples in this chapter has been cited with the consent from official ScalaTest documentation at www.scalatest.org. This text and example is copyright of Artima, Inc.
There are three default assertions that come out of the box with ScalaTest:
assert:We used this in Chapter 2, First Test-Driven Application. This is used for general assertions:
test("one plus one") {
assert(1 + 1 == two)
assert(1 + 1 != three)
}assertResult:This is used to differentiate between the expected ...
Read now
Unlock full access