public void MongoHandlerInitiallizer()
        {
            DatabaseInfo info = TestingConsts.DB_INFO;

            mongoHandler = new MongoHandler(info);
            mongoHandler.DeleteDatabase(mongoHandler.DbInfo.DatabaseName); // in case db wasn't cleard previous run
        }
        public void Should_CreateCardBasedOnWord_When_DatabaseIsValid()
        {
            MongoHandler mongoHandler = new MongoHandler(TestingConsts.DB_INFO);
            CardDocument document     = CardDocument.CreateBasedOnWordAsync(mongoHandler, "Test").Result;

            Assert.IsNotNull(document);
            mongoHandler.DeleteDatabase(mongoHandler.DbInfo.DatabaseName);
        }
        public void Should_Succeed_When_AddWordsToDbAsyncAndSync()
        {
            CardDocument card = CardDocument.CreateBasedOnWordAsync(mongoHandler, "Test").Result;

            mongoHandler.InsertCard(card);
            Assert.IsTrue(mongoHandler.GetDocumentsCount() == 1);

            card = CardDocument.CreateBasedOnWordAsync(mongoHandler, "Wall").Result;
            mongoHandler.InsertCardAsync(card).Wait();
            Assert.IsTrue(mongoHandler.GetDocumentsCount() == 2);

            mongoHandler.DeleteDatabase(mongoHandler.DbInfo.DatabaseName);
        }