public void ShouldSetPath() { VisualElement root = new VisualElement(); ElementInteractions.InsertHiddenIntFieldWithPropertyPathSet(root, "test"); Assert.AreEqual("test", root.Q <IntegerField>().bindingPath); }
public void ShouldNotBeVisible() { VisualElement root = new VisualElement(); ElementInteractions.InsertHiddenIntFieldWithPropertyPathSet(root, "test"); Assert.AreEqual(DisplayStyle.None, root.Q <IntegerField>().style.display.value); }
public void ShouldAddIntField() { VisualElement root = new VisualElement(); ElementInteractions.InsertHiddenIntFieldWithPropertyPathSet(root, ""); Assert.IsNotNull(root.Q <IntegerField>()); }
public void WhenElementIsNull_ShouldThrowArgumentNullException() { try { ElementInteractions.InsertHiddenIntFieldWithPropertyPathSet(null, "test"); } catch (ArgumentNullException e) { Assert.AreEqual("element", e.ParamName); return; } Assert.Fail($"{nameof(ArgumentNullException)} was not thrown"); }