-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3be20f3
commit a9bbba9
Showing
2 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
utbot-summary-tests/src/test/kotlin/examples/unsafe/UnsafeWithFieldTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package examples.unsafe | ||
|
||
import examples.CustomJavaDocTagsEnabler | ||
import examples.SummaryTestCaseGeneratorTest | ||
import org.junit.jupiter.api.Test | ||
import org.junit.jupiter.api.extension.ExtendWith | ||
import org.utbot.examples.unsafe.UnsafeWithField | ||
import org.utbot.framework.plugin.api.MockStrategyApi | ||
import org.utbot.tests.infrastructure.DoNotCalculate | ||
|
||
@ExtendWith(CustomJavaDocTagsEnabler::class) | ||
class UnsafeWithFieldTest : SummaryTestCaseGeneratorTest( | ||
UnsafeWithField::class | ||
) { | ||
@Test | ||
fun testUnsafeWithField() { | ||
val summary1 = "@utbot.classUnderTest {@link UnsafeWithField}\n" + | ||
"@utbot.methodUnderTest {@link org.utbot.examples.unsafe.UnsafeWithField#setField(java.text.NumberFormat.Field)}\n" + | ||
"@utbot.returnsFrom {@code return Field.INTEGER;}" | ||
|
||
val methodName1 = "testSetField_ReturnFieldINTEGER" | ||
|
||
val displayName1 = "-> return Field.INTEGER" | ||
|
||
val summaryKeys = listOf( | ||
summary1 | ||
) | ||
|
||
val displayNames = listOf( | ||
displayName1 | ||
) | ||
|
||
val methodNames = listOf( | ||
methodName1 | ||
) | ||
|
||
val method = UnsafeWithField::setField | ||
val mockStrategy = MockStrategyApi.NO_MOCKS | ||
val coverage = DoNotCalculate | ||
|
||
summaryCheck(method, mockStrategy, coverage, summaryKeys, methodNames, displayNames) | ||
} | ||
} |