private Node NodeWithId(long id) { NodeProxy node = mock(typeof(NodeProxy)); when(node.Id).thenReturn(id); return(node); }
public static bool IsDeletedInCurrentTransaction(Node node) { if (node is NodeProxy) { NodeProxy proxy = ( NodeProxy )node; KernelTransaction ktx = proxy._spi.kernelTransaction(); using (Statement ignore = ktx.AcquireStatement()) { return(ktx.DataRead().nodeDeletedInTransaction(proxy._nodeId)); } } return(false); }