Beispiel #1
0
        public void When_CheckPreviosSibling_Method_call_it_should_not_be_null()
        {
            AtAddNodeAddCs_ParentAttributeAndParentPointer atAddNodeAddCsParentAttributeAndParentPointer = new AtAddNodeAddCs_ParentAttributeAndParentPointer();
            XElement diffXDoc = XElement.Parse("<xd:xmldiff version=\"1.0\" srcDocHash=\"1760821081405616385\" options=\"None\" fragments=\"no\" xmlns:xd=\"http://schemas.microsoft.com/xmltools/2002/xmldiff\"><xd:node match=\"1\" cs_base=\"true\"><xd:change match=\"1\" name=\"yy\" cs_parent=\"1\" /><xd:node match=\"3\" /><xd:add><e>Some text 4</e><f>Some text 5</f></xd:add><xd:node match=\"4\"><xd:change match=\"1\" cs_parent=\"1/4\">Changed text</xd:change><xd:remove match=\"2\" cs_parent=\"1/4\" /></xd:node><xd:node match=\"5\"><xd:remove match=\"@secondAttr\" cs_parent=\"1/5\" /><xd:add type=\"2\" name=\"newAttr\">new value</xd:add><xd:change match=\"@firstAttr\" cs_parent=\"1/5\">changed attribute value</xd:change></xd:node><xd:remove match=\"6\" opid=\"1\" cs_parent=\"1\" /><xd:add type=\"1\" name=\"p\"><xd:add type=\"1\" name=\"q\"><xd:add match=\"/1/6\" opid=\"1\" /></xd:add></xd:add></xd:node><xd:descriptor opid=\"1\" type=\"move\" /></xd:xmldiff>");

            Assert.AreNotEqual(null, atAddNodeAddCsParentAttributeAndParentPointer.CheckPreviosSibling(diffXDoc.Descendants().First(x => x.Name.LocalName == "add")).ToString());
        }
Beispiel #2
0
        public void When_GetFamilyOfAdd_Method_call_it_should_not_be_null()
        {
            AtAddNodeAddCs_ParentAttributeAndParentPointer atAddNodeAddCsParentAttributeAndParentPointer = new AtAddNodeAddCs_ParentAttributeAndParentPointer();
            XDocument diffXDoc = XDocument.Parse("<xd:xmldiff version =\"1.0\" srcDocHash=\"3651185247969030976\" options=\"None\" fragments=\"no\" xmlns:xd=\"http://schemas.microsoft.com/xmltools/2002/xmldiff\"><xd:node match =\"1\" cs_base=\"true\"><xd:node match =\"1\" /><xd:add><b>Some text 2</b><c>Some text 3</c></xd:add></xd:node></xd:xmldiff>");

            Assert.AreNotEqual(null, atAddNodeAddCsParentAttributeAndParentPointer.AddCsParentAndParentPointerAtFamilyOfAddNode(diffXDoc).ToString());
        }