Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void clearMigrationDirFromAnyLabelScanStoreBeforeMigrating() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ClearMigrationDirFromAnyLabelScanStoreBeforeMigrating()
        {
            // given
            PrepareEmpty23Database();
            InitializeNativeLabelScanStoreWithContent(_migrationLayout);
            File toBeDeleted = _migrationLayout.labelScanStore();

            assertTrue(_fileSystem.fileExists(toBeDeleted));

            // when
            _indexMigrator.migrate(_databaseLayout, _migrationLayout, _progressReporter, StandardV3_2.STORE_VERSION, StandardV3_2.STORE_VERSION);

            // then
            AssertNoContentInNativeLabelScanStore(_migrationLayout);
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void SetUp()
        {
            _databaseLayout       = _testDirectory.databaseLayout();
            _storeDir             = _databaseLayout.databaseDirectory();
            _nativeLabelIndex     = _databaseLayout.labelScanStore();
            _migrationLayout      = _testDirectory.databaseLayout("migrationDir");
            _luceneLabelScanStore = _testDirectory.databaseDir().toPath().resolve(Paths.get("schema", "label", "lucene")).toFile();

            _fileSystem    = _fileSystemRule.get();
            _pageCache     = _pageCacheRule.getPageCache(_fileSystemRule);
            _indexMigrator = new NativeLabelScanStoreMigrator(_fileSystem, _pageCache, Config.defaults());
            _fileSystem.mkdirs(_luceneLabelScanStore);
        }