Skip to content

Commit 51ca8de

Browse files
committed
Fixed tests and add a TODO ticket
1 parent 326da42 commit 51ca8de

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

utbot-summary/src/main/kotlin/org/utbot/summary/comment/classic/fuzzer/SimpleCommentForTestProducedByFuzzerBuilder.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ import org.utbot.framework.plugin.api.UtExecutionResult
66
import org.utbot.fuzzer.FuzzedMethodDescription
77
import org.utbot.fuzzer.FuzzedValue
88

9+
// TODO: https://github.com/UnitTestBot/UTBotJava/issues/1127
910
class SimpleCommentForTestProducedByFuzzerBuilder(
1011
description: FuzzedMethodDescription,
1112
values: List<FuzzedValue>,
1213
result: UtExecutionResult?
1314
) {
1415
fun buildDocStatements(): List<DocStatement> {
15-
//val sentenceBlock = buildSentenceBlock(currentMethod)
16-
//val docStmts = toDocStmts(sentenceBlock)
17-
18-
/* if (docStmts.isEmpty()) {
19-
return emptyList()
20-
}*/
21-
2216
return listOf<DocStatement>(DocPreTagStatement(emptyList()))
2317
}
2418
}

utbot-summary/src/test/kotlin/org/utbot/summary/comment/SimpleCommentBuilderTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import org.mockito.Mockito.`when`
99
import org.utbot.framework.plugin.api.Step
1010
import org.utbot.framework.plugin.api.UtOverflowFailure
1111
import org.utbot.summary.ast.JimpleToASTMap
12+
import org.utbot.summary.comment.customtags.getMethodReference
1213
import org.utbot.summary.tag.StatementTag
1314
import org.utbot.summary.tag.TraceTag
1415
import soot.SootMethod
@@ -66,17 +67,15 @@ class SimpleCommentBuilderTest {
6667

6768
@Test
6869
fun `builds inline link for method`() {
69-
val commentBuilder = SimpleCommentBuilder(traceTag, sootToAst)
70-
val methodReference = commentBuilder.getMethodReference("org.utbot.ClassName", "methodName", listOf(), false)
70+
val methodReference = getMethodReference("org.utbot.ClassName", "methodName", listOf(), false)
7171
val expectedMethodReference = "{@link org.utbot.ClassName#methodName()}"
7272
assertEquals(methodReference, expectedMethodReference)
7373
}
7474

7575
@Test
7676
fun `builds inline link for method in nested class`() {
77-
val commentBuilder = SimpleCommentBuilder(traceTag, sootToAst)
7877
val methodReference =
79-
commentBuilder.getMethodReference("org.utbot.ClassName\$NestedClassName", "methodName", listOf(), false)
78+
getMethodReference("org.utbot.ClassName\$NestedClassName", "methodName", listOf(), false)
8079
val expectedMethodReference = "{@link org.utbot.ClassName.NestedClassName#methodName()}"
8180
assertEquals(methodReference, expectedMethodReference)
8281
}

0 commit comments

Comments
 (0)