BAEL-6587 Code for the Mockito Exception article

This commit is contained in:
thibault.faure
2023-06-05 12:57:33 +02:00
parent c341505b45
commit 1e4c42c6d1
4 changed files with 64 additions and 3 deletions
@@ -0,0 +1,9 @@
package com.baeldung.wantedbutnotinvocked;
class Helper {
String getBaeldungString() {
return "Baeldung";
}
}
@@ -0,0 +1,14 @@
package com.baeldung.wantedbutnotinvocked;
class Main {
Helper helper = new Helper();
String methodUnderTest(int i) {
if (i > 5) {
return helper.getBaeldungString();
}
return "Hello";
}
}