Beispiel #1
0
 private static void FetchProductionInfo(out string file, string allSriptStepFileLoc, out CsvHelper.CsvReader destinationReader, out List <ComparingFile> comparingFile)
 {
     ExcelToCSVCoversion(allSriptStepFileLoc, out file);
     destinationReader = new CsvHelper.CsvReader(File.OpenText(file + ".csv"));
     destinationReader.Read();
     destinationReader.ReadHeader();
     comparingFile = new List <ComparingFile>();
     while (destinationReader.Read())
     {
         var destinationReadersource = new ComparingFile(destinationReader);
         comparingFile.Add(destinationReadersource);
     }
 }
Beispiel #2
0
        static bool Compare(SourceExcel sourceExcel, ComparingFile comparingFile)
        {
            bool result = true;

            if (!sourceExcel.HRAE.Equals(comparingFile.HRAE))
            {
                Console.WriteLine(string.Format("HRAE Final : {0} Production : {1}", sourceExcel.HRAE, comparingFile.HRAE));
                result = false;
            }
            if (!sourceExcel.ResultType.Equals(comparingFile.ResultType))
            {
                Console.WriteLine(string.Format("ResultType Final : {0} Production : {1}", sourceExcel.ResultType, comparingFile.ResultType));
                result = false;
            }
            if (!sourceExcel.ScriptStep.Equals(comparingFile.ScriptStep))
            {
                Console.WriteLine(string.Format("ScriptStep Final : {0} Production : {1}", sourceExcel.ScriptStep, comparingFile.ScriptStep));
                result = false;
            }
            if (!sourceExcel.ScriptStepId.Equals(comparingFile.ScriptStepId))
            {
                Console.WriteLine(string.Format("ScriptStepId Final : {0} Production : {1}", sourceExcel.ScriptStepId, comparingFile.ScriptStepId));
                result = false;
            }
            if (!sourceExcel.Section.Equals(comparingFile.Section))
            {
                Console.WriteLine(string.Format("Section Final : {0} Production : {1}", sourceExcel.Section, comparingFile.Section));
                result = false;
            }
            if (!sourceExcel.Sequence.Equals(comparingFile.Sequence))
            {
                Console.WriteLine(string.Format("HRAE Sequence : {0} Production : {1}", sourceExcel.Sequence, comparingFile.Sequence));
                result = false;
            }
            if (!sourceExcel.ShowComments.Equals(comparingFile.ShowComments))
            {
                Console.WriteLine(string.Format("ShowComments Final : {0} Production : {1}", sourceExcel.ShowComments, comparingFile.ShowComments));
                result = false;
            }
            if (!sourceExcel.StepResultValues.Equals(comparingFile.StepResultValues))
            {
                Console.WriteLine(string.Format("StepResultValues Final : {0} Production : {1}", sourceExcel.StepResultValues, comparingFile.StepResultValues));
                result = false;
            }
            if (!sourceExcel.TestScript.Equals(comparingFile.TestScript))
            {
                Console.WriteLine(string.Format("TestScript Final : {0} Production : {1}", sourceExcel.TestScript, comparingFile.TestScript));
                result = false;
            }
            return(result);
        }