public void WhenTrue_ShouldSetEnabledTrue() { VisualElement element = new VisualElement(); ElementInteractions.SetStateBasedOnOption(element, true); Assert.IsTrue(element.enabledSelf); }
public void WhenFalse_ShouldSetEnabledFalse() { VisualElement element = new VisualElement(); ElementInteractions.SetStateBasedOnOption(element, false); Assert.IsFalse(element.enabledSelf); }
public void OnRowInserted(RowInsertedEvent evt) { rowEventRaisers.AddRange(CreateRaiserDefinitionsForRow(evt.Buttons, evt.Index)); ElementInteractions.SetButtonStateBasedOnZeroIndex(evt.Buttons.MoveUp, evt.Index); ElementInteractions.SetButtonStateBasedOnBeingLastPositionInArray(evt.Buttons.MoveDown, evt.Index, evt.ListLength); if (evt.target is ListElement le) { ElementInteractions.SetStateBasedOnOption(evt.PropertyField, le.Options.EnableModify); } }
public void WhenButtonIsNull_ShouldNotThrowError() { ElementInteractions.SetStateBasedOnOption(null, true); }