Skip to content

Couldn't generate some tests: 2 occurrences of org.mockito.MockedStatic #981

Closed
@tyuldashev

Description

@tyuldashev

Description
In some case when mocking strategy applied no test code is generated.

To Reproduce

  1. Use UNitTestBotJava project to reproduce the problem
  2. In UTBot settings enable Force mocking static methods and Code analysis to Deeper only
  3. Open class utbot-sample/src/main/java/org/utbot/examples/mock/MockStaticMethodExample.java
  4. Generate tests for the class with following settings: Mock strategy = Mock class environment, Mock static methods enabled

Expected behavior

Some tests are generated

Actual behavior

One empty test is generated:

    public void testUseStaticMethod_errors() {
        // Couldn't generate some tests. List of errors:
        // 
        // 2 occurrences of:
        // org.mockito.MockedStatic

    }

Metadata

Metadata

Assignees

Labels

ctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions