示例#1
0
        public void PathToIndexBounds(int pIndex, bool pInclusive, bool pThrows)
        {
            IWeaverPath p = NewPath(3);

            WeaverTestUtil.CheckThrows <WeaverPathException>(pThrows,
                                                             () => p.PathToIndex(pIndex, pInclusive)
                                                             );
        }
示例#2
0
        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 + "].");
        }