Skip to content

Commit 5dff7df

Browse files
authored
Use BuiltinMethodId for openMocksMethodId #2602 (#2603)
1 parent 2a74b8c commit 5dff7df

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/builtin/UtilMethodBuiltins.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import org.utbot.framework.codegen.tree.ututils.UtilClassKind.Companion.PACKAGE_
1010
import org.utbot.framework.codegen.tree.ututils.UtilClassKind.Companion.UT_UTILS_BASE_PACKAGE_NAME
1111
import org.utbot.framework.plugin.api.BuiltinClassId
1212
import org.utbot.framework.plugin.api.BuiltinConstructorId
13+
import org.utbot.framework.plugin.api.BuiltinMethodId
1314
import org.utbot.framework.plugin.api.ClassId
1415
import org.utbot.framework.plugin.api.CodegenLanguage
1516
import org.utbot.framework.plugin.api.MethodId
@@ -301,16 +302,17 @@ internal val utKotlinUtilsClassId: ClassId
301302
isKotlinObject = true
302303
)
303304

304-
/**
305-
* [MethodId] for [AutoCloseable.close].
306-
*/
307-
val openMocksMethodId = MethodId(
305+
val openMocksMethodId = BuiltinMethodId(
308306
classId = MockitoAnnotations::class.id,
309307
name = "openMocks",
310308
returnType = AutoCloseable::class.java.id,
311309
parameters = listOf(objectClassId),
310+
isStatic = true,
312311
)
313312

313+
/**
314+
* [MethodId] for [AutoCloseable.close].
315+
*/
314316
val closeMethodId = MethodId(
315317
classId = AutoCloseable::class.java.id,
316318
name = "close",

0 commit comments

Comments
 (0)