@@ -2346,15 +2346,15 @@ abstract class UtValueTestCaseChecker(
2346
2346
* or just generate one top-level test class
2347
2347
* @see [ClassWithStaticAndInnerClassesTest]
2348
2348
*/
2349
- fun checkAllCombinations (method : KFunction <* >, generateWithNested : Boolean = false) {
2349
+ fun checkAllCombinations (method : KFunction <* >, generateWithNested : Boolean = false, additionalDependencies : Array < Class < * >> = arrayOf() ) {
2350
2350
val failed = mutableListOf<TestFrameworkConfiguration >()
2351
2351
val succeeded = mutableListOf<TestFrameworkConfiguration >()
2352
2352
2353
2353
allTestFrameworkConfigurations
2354
2354
.filterNot { it.isDisabled }
2355
2355
.forEach { config ->
2356
2356
runCatching {
2357
- internalCheckForCodeGeneration(method, config, generateWithNested)
2357
+ internalCheckForCodeGeneration(method, config, generateWithNested, additionalDependencies )
2358
2358
}.onFailure {
2359
2359
failed + = config
2360
2360
}.onSuccess {
@@ -2377,13 +2377,14 @@ abstract class UtValueTestCaseChecker(
2377
2377
private fun internalCheckForCodeGeneration (
2378
2378
method : KFunction <* >,
2379
2379
testFrameworkConfiguration : TestFrameworkConfiguration ,
2380
- generateWithNested : Boolean
2380
+ generateWithNested : Boolean ,
2381
+ additionalDependencies : Array <Class <* >>
2381
2382
) {
2382
2383
withSettingsFromTestFrameworkConfiguration(testFrameworkConfiguration) {
2383
2384
with (testFrameworkConfiguration) {
2384
2385
2385
2386
val executableId = method.executableId
2386
- computeAdditionalDependenciesClasspathAndBuildDir(method.declaringClazz, emptyArray() )
2387
+ val additionalDependenciesClassPath = computeAdditionalDependenciesClasspathAndBuildDir(method.declaringClazz, additionalDependencies )
2387
2388
val utContext = UtContext (method.declaringClazz.classLoader)
2388
2389
2389
2390
clearTempDirectory(daysLimitForTempFiles)
@@ -2393,7 +2394,7 @@ abstract class UtValueTestCaseChecker(
2393
2394
MethodWithMockStrategy (executableId, mockStrategy, resetNonFinalFieldsAfterClinit)
2394
2395
2395
2396
val (testSet, coverage) = analyzedMethods.getOrPut(methodWithStrategy) {
2396
- walk(executableId, mockStrategy)
2397
+ walk(executableId, mockStrategy, additionalDependenciesClassPath )
2397
2398
}
2398
2399
2399
2400
// if force mocking took place in parametrized test generation,
0 commit comments