Merge pull request #7211 from amit2103/BAEL-14274-15
[BAEL-14274] - Fixed article code for https://www.baeldung.com/mockit…
This commit is contained in:
commit
76099945aa
|
@ -30,7 +30,7 @@ public class MockitoInjectIntoSpyUnitTest {
|
||||||
private MyDictionary spyDic;
|
private MyDictionary spyDic;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void whenUseInjectMocksAnnotation_thenCorrect2() {
|
public void whenUseInjectMocksAnnotation_thenCorrect() {
|
||||||
Mockito.when(wordMap.get("aWord")).thenReturn("aMeaning");
|
Mockito.when(wordMap.get("aWord")).thenReturn("aMeaning");
|
||||||
|
|
||||||
assertEquals("aMeaning", spyDic.getMeaning("aWord"));
|
assertEquals("aMeaning", spyDic.getMeaning("aWord"));
|
||||||
|
|
Loading…
Reference in New Issue