Exemple #1
0
        private void InLineMethod()
        {
            _validate = new ValidateXMLFile(_projInfo.TempOutputFolder);
            XmlNode x    = _validate.GetOfficeNode();
            bool    fail = false;

            int    counter = 1;
            string exp;
            string inner;

            foreach (XmlNode item in x.ChildNodes)
            {
                switch (counter)
                {
                case 3:
                    exp   = "locator_dictionary";
                    inner = "parent text div div parent text";
                    fail  = CheckStyleandInnerText(item, exp, inner);
                    break;

                case 4:
                    exp   = "locator_locator_dictionary";
                    inner = "parent text";
                    fail  = CheckStyleandInnerText(item, exp, inner);
                    break;

                case 5:
                    exp   = "locator_dictionary";
                    inner = "parent text";
                    fail  = CheckStyleandInnerText(item, exp, inner);
                    break;

                case 6:
                    exp   = "topara_locator_dictionary";
                    inner = "text";
                    fail  = CheckStyleandInnerText(item, exp, inner);
                    break;

                case 7:
                    exp   = "topara_locator_dictionary";
                    inner = "text";
                    fail  = CheckStyleandInnerText(item, exp, inner);
                    break;

                case 8:
                    exp   = "locator_dictionary";
                    inner = "parent text";
                    fail  = CheckStyleandInnerText(item, exp, inner);
                    break;

                default:
                    break;
                }
                counter++;
                if (fail)
                {
                    Assert.Fail("InlineBlock Test Failed");
                }
            }
        }
        public void PseudoQuotes1_Node()
        {
            const string file = "PseudoQuotes1";

            _projInfo.ProjectInputType = "Dictionary";
            string styleOutput = GetStyleOutput(file);

            //_validate = new ValidateXMLFile(styleOutput);
            //_validate.ClassName = "d..before_letHead_letHead1_dicBody";
            //_validate.ClassProperty.Add("fo:color", "#ff0000");
            //bool returnValue = _validate.ValidateNodeAttributesNS(false);
            //Assert.IsTrue(returnValue);

            //_validate.ClassName = "d..after_letHead_letHead1_dicBody";
            //_validate.ClassProperty.Add("fo:color", "#ff0000");
            //returnValue = _validate.ValidateNodeAttributesNS(false);
            //Assert.IsTrue(returnValue);

            //Content Test 
            _validate = new ValidateXMLFile(_projInfo.TempOutputFolder);
            string content = "\\U8658 A a \". " + Common.ConvertUnicodeToString("\\2666") + "\" B b \". \" C c ' ** ' ** D d # v \" v =\"\" \\ ' E e \"^ F f $@ G g ! ";
            XmlNode officeNode = _validate.GetOfficeNode();
            Assert.IsNotNull(officeNode, "Office node is null");
            Assert.AreEqual(content, officeNode.InnerText, "PseudoQuotes1 Test failed");

        }
        private void InLineMethod()
        {
            _validate = new ValidateXMLFile(_projInfo.TempOutputFolder);
            XmlNode x = _validate.GetOfficeNode();
            bool fail = false;

            int counter = 1;
            string exp;
            string inner;
            foreach (XmlNode item in x.ChildNodes)
            {
                switch (counter)
                {
                    case 3:
                        exp = "locator_dictionary";
                        inner = "parent text div div parent text";
                        fail = CheckStyleandInnerText(item, exp, inner);
                        break;

                    case 4:
                        exp = "locator_locator_dictionary";
                        inner = "parent text";
                        fail = CheckStyleandInnerText(item, exp, inner);
                        break;

                    case 5:
                        exp = "locator_dictionary";
                        inner = "parent text";
                        fail = CheckStyleandInnerText(item, exp, inner);
                        break;

                    case 6:
                        exp = "topara_locator_dictionary";
                        inner = "text";
                        fail = CheckStyleandInnerText(item, exp, inner);
                        break;

                    case 7:
                        exp = "topara_locator_dictionary";
                        inner = "text";
                        fail = CheckStyleandInnerText(item, exp, inner);
                        break;

                    case 8:
                        exp = "locator_dictionary";
                        inner = "parent text";
                        fail = CheckStyleandInnerText(item, exp, inner);
                        break;

                    default:
                        break;

                }
                counter++;
                if (fail)
                {
                    Assert.Fail("InlineBlock Test Failed");
                }
            }
        }