コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldReportConflictOnSameValueAndDifferentEntityIds()
        public virtual void ShouldReportConflictOnSameValueAndDifferentEntityIds()
        {
            // given
            Value value     = Values.of(123);
            long  entityId1 = 10;
            long  entityId2 = 20;

            // when
            NativeIndexValue merged = _detector.merge(Key(entityId1, value), Key(entityId2, value), NativeIndexValue.Instance, NativeIndexValue.Instance);

            // then
            assertNull(merged);
            try
            {
                _detector.checkConflict(array(value));
                fail("Should've detected conflict");
            }
            catch (IndexEntryConflictException e)
            {
                assertEquals(entityId1, e.ExistingNodeId);
                assertEquals(entityId2, e.AddedNodeId);
                assertEquals(value, e.SinglePropertyValue);
            }
        }
コード例 #2
0
ファイル: IndexLayout.cs プロジェクト: Neo4Net/Neo4Net
 public override void WriteValue(PageCursor cursor, NativeIndexValue nativeIndexValue)
 {
     // nothing to write
 }
コード例 #3
0
ファイル: IndexLayout.cs プロジェクト: Neo4Net/Neo4Net
 public override void ReadValue(PageCursor cursor, NativeIndexValue into, int valueSize)
 {
     // nothing to read
 }
コード例 #4
0
ファイル: IndexLayout.cs プロジェクト: Neo4Net/Neo4Net
 public override int ValueSize(NativeIndexValue nativeIndexValue)
 {
     return(NativeIndexValue.SIZE);
 }