Closed
Description
Description
In some case when mocking strategy applied no test code is generated.
To Reproduce
- Use UNitTestBotJava project to reproduce the problem
- In UTBot settings enable
Force mocking static methods
andCode analysis
toDeeper
only - Open class
utbot-sample/src/main/java/org/utbot/examples/mock/MockStaticMethodExample.java
- 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
Type
Projects
Status
Done