//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldPreserveNoId() public virtual void ShouldPreserveNoId() { assertThat(RelationshipReferenceEncoding.encodeForFiltering(NO_ID), equalTo(( long )NO_ID)); assertThat(RelationshipReferenceEncoding.encodeForTxStateFiltering(NO_ID), equalTo(( long )NO_ID)); assertThat(RelationshipReferenceEncoding.encodeGroup(NO_ID), equalTo(( long )NO_ID)); assertThat(RelationshipReferenceEncoding.encodeNoIncomingRels(NO_ID), equalTo(( long )NO_ID)); assertThat(RelationshipReferenceEncoding.encodeNoOutgoingRels(NO_ID), equalTo(( long )NO_ID)); assertThat(RelationshipReferenceEncoding.encodeNoLoopRels(NO_ID), equalTo(( long )NO_ID)); assertThat(GroupReferenceEncoding.EncodeRelationship(NO_ID), equalTo(( long )NO_ID)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void encodeForFiltering() public virtual void EncodeForFiltering() { ThreadLocalRandom random = ThreadLocalRandom.current(); for (int i = 0; i < 1000; i++) { long reference = random.nextLong(_maxIdLimit); assertNotEquals(FILTER, parseEncoding(reference)); assertEquals(FILTER, parseEncoding(RelationshipReferenceEncoding.encodeForFiltering(reference))); assertTrue("encoded reference is negative", RelationshipReferenceEncoding.encodeForFiltering(reference) < 0); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void encodeNoLoopRels() public virtual void EncodeNoLoopRels() { ThreadLocalRandom random = ThreadLocalRandom.current(); for (int i = 0; i < 1000; i++) { int token = random.Next(int.MaxValue); assertNotEquals(NO_LOOP_OF_TYPE, parseEncoding(token)); assertEquals(NO_LOOP_OF_TYPE, parseEncoding(RelationshipReferenceEncoding.encodeNoLoopRels(token))); assertTrue("encoded reference is negative", RelationshipReferenceEncoding.encodeNoLoopRels(token) < 0); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldClearFlags() public virtual void ShouldClearFlags() { ThreadLocalRandom random = ThreadLocalRandom.current(); for (int i = 0; i < 1000; i++) { long reference = random.nextLong(_maxIdLimit); int token = random.Next(int.MaxValue); assertThat(clearEncoding(RelationshipReferenceEncoding.encodeGroup(reference)), equalTo(reference)); assertThat(clearEncoding(RelationshipReferenceEncoding.encodeForFiltering(reference)), equalTo(reference)); assertThat(clearEncoding(RelationshipReferenceEncoding.encodeForTxStateFiltering(reference)), equalTo(reference)); assertThat(clearEncoding(RelationshipReferenceEncoding.encodeNoIncomingRels(token)), equalTo(( long )token)); assertThat(clearEncoding(RelationshipReferenceEncoding.encodeNoOutgoingRels(token)), equalTo(( long )token)); assertThat(clearEncoding(RelationshipReferenceEncoding.encodeNoLoopRels(token)), equalTo(( long )token)); assertThat(clearEncoding(GroupReferenceEncoding.EncodeRelationship(reference)), equalTo(reference)); } }
public override long AllRelationshipsReference() { return(Dense ? RelationshipReferenceEncoding.encodeGroup(NextRel) : NextRel); }