Specification – creating new collection

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.198.81