public void MoveNext_WithTree1_AfterSecondMoveNextReturnsFalse() { AddEntries1(); var ee = new EntryEnumerator(EStore); ee.MoveNext(); Assert.That(ee.MoveNext(), Is.False); }
public void MoveNext_WithTree1_AfterSecondMoveNextCurrentNull() { AddEntries1(); var ee = new EntryEnumerator(EStore); ee.MoveNext(); ee.MoveNext(); Assert.That(ee.Current, Is.Null); }
public void MoveNext_WithTree2_AfterTwoMoveNextCurrentHasSecondEntry() { AddEntries1(); AddEntries2(); var ee = new EntryEnumerator(EStore); ee.MoveNext(); ee.MoveNext(); Assert.That(ee.Current.Index, Is.EqualTo(File1Index), "Did not get File1Index entry."); }
public void MoveNext_WithTree2_FourthMoveNextReturnsFalse() { AddEntries1(); AddEntries2(); var ee = new EntryEnumerator(EStore); ee.MoveNext(); ee.MoveNext(); ee.MoveNext(); Assert.That(ee.MoveNext(), Is.False, "Fouth MoveNext() true."); }
public void MoveNext_WithTree3_AfterFourMoveNextReturnsFourthEntry() { AddEntries1(); AddEntries2(); AddEntries3(); var ee = new EntryEnumerator(EStore); ee.MoveNext(); ee.MoveNext(); ee.MoveNext(); ee.MoveNext(); Assert.That(ee.Current.Index, Is.EqualTo(File3Index), "Did not get File3Index entry."); }
public void MoveNext_WithTree3_FifthMoveNextReturnsFalse() { AddEntries1(); AddEntries2(); AddEntries3(); var ee = new EntryEnumerator(EStore); ee.MoveNext(); ee.MoveNext(); ee.MoveNext(); ee.MoveNext(); Assert.That(ee.MoveNext(), Is.False, "Fifth MoveNext() True,"); }
public void MoveNext_WithTree1_FirstMoveNextIsTrue() { AddEntries1(); var ee = new EntryEnumerator(EStore); Assert.That(ee.MoveNext(), Is.True); }
public void PrintPathsHaveHash2_WithTree4_A() { AddEntriesX4(); var ee = new EntryEnumerator(EStore); Assert.That(ee.MoveNext(), Is.True, "t1"); Assert.That(ee.Current.Index, Is.EqualTo(File1Index), "Did not get Dir2Index entry."); Assert.That(ee.MoveNext(), Is.True, "t2"); Assert.That(ee.Current.Index, Is.EqualTo(Dir2Index), "Did not get File1Index entry."); Assert.That(ee.MoveNext(), Is.True, "t3"); Assert.That(ee.Current.Index, Is.EqualTo(Dir5Index), "Did not get File4Dir5IndexIndex entry."); Assert.That(ee.MoveNext(), Is.False, "t6"); EStore.PrintPathsHaveHash2(); }
private bool FillEntries( IntPtr filler, IntPtr buf, IntPtr stbuf, long offset, EntryEnumerator entries) { while (entries.MoveNext()) { DirectoryEntry entry = entries.Current; IntPtr _stbuf = IntPtr.Zero; int r = Interop.adaptor_invoke_filler(filler, buf, entry.Name, _stbuf, offset); if (r != 0) { entries.Repeat = true; return(false); } } return(true); }
public void MoveNext_NoRootEntries_FirstMoveNextFalse() { var ee = new EntryEnumerator(EStore); Assert.That(ee.MoveNext(), Is.False); }