private void ExpectKeysSearch(BTree btree, int[] values) { int lastValue = int.MinValue; for (int i = 0; i < values.Length; i++) { if (values[i] != lastValue) { ExpectingVisitor expectingVisitor = ExpectingVisitor.CreateExpectingVisitor(values [i], IntArrays4.Occurences(values, values[i])); IBTreeRange range = FieldIndexKeySearch(Trans(), btree, values[i]); BTreeAssert.TraverseKeys(range, new _IVisitor4_62(expectingVisitor)); expectingVisitor.AssertExpectations(); lastValue = values[i]; } } }
private void ExpectKeysSearch(Transaction trans, BTree btree, int[] keys) { int lastValue = int.MinValue; for (int i = 0; i < keys.Length; i++) { if (keys[i] != lastValue) { ExpectingVisitor expectingVisitor = ExpectingVisitor.CreateExpectingVisitor(keys[ i], IntArrays4.Occurences(keys, keys[i])); IBTreeRange range = btree.SearchRange(trans, keys[i]); BTreeAssert.TraverseKeys(range, expectingVisitor); expectingVisitor.AssertExpectations(); lastValue = keys[i]; } } }