ScalaTest Testing Framework

Overview

Qualified supports writing test fixtures for Scala using ScalaTest.

Scala with ScalaTest Quick Start

object Sample {
  def sayHello(name: String) = {
    if (name.length() > 0)
      "Hello, " + name + "!"
    else
      "Hello there!"
  }
}
import org.scalatest._

class SampleSpec extends FlatSpec with Matchers {
  behavior of "Sample.sayhello"
  it should "return a greeting to given name" in {
    Sample.sayHello("Qualified") should equal ("Hello, Qualified!")
  }
  it should "handle empty string" in {
    Sample.sayHello("") should equal ("Hello there!")
  }
}

ScalaTest supports many other testing styles.

Learn More

You can learn more on the ScalaTest website.