Beispiel #1
0
        public void ToDocument_RentalWithId_IdIsRepresntedAsObjectId()
        {
            var rental = new Rs.Rental()
            {
                Id = ObjectId.GenerateNewId().ToString()
            };

            var document = rental.ToBsonDocument();

            Assert.IsTrue(document["_id"].BsonType == BsonType.ObjectId);
        }
Beispiel #2
0
        public void ToDocument_RentalWithPrice_PriceRepresntedAsDouble()
        {
            var rental = new Rs.Rental()
            {
                Price = 1
            };

            var document = rental.ToBsonDocument();

            Assert.IsTrue(document["Price"].BsonType == BsonType.Double);
        }