Specification – DB name

We should specify what the name of the DB that we'll use will be:

@Test 
public void whenInstantiatedThenMongoHasDbNameTicTacToe() { 
  TicTacToeCollection collection = new TicTacToeCollection(); 
  assertEquals(
"tic-tac-toe",
collection.getMongoCollection().getDBCollection().getDB().getName()); }

We are instantiating a new TicTacToeCollection class and verifying that the DB name is what we expect.

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

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