//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldReturnNoValueOnMissingProperty() throws org.neo4j.internal.kernel.api.exceptions.EntityNotFoundException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldReturnNoValueOnMissingProperty() { // given long nodeId = 10; StubNodeCursor nodeCursor = (new StubNodeCursor()).withNode(nodeId, new long[] {}, genericMap(999, Values.of(12345))); CursorPropertyAccessor accessor = new CursorPropertyAccessor(nodeCursor, new StubPropertyCursor(), new StubRead()); // when Value readValue = accessor.GetNodePropertyValue(nodeId, 0); // then assertEquals(NO_VALUE, readValue); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldLookupProperty() throws org.neo4j.internal.kernel.api.exceptions.EntityNotFoundException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldLookupProperty() { // given long nodeId = 10; Value value = Values.of("abc"); int propertyKeyId = 0; StubNodeCursor nodeCursor = (new StubNodeCursor()).withNode(nodeId, new long[] {}, genericMap(999, Values.of(12345), propertyKeyId, value)); CursorPropertyAccessor accessor = new CursorPropertyAccessor(nodeCursor, new StubPropertyCursor(), new StubRead()); // when Value readValue = accessor.GetNodePropertyValue(nodeId, propertyKeyId); // then assertEquals(value, readValue); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldThrowOnEntityNotFound() public virtual void ShouldThrowOnEntityNotFound() { // given long nodeId = 10; Value value = Values.of("abc"); int propertyKeyId = 0; StubNodeCursor nodeCursor = (new StubNodeCursor()).withNode(nodeId, new long[] {}, genericMap(999, Values.of(12345), propertyKeyId, value)); CursorPropertyAccessor accessor = new CursorPropertyAccessor(nodeCursor, new StubPropertyCursor(), new StubRead()); // when try { accessor.GetNodePropertyValue(nodeId + 1, propertyKeyId); fail(); } catch (EntityNotFoundException) { // then good } }