Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldDedupLabelIds()
        public virtual void ShouldDedupLabelIds()
        {
            // GIVEN
            BatchingLabelTokenRepository repo = new BatchingLabelTokenRepository(mock(typeof(TokenStore)));

            // WHEN
            long[] ids = repo.GetOrCreateIds(new string[] { "One", "Two", "One" });

            // THEN
            assertTrue(NodeLabelsField.isSane(ids));
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldSortLabelIds()
        public virtual void ShouldSortLabelIds()
        {
            // GIVEN
            BatchingLabelTokenRepository repo = new BatchingLabelTokenRepository(mock(typeof(TokenStore)));

            long[] expected = new long[] { repo.GetOrCreateId("One"), repo.GetOrCreateId("Two"), repo.GetOrCreateId("Three") };

            // WHEN
            long[] ids = repo.GetOrCreateIds(new string[] { "Two", "One", "Three" });

            // THEN
            assertArrayEquals(expected, ids);
            assertTrue(NodeLabelsField.isSane(ids));
        }