Beispiel #1
0
        }   // MaxStringLength_Test_Case


        private static void MergeNewItemsIntoArray_Tests ( )
        {
            int intTestNumber = MagicNumbers.ZERO;

            Console.WriteLine (
                SharedUtl4_TestStand.Properties.Resources.IDS_MERGENEWITEMSINTOARRAY_BEGIN ,
                Environment.NewLine );
            string strInitialMasterFile = Path.Combine (
                rs_strDataDirectory ,
                Properties.Settings.Default.MergeNewItemsIntoArray_Master );
            string strOutputFilenmetemplate = Properties.Settings.Default.MergeNewItemsIntoArray_Outputs;

            string strNewItemsListFileSpec = Properties.Settings.Default.MergeNewItemsIntoArray_Cases;
            int intMaxDigitsInCaseNumber = TestCaseMaxDigits ( strNewItemsListFileSpec );
            string strSummaryFileFQFN = Path.Combine (
                rs_strDataDirectory ,
                Properties.Settings.Default.MergeNewItemsIntoArray_Summary );
            string strOutputFileFQFN = null;
            string strInputFileName = null;
            string strReportLabels = MergeNewItemsIntoArray_Tester.ReportLabels.Replace (
				SpecialCharacters.TAB_CHAR ,
                SpecialCharacters.PIPE_CHAR );
            List<string> lstReportDetails = new List<string> ( );
            lstReportDetails.Add ( strReportLabels );

            string strReportDetailTemplate = ReportHelpers.DetailTemplateFromLabels (
                strReportLabels ,
                SpecialCharacters.PIPE_CHAR );
            foreach ( string strNewDataFile in Directory.GetFiles ( rs_strDataDirectory , strNewItemsListFileSpec , SearchOption.TopDirectoryOnly ) )
            {
                strInputFileName = SelectInputFle (
                    intTestNumber ,
                    strInitialMasterFile ,
                    strOutputFileFQFN );
                strOutputFileFQFN = MergeOutputFQFN (
                    strOutputFilenmetemplate ,
                    rs_strDataDirectory ,
                    intMaxDigitsInCaseNumber ,
                    ++intTestNumber );

                MergeNewItemsIntoArray_Tester mergetester = new MergeNewItemsIntoArray_Tester (
                    strInputFileName ,
                    strNewDataFile ,
                    strOutputFileFQFN ,
                    lstReportDetails ,
                    strReportDetailTemplate );
                MergeNewItemsIntoArray_Test_Case (
                    mergetester ,
                    ref intTestNumber );
            }   // foreach ( string strNewDataFile in Directory.GetFiles ( rs_strDataDirectory , strNewItemsListFileSpec , SearchOption.TopDirectoryOnly ) )

            string [ ] astrSummaryReport = new string [ lstReportDetails.Count ];
            lstReportDetails.CopyTo ( astrSummaryReport );
            File.WriteAllLines (
                strSummaryFileFQFN , 
                astrSummaryReport );
            Console.WriteLine (
                SharedUtl4_TestStand.Properties.Resources.IDS_MERGENEWITEMSINTOARRAY_END ,
                Environment.NewLine );
        }   // MergeNewItemsIntoArray_Tests
Beispiel #2
0
        }   // MergeNewItemsIntoArray_Tests


        private static void MergeNewItemsIntoArray_Test_Case (
            MergeNewItemsIntoArray_Tester pTestKit ,
            ref int pintTestNumber )
        {
            Console.WriteLine (
                SharedUtl4_TestStand.Properties.Resources.IDS_TEST_BEGIN ,
                pintTestNumber ,
                Environment.NewLine );

            pTestKit.Go ( );

            Console.WriteLine (
                SharedUtl4_TestStand.Properties.Resources.IDS_TEST_END ,
                pintTestNumber ,
                Environment.NewLine );
        }   // MergeNewItemsIntoArray_Test_Case