Esempio n. 1
0
        public void ToDocument_RentalWithPrice_PriceRepresentedAsDouble()
        {
            var rental = new Rental.Rental();
            rental.Price = 1;

            var bsonDocument = rental.ToBsonDocument();
            Assert.AreEqual( BsonType.Double,bsonDocument["Price"].BsonType);
        }
Esempio n. 2
0
        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);
        }