public ArrangeElement ( ICodeElement parentElement, ICodeElement codeElement ) : void | ||
parentElement | ICodeElement | Parent code element. |
codeElement | ICodeElement | Code element to arrange. |
Résultat | void |
public void UnsupportedArrangeNoParentTest() { ChainElementArranger chain = new ChainElementArranger(); FieldElement fieldElement = new FieldElement(); // // Add an arranger that can't arrange the element // TestElementArranger disabledArranger = new TestElementArranger(false); chain.AddArranger(disabledArranger); Assert.IsFalse(chain.CanArrange(fieldElement), "Unexpected return value from CanArrange."); chain.ArrangeElement(null, fieldElement); }
public void UnsupportedArrangeWithParentTest() { GroupElement parentElement = new GroupElement(); ChainElementArranger chain = new ChainElementArranger(); FieldElement fieldElement = new FieldElement(); // // Add an arranger that can't arrange the element // TestElementArranger disabledArranger = new TestElementArranger(false); chain.AddArranger(disabledArranger); Assert.IsFalse(chain.CanArrange(fieldElement), "Unexpected return value from CanArrange."); chain.ArrangeElement(parentElement, fieldElement); Assert.IsTrue(parentElement.Children.Contains(fieldElement)); }