//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void dropShouldDeleteEntireIndexFolder() public virtual void DropShouldDeleteEntireIndexFolder() { // given File root = Storage.directory().directory("root"); IndexDirectoryStructure directoryStructure = IndexDirectoryStructure.directoriesByProvider(root).forProvider(GenericNativeIndexProvider.Descriptor); long indexId = 8; File indexDirectory = directoryStructure.DirectoryForIndex(indexId); StoreIndexDescriptor descriptor = IndexDescriptorFactory.forSchema(SchemaDescriptorFactory.forLabel(1, 1)).withId(indexId); IndexSpecificSpaceFillingCurveSettingsCache spatialSettings = mock(typeof(IndexSpecificSpaceFillingCurveSettingsCache)); PageCache pageCache = Storage.pageCache(); FileSystemAbstraction fs = Storage.fileSystem(); File indexFile = new File(indexDirectory, "my-index"); GenericLayout layout = new GenericLayout(1, spatialSettings); RecoveryCleanupWorkCollector immediate = immediate(); IndexDropAction dropAction = new FileSystemIndexDropAction(fs, directoryStructure); GenericNativeIndexPopulator populator = new GenericNativeIndexPopulator(pageCache, fs, indexFile, layout, EMPTY, descriptor, spatialSettings, directoryStructure, mock(typeof(SpaceFillingCurveConfiguration)), dropAction, false); populator.Create(); // when assertTrue(fs.ListFiles(indexDirectory).Length > 0); populator.Drop(); // then assertFalse(fs.FileExists(indexDirectory)); }
internal GenericLayout(int numberOfSlots, IndexSpecificSpaceFillingCurveSettingsCache spatialSettings) : base("NSIL", 0, 5) { this._numberOfSlots = numberOfSlots; this._spatialSettings = spatialSettings; }