@@ -3,8 +3,13 @@ package org.utbot.framework.codegen.model.constructor.tree
3
3
import org.utbot.common.PathUtil
4
4
import org.utbot.common.packageName
5
5
import org.utbot.engine.isStatic
6
- import org.utbot.framework.codegen.*
6
+ import org.utbot.framework.codegen.ForceStaticMocking
7
+ import org.utbot.framework.codegen.JUNIT5_PARAMETERIZED_PACKAGE
8
+ import org.utbot.framework.codegen.Junit4
9
+ import org.utbot.framework.codegen.Junit5
10
+ import org.utbot.framework.codegen.ParametrizedTestSource
7
11
import org.utbot.framework.codegen.RuntimeExceptionTestsBehaviour.PASS
12
+ import org.utbot.framework.codegen.TestNg
8
13
import org.utbot.framework.codegen.model.constructor.builtin.closeMethodIdOrNull
9
14
import org.utbot.framework.codegen.model.constructor.builtin.forName
10
15
import org.utbot.framework.codegen.model.constructor.builtin.getClass
@@ -1043,12 +1048,13 @@ internal class CgMethodConstructor(val context: CgContext) : CgContextOwner by c
1043
1048
ParametrizedTestSource .DO_NOT_PARAMETRIZE ->
1044
1049
currentBlock = currentBlock.addAll(generateDeepEqualsAssertion(expected, actual))
1045
1050
ParametrizedTestSource .PARAMETRIZE -> {
1046
- val trueStmts = listOf<CgStatement >(
1047
- testFrameworkManager.assertions[testFramework.assertNull](actual).toStatement()
1048
- )
1049
- val falseStmts = generateDeepEqualsAssertion(expected, actual)
1051
+ val assertNullStmt = listOf (testFrameworkManager.assertions[testFramework.assertNull](actual).toStatement())
1050
1052
currentBlock = currentBlock.add(
1051
- CgIfStatement (CgEqualTo (expected, nullLiteral()), trueStmts, falseStmts)
1053
+ CgIfStatement (
1054
+ CgEqualTo (expected, nullLiteral()),
1055
+ assertNullStmt,
1056
+ generateDeepEqualsAssertion(expected, actual)
1057
+ )
1052
1058
)
1053
1059
}
1054
1060
}
0 commit comments