public void InvalidMissingField() { string input = "TestFiles\\invalid_missingfield.csv"; string output = "invalid_missingfield.json"; char separator = ','; var cx = new CsvImport(input, output, separator); Assert.ThrowsException <Exception>(() => cx.Parse()); }
public void InvalidMultipleOrder() { string input = "TestFiles\\invalid_multiple_order.csv"; string output = "invalid_multiple_order.json"; char separator = ','; var cx = new CsvImport(input, output, separator); Assert.ThrowsException <NotImplementedException>(() => cx.Parse()); }
public void ValidSingleOrder() { string input = "TestFiles\\valid_single_order.csv"; string output = "valid_single_order.json"; char separator = ','; var cx = new CsvImport(input, output, separator); cx.Parse(); string errors = cx.ValidateImport(); var fn = cx.SaveOutputToFile(); TestFileCleanup(fn); Assert.IsTrue(string.IsNullOrWhiteSpace(errors)); }