Class HudElementTreeOrderTests
Tests for HudElementTreeOrder, the pure solver behind the HUD Builder's nested element list.
Inherited Members
Namespace: Serenity.GameUi.Tests.Application
Assembly: Tests.dll
Syntax
public class HudElementTreeOrderTests
Remarks
The permutation invariant is the one thing every other test — and every caller — depends on: a tool that iterates Solve(IReadOnlyList<Node>)'s result to draw a row per element would silently drop or duplicate rows the moment that invariant broke, which is a far worse failure than a wrong indent. Solve_RandomlyShapedStructures_AlwaysReturnsAPermutation() hammers it across many shapes, including the malformed ones (dangling parents, cycles) the solver exists to survive without losing a row.
Constructors
HudElementTreeOrderTests()
Declaration
public HudElementTreeOrderTests()
Methods
Solve_DanglingParent_TreatedAsRootAtDepthZero()
Declaration
public void Solve_DanglingParent_TreatedAsRootAtDepthZero()
Solve_DeepChain_DepthClampsButParentElementIndexStaysExact()
Declaration
public void Solve_DeepChain_DepthClampsButParentElementIndexStaysExact()
Solve_DuplicateIds_ChildAttachesToTheFirstOccurrence()
Declaration
public void Solve_DuplicateIds_ChildAttachesToTheFirstOccurrence()
Solve_EmptyList_ReturnsEmpty()
Declaration
public void Solve_EmptyList_ReturnsEmpty()
Solve_LongTailIntoCycle_PromotionDoesNotDependOnHowManyHopsAwayTheCycleIs()
Declaration
public void Solve_LongTailIntoCycle_PromotionDoesNotDependOnHowManyHopsAwayTheCycleIs()
Solve_LongerCycle_EveryParticipantBecomesItsOwnRoot()
Declaration
public void Solve_LongerCycle_EveryParticipantBecomesItsOwnRoot()
Solve_MixedCleanTreeAndBrokenCluster_OnlyTheBrokenClusterIsPromoted()
Declaration
public void Solve_MixedCleanTreeAndBrokenCluster_OnlyTheBrokenClusterIsPromoted()
Solve_MultipleRoots_EachSubtreeStaysGroupedInArrayOrder()
Declaration
public void Solve_MultipleRoots_EachSubtreeStaysGroupedInArrayOrder()
Solve_NoParents_AllRootsInArrayOrderAtDepthZero()
Declaration
public void Solve_NoParents_AllRootsInArrayOrderAtDepthZero()
Solve_RandomlyShapedStructures_AlwaysReturnsAPermutation()
Declaration
public void Solve_RandomlyShapedStructures_AlwaysReturnsAPermutation()
Solve_SelfCycle_TreatedAsRootAtDepthZero()
Declaration
public void Solve_SelfCycle_TreatedAsRootAtDepthZero()
Solve_SiblingOrdinalsAndPrevNextIndices_AreCorrect()
Declaration
public void Solve_SiblingOrdinalsAndPrevNextIndices_AreCorrect()
Solve_SimpleNesting_ChildAppearsDirectlyAfterItsParentAtDepthOne()
Declaration
public void Solve_SimpleNesting_ChildAppearsDirectlyAfterItsParentAtDepthOne()
Solve_TailHangingOffACycle_TailIsAlsoPromotedToRoot()
Declaration
public void Solve_TailHangingOffACycle_TailIsAlsoPromotedToRoot()