Example #1
0
        public static async Task ClassInitialize(TestContext Context)
        {
            if (File.Exists(DBFilesBTreeTests.MasterFileName))
            {
                File.Delete(DBFilesBTreeTests.MasterFileName);
            }

            if (File.Exists(DBFilesBTreeTests.FileName))
            {
                File.Delete(DBFilesBTreeTests.FileName);
            }

            if (File.Exists(DBFilesBTreeTests.BlobFileName))
            {
                File.Delete(DBFilesBTreeTests.BlobFileName);
            }

            if (File.Exists(DBFilesBTreeTests.NamesFileName))
            {
                File.Delete(DBFilesBTreeTests.NamesFileName);
            }

#if !LW
            provider = new FilesProvider("Data", "Default", BlockSize, BlocksInCache, Math.Max(BlockSize / 2, 1024), Encoding.UTF8, 10000, true);
#else
            provider = new FilesProvider("Data", "Default", BlockSize, BlocksInCache, Math.Max(BlockSize / 2, 1024), Encoding.UTF8, 10000);
#endif
            file = await provider.GetFile("Default");
        }
Example #2
0
        public static async Task ClassInitialize(TestContext Context)
        {
            DBFilesBTreeTests.DeleteFiles();

#if LW
            provider = await FilesProvider.CreateAsync("Data", "Default", BlockSize, BlocksInCache, Math.Max(BlockSize / 2, 1024), Encoding.UTF8, 10000);
#else
            provider = await FilesProvider.CreateAsync("Data", "Default", BlockSize, BlocksInCache, Math.Max(BlockSize / 2, 1024), Encoding.UTF8, 10000, true);
#endif
            file = await provider.GetFile("Default");
        }