//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void tracksRelationshipCommands() public virtual void TracksRelationshipCommands() { ExplicitIndexTransactionStateImpl state = NewExplicitIndexTxState(); state.RemoveRelationship("index1", 1, "key1", "value1"); state.AddRelationship("index1", 1, "key2", "value2", 11, 11); state.RemoveRelationship("index1", 2, "key1", "value3"); state.AddRelationship("index1", 3, "key2", "value4", 22, 22); state.AddRelationship("index2", 4, "key1", "value5", 33, 33); IndexDefineCommand indexDefinedCommand = new IndexDefineCommand(); indexDefinedCommand.GetOrAssignIndexNameId("index1"); indexDefinedCommand.GetOrAssignIndexNameId("index2"); indexDefinedCommand.GetOrAssignKeyId("key1"); indexDefinedCommand.GetOrAssignKeyId("key2"); ISet <Command> expectedCommands = new HashSet <Command>(Arrays.asList(indexDefinedCommand, RemoveRelationship(1, 1, 1, "value1"), AddRelationship(1, 1, 2, "value2", 11, 11), RemoveRelationship(1, 2, 1, "value3"), AddRelationship(1, 3, 2, "value4", 22, 22), AddRelationship(2, 4, 1, "value5", 33, 33))); assertEquals(expectedCommands, ExtractCommands(state)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void removalOfRelationshipIndexDoesNotClearNodeCommandsForNodeIndexWithSameName() public virtual void RemovalOfRelationshipIndexDoesNotClearNodeCommandsForNodeIndexWithSameName() { ExplicitIndexTransactionStateImpl state = NewExplicitIndexTxState(); state.AddNode("index", 1, "key", "value"); state.AddRelationship("index", 1, "key", "value", 11, 11); state.DeleteIndex(IndexEntityType.Relationship, "index"); IndexDefineCommand indexDefinedCommand = new IndexDefineCommand(); indexDefinedCommand.GetOrAssignIndexNameId("index"); indexDefinedCommand.GetOrAssignKeyId("key"); IndexCommand.DeleteCommand delete = new IndexCommand.DeleteCommand(); delete.Init(1, IndexEntityType.Relationship.id()); ISet <Command> expectedCommands = new HashSet <Command>(Arrays.asList(indexDefinedCommand, delete, AddNode(1, 1, 1, "value"))); assertEquals(expectedCommands, ExtractCommands(state)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void relationshipIndexDeletionRemovesCommands() public virtual void RelationshipIndexDeletionRemovesCommands() { ExplicitIndexTransactionStateImpl state = NewExplicitIndexTxState(); state.RemoveRelationship("index", 1, "key", "value1"); state.AddRelationship("index", 2, "key", "value2", 11, 11); state.AddRelationship("index", 3, "key", "value3", 22, 22); state.DeleteIndex(IndexEntityType.Relationship, "index"); IndexDefineCommand indexDefinedCommand = new IndexDefineCommand(); indexDefinedCommand.GetOrAssignIndexNameId("index"); indexDefinedCommand.GetOrAssignKeyId("key"); IndexCommand.DeleteCommand delete = new IndexCommand.DeleteCommand(); delete.Init(1, IndexEntityType.Relationship.id()); ISet <Command> expectedCommands = new HashSet <Command>(Arrays.asList(indexDefinedCommand, delete)); assertEquals(expectedCommands, ExtractCommands(state)); }