コード例 #1
0
ファイル: TestTimeline.cs プロジェクト: Neo4Net/Neo4Net
        private void MakeSureUncommittedChangesAreSortedCorrectly(EntityCreator <PropertyContainer> creator, TimelineIndex <PropertyContainer> timeline)
        {
            LinkedList <Pair <PropertyContainer, long> > timestamps = CreateTimestamps(creator, timeline, 300000, 100000, 500000, 900000, 800000);

            using (Transaction tx = _db.beginTx())
            {
                timestamps.addAll(CreateTimestamps(creator, timeline, 40000, 70000, 20000));
                assertEquals(SortedEntities(timestamps, false), asCollection(timeline.GetBetween(null, null).GetEnumerator()));
                tx.Success();
            }

            using (Transaction ignore = _db.beginTx())
            {
                assertEquals(SortedEntities(timestamps, false), asCollection(timeline.GetBetween(null, null).GetEnumerator()));
            }
        }
コード例 #2
0
ファイル: TestTimeline.cs プロジェクト: Neo4Net/Neo4Net
        private void MakeSureWeCanQueryLowerDefaultThan1970(EntityCreator <PropertyContainer> creator, TimelineIndex <PropertyContainer> timeline)
        {
            LinkedList <Pair <PropertyContainer, long> > timestamps = CreateTimestamps(creator, timeline, -10000, 0, 10000);

            using (Transaction tx = _db.beginTx())
            {
                assertEquals(SortedEntities(timestamps, true), asCollection(timeline.GetBetween(null, 10000L, true).GetEnumerator()));
                tx.Success();
            }
        }
コード例 #3
0
ファイル: TestTimeline.cs プロジェクト: Neo4Net/Neo4Net
        private void MakeSureRangesAreReturnedInCorrectReversedOrder(EntityCreator <PropertyContainer> creator, TimelineIndex <PropertyContainer> timeline)
        {
            LinkedList <Pair <PropertyContainer, long> > timestamps = CreateTimestamps(creator, timeline, 300000, 200000, 199999, 400000, 100000, 500000, 600000, 900000, 800000);

            using (Transaction tx = _db.beginTx())
            {
                assertEquals(SortedEntities(timestamps, true), asCollection(timeline.GetBetween(null, null, true).GetEnumerator()));
                tx.Success();
            }
        }