Closed
Description
Description
Generated parametrized test has empty true branch body.
To Reproduce
- Enable parametrized test generation mode,
- Run
testMockInterfaceWithoutImplementors
test.
Actual behavior
True branch is empty, but there must be an assertion.
public class CommonMocksExampleGeneratedTest {
///region Test suites for executable org.utbot.examples.mock.CommonMocksExample.mockInterfaceWithoutImplementors
///region Parameterized test for method mockInterfaceWithoutImplementors(org.utbot.examples.mock.InterfaceWithoutImplementors)
@ParameterizedTest
@MethodSource("provideDataForMockInterfaceWithoutImplementors")
public void parameterizedTestsForMockInterfaceWithoutImplementors(CommonMocksExample commonMocksExample,
InterfaceWithoutImplementors interfaceWithoutImplementors,
Object expectedResult,
Class expectedError
) {
try {
Object actual = commonMocksExample.mockInterfaceWithoutImplementors(interfaceWithoutImplementors);
if (expectedResult == null) {
} else {
assertNull(actual);
}
} catch (java.lang.Throwable throwable) {
assertTrue(expectedError.isInstance(throwable));
}
}
///endregion
///endregion
///region Data providers and utils methods
public static java.util.ArrayList provideDataForMockInterfaceWithoutImplementors() {
<...>
}
///endregion
}
Metadata
Metadata
Assignees
Type
Projects
Status
Done