Ejemplo n.º 1
0
        public void TearDown()
        {
            try
            {
                var settings = TestFactory.CreateConnectionSettings();
                Console.WriteLine("Delete the database on FixtureTearDown: " + settings.DatabaseId);
                var client = RepositoryHelper.CreateClient(settings);

                //delete the database to save on storage:
                Database database = client.CreateDatabaseQuery()
                                    .Where(db => db.Id == settings.DatabaseId)
                                    .AsEnumerable()
                                    .FirstOrDefault();

                if (database != null)
                {
                    client.DeleteDatabaseAsync(database.SelfLink).Wait();
                }
            }
            catch (Exception exc)
            {
                Console.WriteLine("Could not delete the database on FictureTearDown: " + exc.Message);
            }
        }
 protected BaseTokenRepositoryTest()
 {
     _repo = CreateRepo(TestFactory.SharedCollection, TestFactory.CreateConnectionSettings());
     Reset();
 }
Ejemplo n.º 3
0
 public ScopeRepositoryTests()
 {
     _repo = new ScopeRepository(TestFactory.SharedCollection, TestFactory.CreateConnectionSettings());
     RepoUtil.Reset(_repo);
 }