예제 #1
0
        public void ThenIVerifyThatTheDataInBothXMLFilesIsSame_()
        {
            List <string> Tags   = new List <string>();
            List <string> Fields = new List <string>();
            string        Msg;
            string        File1 = ScenarioContext.Current["XMLFileNameInProject"].ToString();
            string        File2 = ScenarioContext.Current["XMLFileNameInTestFolder"].ToString();

            if (!XMLActionUtilities.CompareDataIn2XMLFiles(File1, File2, Tags, Fields, out Msg))
            {
                ScenarioContext.Current["Comments"]  = ScenarioContext.Current["Comments"] + "Failed to verify data in the actual and expected XML files. \n" + Msg + "\n";
                ScenarioContext.Current["ActResult"] = "Failed";
            }
        }
예제 #2
0
        public void ThenIVerifyThatTheDataInBothXMLFilesIsSameExceptForBelowTagsAndFields_(Table table)
        {
            List <string> Tags   = table.Rows.Select(l => l["TagName"]).ToList();
            List <string> Fields = table.Rows.Select(l => l["FieldName"]).ToList();
            string        Msg;

            Tags.Remove("");
            Fields.Remove("");
            string File1       = ScenarioContext.Current["XMLFileNameInProject"].ToString();
            string File2Folder = FeatureContext.Current["ReportsFolderPath"].ToString();
            string File2Name   = ScenarioContext.Current["XMLFileNameInTestFolder"].ToString();
            string File2       = File2Folder + "\\" + File2Name;

            if (!XMLActionUtilities.CompareDataIn2XMLFiles(File1, File2, Tags, Fields, out Msg))
            {
                ScenarioContext.Current["Comments"]  = ScenarioContext.Current["Comments"] + "Failed to verify data in the actual and expected XML files. \n" + Msg + "\n";
                ScenarioContext.Current["ActResult"] = "Failed";
            }
        }