Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void showsDeletedNodes() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShowsDeletedNodes()
        {
            // Given
            _state.nodeDoDelete(1L);
            _state.nodeDoDelete(2L);

            int labelId = 15;

            when(_tokenRead.nodeLabelName(labelId)).thenReturn("label");

            _ops.withNode(1, new long[] { labelId }, genericMap("key", Values.of("p")));
            _ops.withNode(2, _noLabels);

            // When & Then
            TxStateTransactionDataSnapshot snapshot = snapshot();

            assertThat(IdList(snapshot.DeletedNodes()), equalTo(asList(1L, 2L)));
            assertThat(single(snapshot.RemovedLabels()).label().name(), equalTo("label"));
            assertThat(single(snapshot.RemovedNodeProperties()).key(), equalTo("key"));
        }