foursquare/fongo — pull request #4 by palmerabollo (2012-11-05 21:51:34+00:00)
Title: Fix WriteResult#getN() using a wrapper

In this patch I've added a com.mongodb.WriteResult wrapper called FongoWriteResult that stores the number of documents that have been modified in a write (update, insert, remove) operation.

This way the calls to WriteResult#getN() return the right value instead of returning 0 or throwing an exception.

Some unit tests have been implemented.