File tree Expand file tree Collapse file tree
utbot-framework/src/main/kotlin/org/utbot/framework/codegen
utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/model/constructor/tree Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import org.utbot.framework.codegen.domain.models.TestClassModel
1212import org.utbot.framework.codegen.domain.context.CgContext
1313import org.utbot.framework.codegen.renderer.CgAbstractRenderer
1414import org.utbot.framework.codegen.reports.TestsGenerationReport
15- import org.utbot.framework.codegen.tree.CgTestClassConstructor
15+ import org.utbot.framework.codegen.tree.CgSimpleTestClassConstructor
1616import org.utbot.framework.codegen.tree.ututils.UtilClassKind
1717import org.utbot.framework.codegen.services.language.CgLanguageAssistant
1818import org.utbot.framework.plugin.api.ClassId
@@ -73,7 +73,7 @@ open class CodeGenerator(
7373 val cgTestSets = testSets.map { CgMethodTestSet (it) }.toList()
7474 return withCustomContext(testClassCustomName) {
7575 context.withTestClassFileScope {
76- val astConstructor = CgTestClassConstructor (context)
76+ val astConstructor = CgSimpleTestClassConstructor (context)
7777 val renderer = CgAbstractRenderer .makeRenderer(context)
7878 val testClassModel = TestClassModel .fromTestSets(classUnderTest, cgTestSets)
7979
Original file line number Diff line number Diff line change @@ -34,7 +34,10 @@ import org.utbot.framework.plugin.api.util.description
3434import org.utbot.framework.plugin.api.util.humanReadableName
3535import org.utbot.fuzzer.UtFuzzedExecution
3636
37- open class CgTestClassConstructor (context : CgContext ): CgTestClassConstructorBase(context) {
37+ /* *
38+ * This test class constructor is used for pure Java/Kotlin applications.
39+ */
40+ open class CgSimpleTestClassConstructor (context : CgContext ): CgTestClassConstructorBase(context) {
3841
3942 init {
4043 clearContextRelatedStorage()
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ abstract class CgTestClassConstructorBase(val context: CgContext):
1818 protected open val testFrameworkManager: TestFrameworkManager = CgComponents .getTestFrameworkManagerBy(context)
1919
2020 /* *
21- * Given a testClass model constructs CgTestClass
21+ * Constructs a file with the test class corresponding to [TestClassModel].
2222 */
2323 open fun construct (testClassModel : TestClassModel ): CgClassFile {
2424 return buildClassFile {
@@ -27,6 +27,9 @@ abstract class CgTestClassConstructorBase(val context: CgContext):
2727 }
2828 }
2929
30+ /* *
31+ * Constructs [CgClass] corresponding to [TestClassModel].
32+ */
3033 open fun constructTestClass (testClassModel : TestClassModel ): CgClass {
3134 return buildClass {
3235 id = currentTestClass
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ package org.utbot.python.framework.codegen.model.constructor.tree
33import org.utbot.framework.codegen.domain.models.TestClassModel
44import org.utbot.framework.codegen.domain.context.CgContext
55import org.utbot.framework.codegen.domain.models.CgClassFile
6- import org.utbot.framework.codegen.tree.CgTestClassConstructor
6+ import org.utbot.framework.codegen.tree.CgSimpleTestClassConstructor
77import org.utbot.framework.codegen.tree.buildClassFile
88
9- internal class PythonCgTestClassConstructor (context : CgContext ) : CgTestClassConstructor (context) {
9+ internal class PythonCgTestClassConstructor (context : CgContext ) : CgSimpleTestClassConstructor (context) {
1010 override fun construct (testClassModel : TestClassModel ): CgClassFile {
1111 return buildClassFile {
1212 this .declaredClass = withTestClassScope {
You can’t perform that action at this time.
0 commit comments