Open
Description
Description
Variable objectType
with Class is used but not created.
To Reproduce
- Install UnitTestBot plugin built from main in IntelliJ IDEA
- Open
sm***t
project - Press Ctrl+Shift+N, input
rdi
- Generate tests for all methods of the class with
@SpringBootApplication
andUnit tests
selected
Expected behavior
- Variable
objectType
is initialized with object's class.
OrObject.class
should be used instead. - Assert of
finalObjectType
is (probably) expected.
Actual behavior
Variable objectType
with Class is used to pass the Class of the first object.
finalObjectType
is created, but not checked
Screenshots, logs
///region OTHER: EXPLICITLY THROWN UNCHECKED EXCEPTIONS for method query(java.lang.Object, java.lang.Class)
@Test
public void testQuery1() {
Object value = new Object();
assertThrows(IllegalArgumentException.class, () -> rdi.query(value, Object.class));
Class finalObjectType = objectType;
}
///endregion
Environment
IntelliJ IDEA version - Ultimate 2023.1.4
Project - Maven
JDK - 1.8
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo