А
Size: a a a
А
А
someMethodTest() {
when(messageSource.getMessage(...)).thenThrow(new RuntimeException());
String expected = "Worked."
assertEquals(expected, someMethod());
}
}
String someMethod() {
String res;
try {
messageSource.getMessage(...);
res = "Didn't work."
} catch(Exception e) {
res = "Worked."
}
return res;
}
А
V
someMethodTest() {
when(messageSource.getMessage(...)).thenThrow(new RuntimeException());
String expected = "Worked."
assertEquals(expected, someMethod());
}
}
String someMethod() {
String res;
try {
messageSource.getMessage(...);
res = "Didn't work."
} catch(Exception e) {
res = "Worked."
}
return res;
}
when(messageSource.getMessage(
any())).thenThrow(new RuntimeException());
А
when(messageSource.getMessage(
any())).thenThrow(new RuntimeException());
А
JB
JB
JB
V
DC
АК
E
E
D𝔇
I
TH
TH
nk