public static void WriteFile(string filePath, string outputPath) { try { foreach (var Line in ReadFile(filePath)) { str_Array = BusinessRules.ReadLines(Line).Split('\t'); if (BusinessRules.CheckDate(str_Array[2])) { writeText += BusinessRules.ReadLines(Line) + "\t" + BusinessRules.SalaryIncreament(str_Array[3]) + "\r\n"; } else { writeText += BusinessRules.ReadLines(Line) + "\t" + str_Array[3] + "\r\n"; } } File.AppendAllText(outputPath, writeText.ToString()); } catch (Exception ex) { throw ex; } }
public void CheckDateTest() { Assert.AreEqual(true, BusinessRules.CheckDate("10-12-2017")); }