public void ToDocument_RentalWithPrice_PriceRepresentedAsDouble() { var rental = new Rental.Rental(); rental.Price = 1; var bsonDocument = rental.ToBsonDocument(); Assert.AreEqual( BsonType.Double,bsonDocument["Price"].BsonType); }
public void ToDocument_RentalId_IdRepresentedAsObjectId() { var rental = new Rental.Rental(); rental.Id = ObjectId.GenerateNewId().ToString(); var bsonDocument = rental.ToBsonDocument(); Assert.AreEqual(BsonType.ObjectId, bsonDocument["_id"].BsonType); }