コード例 #1
0
        public void Setup()
        {
            string relativePath = Path.Combine(
                AppDomain.CurrentDomain.BaseDirectory,
                "..",
                "..",
                "..",
                "Import"
                );

            string importPath = Path.Combine(relativePath, "employee-payroll-data.csv");

            _records = CsvImporter.ImportPayRecords(importPath);
        }
コード例 #2
0
        public string[] ReadCSV()
        {
            //The csv employee-payroll-data.csv file gets transported into List<PayRecord>
            List <PayRecord> payRecord = CsvImporter.ImportPayRecords(importFileLocation);

            //A name of the file that will be used for outputs is created
            //The file name looks like this: {637381283525934083}-records.csv
            //The big number in the middle 637381283525934083 is a unique number that counts the current number of ticks since 1st Jan 1970.
            string filename = outputFileLocation + ("{" + DateTime.Now.Ticks.ToString() + "}-records.csv");;

            string[] output = PayRecordWriter.Write(filename, payRecord, true);

            return(output);
        }
コード例 #3
0
ファイル: Tests.cs プロジェクト: ottowoolf/SalaryCalculator
 public void Setup()
 {
     hours    = new double[] { 2, 3, 3, 4, 5, 6 };
     rates    = new double[] { 25, 25, 25, 25, 32, 32 };
     _records = CsvImporter.ImportPayRecords(GetInputPath());
 }
コード例 #4
0
ファイル: Tests.cs プロジェクト: Julie-Lam/Payroll_Calculator
 public void Setup()
 {
     _records = CsvImporter.ImportPayRecords(@"import\employee-payroll-data.csv");
 }