#bael-3314-new:Update JMockit articles (#14355)

* #bael-3314-new:remove unused method

* #bael-3314-new:change private to protected
This commit is contained in:
Hamid Reza Sharifi
2023-07-18 19:51:58 +03:30
committed by GitHub
parent e8fa7ed602
commit a7a2c28d6c
3 changed files with 2 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ public class AdvancedCollaborator {
public AdvancedCollaborator(String string) throws Exception{
i = string.length();
}
public String methodThatCallsPrivateMethod(int i){
public String methodThatCallsProtectedMethod(int i){
return protectedMethod() + i;
}
public int methodThatReturnsThePrivateField(){

View File

@@ -20,7 +20,4 @@ public class AppManager {
return new Random().nextInt(7);
}
private static Integer stringToInteger(String num) {
return Integer.parseInt(num);
}
}

View File

@@ -31,7 +31,7 @@ public class AdvancedCollaboratorIntegrationTest {
return "mocked: ";
}
};
String res = mock.methodThatCallsPrivateMethod(1);
String res = mock.methodThatCallsProtectedMethod(1);
assertEquals("mocked: 1", res);
}