Пример #1
0
        public void PositionInit()
        {
            List <Position> positions = _positionSer.GetAllPosition();
            TreeNodeTools   nodeComm  = new TreeNodeTools();
            var             webnodes  = nodeComm.InitTreeNode <Position>(positions, PositionDic);
            string          str       = JSonHelper.ObjectToJson(webnodes);

            Assert.AreEqual(11, positions.Count);
        }
Пример #2
0
        public void WebToEntity()
        {
            List <Position> positions = _positionSer.GetAllPosition();
            TreeNodeTools   nodeComm  = new TreeNodeTools();
            var             webnodes  = nodeComm.InitTreeNode <Position>(positions, PositionDic);
            List <BaseTree> baseTrees = nodeComm.WebNodeTreeToBaseTree(webnodes, 0);

            Assert.AreEqual(11, baseTrees.Count);
        }
Пример #3
0
        public void AuthorityInit()
        {
            TreeNodeTools    treeNode    = new TreeNodeTools();
            List <Authority> authorities = _authoritySer.GetAllAuthorities();

            List <WebTreeNode> webNodelist = treeNode
                                             .InitTreeNode(authorities, TreeAttr);

            string str = JSonHelper.ObjectToJson(webNodelist);

            Assert.AreEqual(authorities.Count, 9);
        }