Closed
Description
Description
Currently, codegen produces incorrect testclasses when there are nested classes in src code.
To Reproduce
Consider example:
public class OtherClass {
public class InnerClass {
private int y;
InnerClass(int y) {
this.y = y;
}
public class DeepInner {
public int f() {
if (y == 1) return 1;
return 2;
}
public int f2() {
return 0;
}
}
public int g() {
return 3;
}
}
public int h() {
return 4;
}
}
- Run tests for all methods from class
OtherClass
(currently you can do it in this branch) - Run tests for class
DeepInner
only.
Expected behavior
Correct tests are generated.
Actual behavior
- class
InnerClassTest
is duplicated - main class is called
OtherClass_InnerClass_DeepInnerTest
, which does not correlate to file nameDeepInnerTest.java
, which causes compilation error.
Metadata
Metadata
Assignees
Type
Projects
Status
Done