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); }
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); }
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); }