March 2018
Intermediate to advanced
324 pages
8h 30m
English
Since all our methods that will be used to communicate with MongoDB are in the TicTacToeCollection class, we should make sure that it is instantiated. The specification could be the following:
@Test
public void whenInstantiatedThenSetCollection() {
assertNotNull(ticTacToe.getTicTacToeCollection());
}
The instantiation of TicTacToe is already done in the method annotated with @Before. With this specification, we're making sure that the collection is instantiated as well.
Read now
Unlock full access