public void CheckSaveInterceptor2()
        {
            var repository = new MongoDbRepository(CreateEmptyMongoDatabase());
            //BsonDocument nested = new BsonDocument {
            //{ "name", "JJK" },
            //{ "address", new BsonDocument {
            //    { "street", "123 Main St." },
            //    { "city", "Centerville" },
            //    { "state", "PA" },
            //    { "zip", 12345}
            //}}};

            var crappy = new SimpleAccount("JK2");

            crappy.SimpleAccount2 = new SimpleAccount("XXX");
            repository.Add(crappy);

            // Create Single Update!!!!!!!!!!!!


            var result3 = repository.ModifyAll <SimpleAccount>(
                new ExpressionSpecificationQueryStrategy <SimpleAccount>(p => p.Name == "JK2"),
                new MongoUpdateItem <SimpleAccount>(p => p.DOB, DateTime.Today.AddDays(77777)),
                new MongoUpdateItem <SimpleAccount>(p => p.SimpleAccount2.Name, "XCC"),
                new MongoUpdateItem <SimpleAccount>(p => p.SimpleAccount2.Weigth, 1236));

            //            Update.Set("DOB", DateTime.Today.AddDays(99999));
        }
        //        [Test]
        public void CheckAddAndDeleteFoMongoCommandRepository()
        {
            var mongoDatabase = CreateEmptyMongoDatabase();
            var repository = new MongoDbRepository(mongoDatabase);

            var account = new SimpleAccount("xyz");
            repository.GetEntities<SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
            repository.Add(account);
            repository.GetEntities<SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(true);

            repository.Delete(account);
            repository.GetEntities<SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
        }
        //        [Test]
        public void CheckAddAndDeleteFoMongoCommandRepository()
        {
            var mongoDatabase = CreateEmptyMongoDatabase();
            var repository    = new MongoDbRepository(mongoDatabase);

            var account = new SimpleAccount("xyz");

            repository.GetEntities <SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
            repository.Add(account);
            repository.GetEntities <SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(true);

            repository.Delete(account);
            repository.GetEntities <SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
        }
        //        [Test]
        public void CheckAddAndDeleteFoMongoUnitOfWorkCommandRepository()
        {
            var eventRecorder = new RecordedRepositoryEvents();

            var mongoDatabase = CreateEmptyMongoDatabase();
            var repository = new MongoDbUnitOfWorkRepository(mongoDatabase, eventRecorder);

            var account = new SimpleAccount("xyz");
            repository.GetEntities<SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
            repository.Add(account);
            repository.GetEntities<SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
            repository.Save();
            repository.GetEntities<SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(true);
            repository.Delete(account);
            repository.GetEntities<SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(true);
            repository.Save();
            repository.GetEntities<SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
        }
        //        [Test]
        public void CheckAddAndDeleteFoMongoUnitOfWorkCommandRepository()
        {
            var eventRecorder = new RecordedRepositoryEvents();

            var mongoDatabase = CreateEmptyMongoDatabase();
            var repository    = new MongoDbUnitOfWorkRepository(mongoDatabase, eventRecorder);

            var account = new SimpleAccount("xyz");

            repository.GetEntities <SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
            repository.Add(account);
            repository.GetEntities <SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
            repository.Save();
            repository.GetEntities <SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(true);
            repository.Delete(account);
            repository.GetEntities <SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(true);
            repository.Save();
            repository.GetEntities <SimpleAccount>(p => p.Name == account.Name).Any().ShouldEqual(false);
        }
        public void CheckSaveInterceptor2()
        {
            var repository = new MongoDbRepository(CreateEmptyMongoDatabase());
            //BsonDocument nested = new BsonDocument {
            //{ "name", "JJK" },
            //{ "address", new BsonDocument {
            //    { "street", "123 Main St." },
            //    { "city", "Centerville" },
            //    { "state", "PA" },
            //    { "zip", 12345}
            //}}};

            var crappy = new SimpleAccount("JK2");
            crappy.SimpleAccount2 = new SimpleAccount("XXX");
            repository.Add(crappy);

            // Create Single Update!!!!!!!!!!!!


            var result3 = repository.ModifyAll<SimpleAccount>(
                new ExpressionSpecificationQueryStrategy<SimpleAccount>(p => p.Name == "JK2"),
                    new MongoUpdateItem<SimpleAccount>(p => p.DOB, DateTime.Today.AddDays(77777)),
                    new MongoUpdateItem<SimpleAccount>(p => p.SimpleAccount2.Name, "XCC"),
                    new MongoUpdateItem<SimpleAccount>(p => p.SimpleAccount2.Weigth, 1236));

            //            Update.Set("DOB", DateTime.Today.AddDays(99999));
        }