Пример #1
0
        public void AtLevel_ReturnsNull_WhenOutSideBounds_Lower()
        {
            ContentItem found = Find.AtLevel(a_a_a, a, 0);

            Assert.That(found, Is.Null);
        }
Пример #2
0
 public static Tree Between(ContentItem initialItem, ContentItem lastAncestor, bool appendAdditionalLevel, int startingDepth)
 {
     lastAncestor = Find.AtLevel(initialItem, lastAncestor, startingDepth);
     return(Using(new BranchHierarchyBuilder(initialItem, lastAncestor ?? initialItem, lastAncestor != null && appendAdditionalLevel)));
 }
Пример #3
0
        public void AtLevel_FindsItem_SameAs_Root()
        {
            ContentItem found = Find.AtLevel(a_a_a, a, 1);

            Assert.That(found, Is.EqualTo(a));
        }
Пример #4
0
        public void AtLevel_FindsItem_SameAs_StartingPoint()
        {
            ContentItem found = Find.AtLevel(a_a_a, a, 3);

            Assert.That(found, Is.EqualTo(a_a_a));
        }
Пример #5
0
        public void AtLevel_ReturnsNull_WhenStartingPoint_IsBelowCurrent()
        {
            ContentItem found = Find.AtLevel(a, a, 2);

            Assert.That(found, Is.Null);
        }
Пример #6
0
        public void AtLevel_FindsItem_WhenStartingPoint_IsInTheMiddle()
        {
            ContentItem found = Find.AtLevel(a_a, a, 2);

            Assert.That(found, Is.EqualTo(a_a));
        }
Пример #7
0
        public void AtLevel_FindsItem_InTheMiddle()
        {
            ContentItem found = Find.AtLevel(a_a_a, a, 2);

            Assert.That(found, Is.EqualTo(a_a));
        }