//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldIncludeIndexFileInConsistencyReport() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldIncludeIndexFileInConsistencyReport() { Setup(GraphDatabaseSettings.SchemaIndex.NATIVE_BTREE10); File[] indexFiles = SchemaIndexFiles(); IList <File> corruptedFiles = CorruptIndexes(true, (tree, inspection) => { long rootNode = inspection.RootNode; tree.@unsafe(GBPTreeCorruption.pageSpecificCorruption(rootNode, GBPTreeCorruption.notATreeNode())); }, indexFiles); ConsistencyCheckService.Result result = RunConsistencyCheck(); assertFalse("Expected store to be considered inconsistent.", result.Successful); AssertResultContainsMessage(result, "Index file: " + corruptedFiles[0].AbsolutePath); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void notATreeNode() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void NotATreeNode() { Setup(GraphDatabaseSettings.SchemaIndex.NATIVE_BTREE10); MutableObject <long> targetNode = new MutableObject <long>(); File[] indexFiles = SchemaIndexFiles(); CorruptIndexes(true, (tree, inspection) => { targetNode.Value = inspection.RootNode; tree.@unsafe(GBPTreeCorruption.pageSpecificCorruption(targetNode.Value, GBPTreeCorruption.notATreeNode())); }, indexFiles); ConsistencyCheckService.Result result = RunConsistencyCheck(); assertFalse("Expected store to be considered inconsistent.", result.Successful); AssertResultContainsMessage(result, "Page: " + targetNode.Value + " is not a tree node page."); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldCheckIndexStructureEvenIfNotCheckingIndexes() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldCheckIndexStructureEvenIfNotCheckingIndexes() { Setup(GraphDatabaseSettings.SchemaIndex.NATIVE_BTREE10); MutableObject <long> targetNode = new MutableObject <long>(); File[] indexFiles = SchemaIndexFiles(); CorruptIndexes(true, (tree, inspection) => { targetNode.Value = inspection.RootNode; tree.@unsafe(GBPTreeCorruption.pageSpecificCorruption(targetNode.Value, GBPTreeCorruption.notATreeNode())); }, indexFiles); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.kernel.configuration.Config config = config(org.neo4j.kernel.configuration.Settings.TRUE, org.neo4j.kernel.configuration.Settings.FALSE); Config config = config(Settings.TRUE, Settings.FALSE); ConsistencyCheckService.Result result = RunConsistencyCheck(config); assertFalse("Expected store to be inconsistent when checking index structure.", result.Successful); AssertResultContainsMessage(result, "Page: " + targetNode.Value + " is not a tree node page"); }