March 2018
Intermediate to advanced
324 pages
8h 30m
English
The implementation is very straightforward, as follows:
private MongoCollection mongoCollection;
protected MongoCollection getMongoCollection() {
return mongoCollection;
}public TicTacToeCollection() throws UnknownHostException {
DB db = new MongoClient().getDB("tic-tac-toe");
mongoCollection = new Jongo(db).getCollection("bla");
}
When instantiating the TicTacToeCollection class, we're creating a new MongoCollection with the specified DB name (tic-tac-toe) and assigning it to the local variable.
Bear with us. There's only one more specification left until we get to the interesting part where we'll use mocks and spies.
Read now
Unlock full access