Exemplo n.º 1
0
    private void ImportFromFile(string fileName)
    {
      string file = TestData.GetTestFile(fileName);
      Assert.IsTrue(File.Exists(file));

      var csvParserService = new CsvParserService();
      var csvModels = csvParserService.GetCsvModels(file).ToArray();
      var service = GetService();

      foreach (var csvModel in csvModels)
        service.Import(csvModel);
    }
Exemplo n.º 2
0
    public void CsvWriterServiceTest_Write_CsvModels()
    {
      var models = new CsvParserService().GetCsvModels(TestData.GetTestFile("Unclassified Document.csv")).ToArray();

      var service = GetService();

      using (var sw = new StringWriter())
      {
        service.Write(models, sw);
        Debug.Write(sw.ToString());
      }
    }
Exemplo n.º 3
0
    public void CsvImporterServiceTest_Import_Unclassified_Test()
    {
      string file = TestData.GetTestFile("Unclassified Document.csv");
      Assert.IsTrue(File.Exists(file));

      var csvParserService = new CsvParserService();
      var csvModels = csvParserService.GetCsvModels(file).ToArray();

      var service = GetService();
      foreach (var csvModel in csvModels)
      {
        Debug.Write(csvModel);

        service.Import(csvModel);
      }
    }