Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed tests and add a TODO ticket
  • Loading branch information
amandelpie committed Oct 10, 2022
commit 51ca8de9c73b2349f5b83ba2127d9a124ead88f3
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ import org.utbot.framework.plugin.api.UtExecutionResult
import org.utbot.fuzzer.FuzzedMethodDescription
import org.utbot.fuzzer.FuzzedValue

// TODO: https://github.com/UnitTestBot/UTBotJava/issues/1127
class SimpleCommentForTestProducedByFuzzerBuilder(
description: FuzzedMethodDescription,
values: List<FuzzedValue>,
result: UtExecutionResult?
) {
fun buildDocStatements(): List<DocStatement> {
//val sentenceBlock = buildSentenceBlock(currentMethod)
//val docStmts = toDocStmts(sentenceBlock)

/* if (docStmts.isEmpty()) {
return emptyList()
}*/

return listOf<DocStatement>(DocPreTagStatement(emptyList()))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.mockito.Mockito.`when`
import org.utbot.framework.plugin.api.Step
import org.utbot.framework.plugin.api.UtOverflowFailure
import org.utbot.summary.ast.JimpleToASTMap
import org.utbot.summary.comment.customtags.getMethodReference
import org.utbot.summary.tag.StatementTag
import org.utbot.summary.tag.TraceTag
import soot.SootMethod
Expand Down Expand Up @@ -66,17 +67,15 @@ class SimpleCommentBuilderTest {

@Test
fun `builds inline link for method`() {
val commentBuilder = SimpleCommentBuilder(traceTag, sootToAst)
val methodReference = commentBuilder.getMethodReference("org.utbot.ClassName", "methodName", listOf(), false)
val methodReference = getMethodReference("org.utbot.ClassName", "methodName", listOf(), false)
val expectedMethodReference = "{@link org.utbot.ClassName#methodName()}"
assertEquals(methodReference, expectedMethodReference)
}

@Test
fun `builds inline link for method in nested class`() {
val commentBuilder = SimpleCommentBuilder(traceTag, sootToAst)
val methodReference =
commentBuilder.getMethodReference("org.utbot.ClassName\$NestedClassName", "methodName", listOf(), false)
getMethodReference("org.utbot.ClassName\$NestedClassName", "methodName", listOf(), false)
val expectedMethodReference = "{@link org.utbot.ClassName.NestedClassName#methodName()}"
assertEquals(methodReference, expectedMethodReference)
}
Expand Down