示例#1
0
        public void BuildTreeTest1()
        {
            _methodName  = "BuildTreeTest1 - File Not Exist ";
            inputCSSPath = Common.PathCombine(testPath, "InValidFilePath.css");
            TreeNode actual = target.BuildTree(inputCSSPath);

            Assert.IsTrue(actual.Nodes.Count == 0, _methodName + "test failed.");
        }
示例#2
0
        public void ResultSingleClassCSS()
        {
            var clsCSS   = new CssParser();
            var filePath = Common.DirectoryPathReplace(testPath + "/SingleClassFile.css");
            var Node     = clsCSS.BuildTree(filePath);

            resultSCNode.Nodes.Add((TreeNode)Node.Clone());
        }
示例#3
0
        public void ResultTwoLevelTree()
        {
            var clsCSS   = new CssParser();
            var filePath = Common.DirectoryPathReplace(testPath + "/twolevelsample1.css");
            var Node     = clsCSS.BuildTree(filePath);

            resultTLNode.Nodes.Add((TreeNode)Node.Clone());
        }
示例#4
0
        public void ResultOxesPropertyTree()
        {
            var clsCSS   = new CssParser();
            var filePath = Common.DirectoryPathReplace(testPath + "/OxesCase.css");
            var Node     = clsCSS.BuildTree(filePath);

            resultOSNode.Nodes.Add((TreeNode)Node.Clone());
        }
示例#5
0
        public void ResultMultiLineSyntaxTree()
        {
            var clsCSS   = new CssParser();
            var filePath = Common.DirectoryPathReplace(testPath + "/MultiLineSyntax.css");
            var Node     = clsCSS.BuildTree(filePath);

            resultMLSNode.Nodes.Add((TreeNode)Node.Clone());
        }
示例#6
0
        public void ResultRemoveUnderscoreTree()
        {
            var clsCSS   = new CssParser();
            var filePath = Common.DirectoryPathReplace(testPath + "/Underscore.css");
            var Node     = clsCSS.BuildTree(filePath);

            resultRUSNode.Nodes.Add((TreeNode)Node.Clone());
        }
示例#7
0
        public void ResultInhertitParentClassPropertyTree()
        {
            var clsCSS   = new CssParser();
            var filePath = Common.DirectoryPathReplace(testPath + "/InhertitParentClassPropertyFile.css");
            var Node     = clsCSS.BuildTree(filePath);

            resultIPCPNode.Nodes.Add((TreeNode)Node.Clone());
        }
示例#8
0
        public void BuildTreeTest3()
        {
            _methodName = "BuildTreeTest3 - EmptyCSSValidate1 ";
            RemoveCSS();
            var clsCSS   = new CssParser();
            var filePath = Common.PathCombine(testPath, "emptyCSS.css");
            var Node     = clsCSS.BuildTree(filePath);

            EmptyNode.Nodes.Add((TreeNode)Node.Clone());
            var cnt = EmptyNode.Nodes[0].Nodes.Count;

            Assert.AreEqual(0, cnt, _methodName + " test failed");
        }