[From] https://www.programcreek.com/scala/org.scalatest.FunSuite
org.scalatest.FunSuite Scala Examples
The following code examples show how to use org.scalatest.FunSuite. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to product more good examples.
Example 1
Project: train-stamp-rally Author: ponkotuy File: MissionTimeSuite.scala View Source Project (license) | 7 votes |
package utils
import org.scalatest.FunSuite
class MissionTimeSuite extends FunSuite {
test("MissionTime.addMinutes") {
assert(MissionTime(1, 6, 1).addMinutes(15) === MissionTime(1, 6, 16))
assert(MissionTime(1, 6, 23).addMinutes(-10) === MissionTime(1, 6, 13))
}
test("MissionTime.addMinutes if carry") {
assert(MissionTime(1, 6, 59).addMinutes(3) === MissionTime(1, 7, 2))
assert(MissionTime(1, 7, 3).addMinutes(-5) === MissionTime(1, 6, 58))
}
test("MissionTime.addMinutes if over hour") {
assert(MissionTime(1, 23, 44).addMinutes(25) === MissionTime(2, 0, 9))
assert(MissionTime(2, 0, 15).addMinutes(-18) === MissionTime(1, 23, 57))
}
test("MissionTime.fromString") {
assert(MissionTime.fromString("1-06:15") === Some(MissionTime