public virtual void TestMoveNextAfterCompletion()
 {
     IEnumerator i = new TreeKeyIterator(CreateTree(Values));
     while (i.MoveNext())
     {
     }
     Assert.IsFalse(i.MoveNext());
 }
 private void AssertIterateValues(int[] values)
 {
     var expectingVisitor = new ExpectingVisitor(IntArrays4.ToObjectArray
         (values), true, false);
     IEnumerator i = new TreeKeyIterator(CreateTree(values));
     while (i.MoveNext())
     {
         expectingVisitor.Visit(i.Current);
     }
     expectingVisitor.AssertExpectations();
 }
Beispiel #3
0
 public virtual void Flush(DefragmentServicesImpl context)
 {
     if (_ids == null)
     {
         return;
     }
     IEnumerator idIter = new TreeKeyIterator(_ids);
     while (idIter.MoveNext())
     {
         var objectID = ((int) idIter.Current);
         var isClassID = false;
         if (objectID < 0)
         {
             objectID = -objectID;
             isClassID = true;
         }
         // seen object ids don't come by here anymore - any other candidates?
         context.MapIDs(objectID, context.TargetNewId(), isClassID);
     }
     context.Mapping().Commit();
     _ids = null;
 }
Beispiel #4
0
		public IEnumerator ExecuteSnapshot(Collection4 executionPath)
		{
			IIntIterator4 indexIterator = new IntIterator4Adaptor(IterateIndex(ProcessFieldIndexes
				()));
			Tree idRoot = TreeInt.AddAll(null, indexIterator);
			IEnumerator snapshotIterator = new TreeKeyIterator(idRoot);
			IEnumerator singleObjectQueryIterator = SingleObjectSodaProcessor(snapshotIterator
				);
			return MapIdsToExecutionPath(singleObjectQueryIterator, executionPath);
		}
 public virtual void TestEmpty()
 {
     IEnumerator i = new TreeKeyIterator(null);
     Assert.IsFalse(i.MoveNext());
 }