Ejemplo n.º 1
0
        public void SimpleHierarchyValidationTest()
        {
            var root   = _nodeFactory.CreateRoot();
            var header = _nodeFactory.Create(root, "header");
            var aField = _nodeFactory.Create(header, "a");
            var bField = _nodeFactory.Create(header, "b");
            var cField = _nodeFactory.Create(header, "c");

            _validationService.Validate(aField);
            _validationService.Validate(bField);
            _validationService.Validate(cField);

            //or Alternatively validate upper node with
            //modification of validation service to pass boolean variable
            // in validate that order service to validate recursive all part of tree
            _validationService.Validate(header);
        }
Ejemplo n.º 2
0
        public INodeViewModel CreateRoot()
        {
            var root = _decoratedFactory.CreateRoot();

            return(new NodeIntDecorator(root));
        }
        public INodeViewModel CreateRoot()
        {
            var root = _decoratedFactory.CreateRoot();

            return(new NodeValidationDecorator(root, _service));
        }