如您所见, new Game 类需要 thenReturn 才能执行 @InjectMocks 。 @RunWith(MockitoJUnitRunner.class) class GameTest { @Mock Player player; @ ...
確定! 回上一頁