private void AssertNoContentInNativeLabelScanStore(DatabaseLayout databaseLayout) { using (Lifespan lifespan = new Lifespan()) { NativeLabelScanStore nativeLabelScanStore = GetNativeLabelScanStore(databaseLayout, true); lifespan.Add(nativeLabelScanStore); using (LabelScanReader labelScanReader = nativeLabelScanStore.NewReader()) { int count = PrimitiveLongCollections.count(labelScanReader.NodesWithLabel(1)); assertEquals(0, count); } } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void populateNativeLabelScanIndexDuringMigration() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void PopulateNativeLabelScanIndexDuringMigration() { Prepare34DatabaseWithNodes(); _indexMigrator.migrate(_databaseLayout, _migrationLayout, _progressReporter, StandardV3_4.STORE_VERSION, StandardV3_4.STORE_VERSION); _indexMigrator.moveMigratedFiles(_migrationLayout, _databaseLayout, StandardV2_3.STORE_VERSION, StandardV3_2.STORE_VERSION); using (Lifespan lifespan = new Lifespan()) { NativeLabelScanStore labelScanStore = GetNativeLabelScanStore(_databaseLayout, true); lifespan.Add(labelScanStore); for (int labelId = 0; labelId < 10; labelId++) { using (LabelScanReader labelScanReader = labelScanStore.NewReader()) { int nodeCount = PrimitiveLongCollections.count(labelScanReader.NodesWithLabel(labelId)); assertEquals(format("Expected to see only one node for label %d but was %d.", labelId, nodeCount), 1, nodeCount); } } } }