예제 #1
0
        public void ShouldSetPath()
        {
            VisualElement root = new VisualElement();

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

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

            ElementInteractions.InsertHiddenIntFieldWithPropertyPathSet(root, "");
            Assert.IsNotNull(root.Q <IntegerField>());
        }
예제 #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");
        }