public void CanUseAreControlsValid()
        {
            //asign
            var controlManager = new ControlManager();
            var xForm = new XForm();

            xForm.Root = new XContainer { Name = "BaseContainer" };

            var xAttribute = new XAttribute<string>("StringAttribute") { Name = "StringAttribute", Value = "StringAttribute", Use = XAttributeUse.Required };
            var xContainer = new XContainer { Name = "ChildContainer", Value = "ChildContainerValue", ParentContainer = xForm.Root, MaxOccurs = 1234, MinOccurs = 0 };
            xContainer.Attributes.Add(xAttribute);
            var xElement = new XElement { Name = "Element", Value = "ElementValue" };
            xContainer.Elements.Add(xElement);

            xForm.Root.Attributes.Add(xAttribute);
            xForm.Root.Containers.Add(xContainer);
            xForm.Root.Elements.Add(xElement);
            xContainer.Value = "test";

            //action
            controlManager.GetGroupBoxGui(xForm.Root, xForm.Root);
            var areControlsValid = controlManager.AreControlsValid();

            //assert
            Assert.False(areControlsValid);
        }
        public void CanUseAreControlsValid()
        {
            //asign
            var controlManager = new ControlManager();
            var xForm          = new XForm();

            xForm.Root = new XContainer {
                Name = "BaseContainer"
            };

            var xAttribute = new XAttribute <string>("StringAttribute")
            {
                Name = "StringAttribute", Value = "StringAttribute", Use = XAttributeUse.Required
            };
            var xContainer = new XContainer {
                Name = "ChildContainer", Value = "ChildContainerValue", ParentContainer = xForm.Root, MaxOccurs = 1234, MinOccurs = 0
            };

            xContainer.Attributes.Add(xAttribute);
            var xElement = new XElement {
                Name = "Element", Value = "ElementValue"
            };

            xContainer.Elements.Add(xElement);

            xForm.Root.Attributes.Add(xAttribute);
            xForm.Root.Containers.Add(xContainer);
            xForm.Root.Elements.Add(xElement);
            xContainer.Value = "test";

            //action
            controlManager.GetGroupBoxGui(xForm.Root, xForm.Root);
            var areControlsValid = controlManager.AreControlsValid();

            //assert
            Assert.False(areControlsValid);
        }