SHOW:
|
|
- or go back to the newest paste.
1 | class TestSpec extends FlatSpec { // vlastni test | |
2 | val t = new Test // moje testovana trida | |
3 | ||
4 | t.factorial(0) should equal (1) | |
5 | t.factorial(1) should equal (1) | |
6 | t.factorial(5) should equal (120) | |
7 | ||
8 | t.getPrimesLessThan(10) should contain only (2, 3, 5, 7) | |
9 | t.getPrimesLessThan(20) should contain only (2, 3, 5, 7, 11, 13, 17, 19) | |
10 | ||
11 | an [InvalidArgumentException] should be thrownBy t.divide(128, 0) | |
12 | } |