scala
import org.scalatest._
class MySpec extends FlatSpec with Matchers {
"A list" should "have a size of 3" in {
val list = List(1, 2, 3)
list.size shouldEqual 3
}
it should "contain the element 2" in {
val list = List(1, 2, 3)
list should contain (2)
}
it should "not be empty" in {
val list = List(1, 2, 3)
list should not be empty
}
}
scala
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.2" % Test