public void HideCollectionEvent_sets_HideIfEmpty(bool value) { var vis = new VisualElement(); var stub = new VisualElementConcealer(vis); stub.HandleSettingChange(new HideCollectionEvent().WithValue(value).WithTarget(vis)); Assert.AreEqual(value, stub.HideIfEmpty); }
public void SetVisibility_adds_hidden_when_HideIfEmpty_and_IsEmptyAreTrue() { var vis = new VisualElement(); var stub = new VisualElementConcealer(vis); stub.HandleSettingChange(new HideCollectionEvent().WithValue(true).WithTarget(vis)); stub.SetVisibility(true); Assert.IsTrue(vis.ClassListContains("hidden")); }