Ejemplo n.º 1
0
        public DataVelocityDb2Tests()
        {
            DataJson dataJson = new DataJson(ResourceHelper.GetResourceStream(@"cities.json"));

            _dataVelocityDb = new DataVelocityDb(@"dbvel" + Guid.NewGuid());
            //   _dataVelocityDb.Dispose();
            //     if (Directory.Exists(_dataVelocityDb.SystemDir))
            //       Directory.Delete(_dataVelocityDb.SystemDir, true); // remove our current systemDir and all its databases.
            _dataVelocityDb.AddCity(dataJson.All());
        }
        public CityRepositoryVelocityDbTest()
        {
            //   string file = @"c:\temp\velecityDb";
            //  if (Directory.Exists(file))
            //    Directory.Delete(file, true); // remove our current systemDir and all its databases.

            DataJson dataJson       = new DataJson(ResourceHelper.GetResourceStream(@"cities.json"));
            var      dataVelocityDb = new DataVelocityDb(@"dbvel" + Guid.NewGuid());

            //    dataVelocityDb.Dispose();
            dataVelocityDb.AddCity(dataJson.All());

            _repository = new CityRepository(dataVelocityDb);
        }