//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldNotSeeDeletedRelationshipWhenQueryingWithStartAndEndNode() public virtual void ShouldNotSeeDeletedRelationshipWhenQueryingWithStartAndEndNode() { RelationshipType type = MyRelTypes.TEST; long startId; long endId; Relationship rel; using (Transaction tx = Db.beginTx()) { Node start = Db.createNode(); Node end = Db.createNode(); startId = start.Id; endId = end.Id; rel = start.CreateRelationshipTo(end, type); rel.SetProperty("Type", type.Name()); tx.Success(); } using (Transaction tx = Db.beginTx()) { ReadableRelationshipIndex autoRelationshipIndex = Db.index().RelationshipAutoIndexer.AutoIndex; Node start = Db.getNodeById(startId); Node end = Db.getNodeById(endId); IndexHits <Relationship> hits = autoRelationshipIndex.Get("Type", type.Name(), start, end); assertEquals(1, count(hits)); assertEquals(1, hits.Size()); rel.Delete(); autoRelationshipIndex = Db.index().RelationshipAutoIndexer.AutoIndex; hits = autoRelationshipIndex.Get("Type", type.Name(), start, end); assertEquals(0, count(hits)); assertEquals(0, hits.Size()); tx.Success(); } }
public override IndexHits <Relationship> Get(string key, object valueOrNull, Node startNodeOrNull, Node endNodeOrNull) { return(@delegate.Get(key, valueOrNull, startNodeOrNull, endNodeOrNull)); }