@@ -9,40 +9,40 @@ import io.kotest.matchers.shouldBe
99
1010class Kotest : FunSpec () {
1111
12- init {
12+ init {
1313
14- test(" StringSpecs" ) {
15- val resultCollector = findTestsIn(StringSpecs ::class .java)
16- resultCollector.skipped.shouldBeEmpty()
17- resultCollector.started.shouldHaveSize(2 )
18- resultCollector.ended.shouldHaveSize(2 )
19- resultCollector.failures.shouldHaveSize(1 )
20- }
14+ test(" StringSpecs" ) {
15+ val resultCollector = findTestsIn(StringSpecs ::class .java)
16+ resultCollector.skipped.shouldBeEmpty()
17+ resultCollector.started.shouldHaveSize(2 )
18+ resultCollector.ended.shouldHaveSize(2 )
19+ resultCollector.failures.shouldHaveSize(1 )
20+ }
2121
22- test(" FunSpecs" ) {
23- val resultCollector = findTestsIn(FunSpecs ::class .java)
24- resultCollector.skipped.shouldBeEmpty()
25- resultCollector.started.shouldHaveSize(2 )
26- resultCollector.ended.shouldHaveSize(2 )
27- resultCollector.failures.shouldHaveSize(1 )
28- }
22+ test(" FunSpecs" ) {
23+ val resultCollector = findTestsIn(FunSpecs ::class .java)
24+ resultCollector.skipped.shouldBeEmpty()
25+ resultCollector.started.shouldHaveSize(2 )
26+ resultCollector.ended.shouldHaveSize(2 )
27+ resultCollector.failures.shouldHaveSize(1 )
28+ }
2929
30- test(" WordSpecs" ) {
31- val resultCollector = findTestsIn(WordSpecs ::class .java)
32- resultCollector.skipped.shouldBeEmpty()
33- resultCollector.started.shouldHaveSize(7 )
34- resultCollector.ended.shouldHaveSize(7 )
35- resultCollector.failures.shouldHaveSize(2 )
36- }
37- }
30+ test(" WordSpecs" ) {
31+ val resultCollector = findTestsIn(WordSpecs ::class .java)
32+ resultCollector.skipped.shouldBeEmpty()
33+ resultCollector.started.shouldHaveSize(7 )
34+ resultCollector.ended.shouldHaveSize(7 )
35+ resultCollector.failures.shouldHaveSize(2 )
36+ }
37+ }
3838
39- private fun findTestsIn (clazz : Class <* >): TestResultCollector {
40- val resultCollector = TestResultCollector ()
41- KotestUnitFinder ().findTestUnits(clazz)
42- .stream()
43- .forEach { testUnit -> testUnit.execute(resultCollector) }
44- return resultCollector
45- }
39+ private fun findTestsIn (clazz : Class <* >): TestResultCollector {
40+ val resultCollector = TestResultCollector ()
41+ KotestUnitFinder ().findTestUnits(clazz, null )
42+ .stream()
43+ .forEach { testUnit -> testUnit.execute(resultCollector) }
44+ return resultCollector
45+ }
4646}
4747
4848private class FunSpecs : FunSpec () {
0 commit comments