public void AtLevel_ReturnsNull_WhenOutSideBounds_Lower() { ContentItem found = Find.AtLevel(a_a_a, a, 0); Assert.That(found, Is.Null); }
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))); }
public void AtLevel_FindsItem_SameAs_Root() { ContentItem found = Find.AtLevel(a_a_a, a, 1); Assert.That(found, Is.EqualTo(a)); }
public void AtLevel_FindsItem_SameAs_StartingPoint() { ContentItem found = Find.AtLevel(a_a_a, a, 3); Assert.That(found, Is.EqualTo(a_a_a)); }
public void AtLevel_ReturnsNull_WhenStartingPoint_IsBelowCurrent() { ContentItem found = Find.AtLevel(a, a, 2); Assert.That(found, Is.Null); }
public void AtLevel_FindsItem_WhenStartingPoint_IsInTheMiddle() { ContentItem found = Find.AtLevel(a_a, a, 2); Assert.That(found, Is.EqualTo(a_a)); }
public void AtLevel_FindsItem_InTheMiddle() { ContentItem found = Find.AtLevel(a_a_a, a, 2); Assert.That(found, Is.EqualTo(a_a)); }