ReactiveMongo/ReactiveMongo — pull request #238 by reid-spencer (2014-12-23 17:06:20+00:00)
Title: Fix Equality And Other Issues

This patch adds a test suite for testing equality of BSON classes including after serialization/deserialization. The idea is that the objects should be reflective after storage in the db and later materialized back again. Before this patch, this wasn't true.

* Implement BSONDBPointerBufferHandler.write
* Make ArrayReadableBuffer a case class to get properly constructed .canEqual and .equals methods to avoid false negatives
* Fix misleading comments in BSONArray
* Fix misleading toString method in BSONArray (reported it was a BSONDocument)
* Make BSONObjectID extend Equals and implement canEqual and equals for it, properly (gave false negatives previously)
* Make BSONDBPointer override equals and canEqual to avoid false negatives
* Add an Equality test suite to validate that the above all works.