public void PathToIndexBounds(int pIndex, bool pInclusive, bool pThrows) { IWeaverPath p = NewPath(3); WeaverTestUtil.CheckThrows <WeaverPathException>(pThrows, () => p.PathToIndex(pIndex, pInclusive) ); }
public void PathToIndex(int pIndex, bool pInclusive, int pCount) { IWeaverPath p = NewPath(5); IList <IWeaverPathItem> result = p.PathToIndex(pIndex, pInclusive); Assert.NotNull(result, "Result should be filled."); Assert.AreEqual(pCount, result.Count, "Incorrect Result.Count."); Assert.AreEqual(p.ItemAtIndex(0), result[0], "Incorrect Result[0]."); int ri = pCount - 1; Assert.AreEqual(p.ItemAtIndex(ri), result[ri], "Incorrect Result[" + ri + "]."); }