Closed
Description
To Reproduce
Launch the action on the following class, select only method f
and click Generate:
class ExampleClass {
int f() {
return 1;
}
static class Inner {
int f() {
return 1;
}
}
}
Expected behavior
Only tests for ExampleClass.f
are generated.
Actual behavior
Tests are generated for both ExampleClass.f
and ExampleClass.Inner.f
Visual proofs (screenshots, logs, images)
public final class ExampleClassTest {
///region Test suites for executable rndpkg.ExampleClass.f
///region
@Test
public void testF2() {
ExampleClass exampleClass = new ExampleClass();
int actual = exampleClass.f();
assertEquals(1, actual);
}
///endregion
///endregion
///region Tests for Inner
@Nested
public final class InnerTest {
///region Test suites for executable rndpkg.ExampleClass$Inner.f
///region
@Test
public void testF1() {
Inner inner = new Inner();
int actual = inner.f();
assertEquals(1, actual);
}
///endregion
///endregion
}
///endregion
}
Additional context
Seems like the problem is in org.utbot.intellij.plugin.process.EngineProcess#findMethodsInClassMatchingSelected
, more specific, in that Signature
s doesn't contain info about declaring class.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done