Ejemplo n.º 1
0
        public void ShouldSetPath()
        {
            VisualElement root = new VisualElement();

            ElementInteractions.InsertHiddenIntFieldWithPropertyPathSet(root, "test");
            Assert.AreEqual("test", root.Q <IntegerField>().bindingPath);
        }
Ejemplo n.º 2
0
        public void ShouldNotBeVisible()
        {
            VisualElement root = new VisualElement();

            ElementInteractions.InsertHiddenIntFieldWithPropertyPathSet(root, "test");
            Assert.AreEqual(DisplayStyle.None, root.Q <IntegerField>().style.display.value);
        }
Ejemplo n.º 3
0
        public void ShouldAddIntField()
        {
            VisualElement root = new VisualElement();

            ElementInteractions.InsertHiddenIntFieldWithPropertyPathSet(root, "");
            Assert.IsNotNull(root.Q <IntegerField>());
        }
Ejemplo n.º 4
0
        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");
        }