March 2018
Intermediate to advanced
324 pages
8h 30m
English
Let us change the return type of our saveMove method to boolean:
@Test
public void whenSaveMoveThenReturnTrue() {
TicTacToeBean bean = new TicTacToeBean(3, 2, 1, 'Y');
MongoCollection mongoCollection = mock(MongoCollection.class);
doReturn(mongoCollection).when(collection).getMongoCollection();
assertTrue(collection.saveMove(bean));
}
Read now
Unlock full access