public void WhenTypeIsString_ShouldNotAddClass()
        {
            VisualElement itemSection = new VisualElement();

            Handler.SetAddFieldVisibility(itemSection, typeof(string), false);
            Assert.IsFalse(itemSection.ClassListContains(UxmlClassNames.UseObjectField));
        }
        public void WhenTypeIsObjectAndOptionSet_ShouldNotAddClass()
        {
            VisualElement itemSection = new VisualElement();

            Handler.SetAddFieldVisibility(itemSection, typeof(TestHelpers.TestObject), false);
            Assert.IsFalse(itemSection.ClassListContains(UxmlClassNames.UseObjectField));
        }
Exemple #3
0
        public void WhenOptionFalse_ShouldAddClass()
        {
            VisualElement listElement = new VisualElement();

            Handler.SetRemoveButtonVisibility(listElement, false);
            Assert.IsTrue(listElement.ClassListContains(UxmlClassNames.HideRemoveButtons));
        }
        public void WhenOptionFalse_ShouldAddClass()
        {
            VisualElement itemSection = new VisualElement();

            Handler.SetReorderButtonVisibility(itemSection, false);
            Assert.IsTrue(itemSection.ClassListContains(UxmlClassNames.HideReorderButtons));
        }
Exemple #5
0
        public void WhenOptionTrue_ShouldRemoveClass()
        {
            VisualElement itemSection = new VisualElement();

            itemSection.AddToClassList(UxmlClassNames.HidePropertyLabel);
            Handler.SetPropertyLabelVisibility(itemSection, true);
            Assert.IsFalse(itemSection.ClassListContains(UxmlClassNames.HidePropertyLabel));
        }
Exemple #6
0
 public void WhenElementNull_ShouldNotThrowError()
 {
     Handler.SetPropertyLabelVisibility(null, true);
 }
 public void WhenElementIsNull_ShouldNotThrowError()
 {
     Handler.SetAddFieldVisibility(null, typeof(TestHelpers.TestObject), false);
 }
Exemple #8
0
 public void WhenElementIsNull_ShouldFailSilently()
 {
     Handler.SetRemoveButtonVisibility(null, false);
 }