Skip to content

Error test has strange name and doesn't contain Throw in it. JUnit4. #2376

Closed
@tyuldashev

Description

@tyuldashev

Description
One of generated test for JUnit4 has unusual name testIsCyclic_CEquals1 even though it's properly placed in error suite and has comment about thrown exception it has no Throw in the name as it was expected.

To Reproduce

  1. Install UnitTestBot plugin built from main in IntelliJ IDEA
  2. Open UTbot Java project
  3. Generate tests for org.utbot.examples.algorithms.Graph#isCyclic() with options:
    • JUnit4
    • Mock everything outside the class
    • Disable Mock static methods.

Expected behavior
Error tests have Throw in their names

Actual behavior
One of the test in error suite has name: testIsCyclic_CEquals1

Screenshots, logs

image

Additional info
There is also positive test with similar strange name testIsCyclic_CNotEquals1

Environment

IntelliJ IDEA version - 2023.1.3
UTBot Plugin - 2023.7.4756 (main branch)

Metadata

Metadata

Assignees

Labels

comp-summariesSomething related to the method names, code comments and display names generationctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions