Created
July 16, 2015 13:03
-
-
Save matterche/108870ad1f9c0de613df to your computer and use it in GitHub Desktop.
Template for ScalaTest table based property tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.scalatest.prop.PropertyChecks._ | |
import org.scalatest.prop.Tables.Table | |
import org.scalatest.WordSpec | |
class MyTableBasedPropertySpec extends WordSpec { | |
val testData = Table( | |
("p1", "p2", "p3"), | |
("1", 2, 3.0), | |
("4",5,6.0) | |
) | |
"A thing" when { | |
"something happens" should { | |
forAll(testData) { (p1, p2, p3) => | |
s"work as expected with $p1, $p2, $p3 " in { | |
pending | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment