Created
March 10, 2020 01:18
-
-
Save iwata-n/5e98b586290198a2f7c93839d354294a to your computer and use it in GitHub Desktop.
DynamicTestの雛形
This file contains 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
internal class HogeTest { | |
@TestFactory | |
fun test_hoge(): Collection<DynamicTest> { | |
data class TestCase( | |
val testName: String, | |
val params: Param // TODO テストで必要なパラメータ | |
) | |
fun execute(testCase: TestCase) { | |
// TODO テストの動作 | |
} | |
return listOf( | |
TestCase("テスト名", params) | |
).map { testCase -> | |
dynamicTest(testCase.toString()) { execute(testCase) } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment