You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
The version is jmockit 1.9. When I upgrade the version to 1.36, the problem disappears,. But, I find out some usages of lower version are removed in higher version,so maybe the project will be in trouble. And the problem code as the following,
public class HelloWorldMock {
public int insertOneData(int f1) {
Compute compute = new Compute();
MockClassOne one = new MockClassOne();
one.setF1(f1);
return compute.testRef(one);
}
}
`
The text was updated successfully, but these errors were encountered:
Hello,
The version is jmockit 1.9. When I upgrade the version to 1.36, the problem disappears,. But, I find out some usages of lower version are removed in higher version,so maybe the project will be in trouble. And the problem code as the following,
`public class XXXTest {
@mocked
Compute compute;
@test
public void test_X() {
new Expectations(){
{
compute.testRef((MockClazzOne) any);
result=1;
}
};
new HelloWorldMock().insertOneData(1);
new Verifications() {
{
compute.testRef(with(new Delegate(){
@OverRide
public boolean equals(Object o) {
MockClazzOne clazzOne = (MockClazzOne)o;
return clazzOne.getF1() == 1;
}
}));
times=1;
}
}
}
}
public class HelloWorldMock {
public int insertOneData(int f1) {
Compute compute = new Compute();
MockClassOne one = new MockClassOne();
one.setF1(f1);
return compute.testRef(one);
}
}
`
The text was updated successfully, but these errors were encountered: