static void Main(string[] args) { DateTime inicio = DateTime.Now; Venda venda = new Venda(); CSVService a = new CSVService(); string desktop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); string folderPath = Path.Combine(desktop, "testeCSV/"); string filePath = ""; VendaTask vendaTask = new VendaTask(); //a.GerarMassaDados(folderPath, 30); for (int i = 0; i < 3000; i++) { filePath = Path.Combine(desktop, "testeCSV/Venda" + i + ".csv"); var s = a.LeiturasDeDados(filePath); foreach (var item in s) { Debug.Write(item.Id); } vendaTask.TaskLeitura(filePath); } DateTime fim = DateTime.Now; TimeSpan x = fim - inicio; Console.WriteLine(x); Console.ReadKey(); }
public void ApplService_VendaTask_Inicializador() { CaminhoPastaDeVendas = ConfigurationManager.AppSettings["CaminhoPastaVendas"]; CaminhoPastaDeVendasValidas = ConfigurationManager.AppSettings["CaminhoPastaVendasValidas"]; CaminhoPastaDeVendasInvalidas = ConfigurationManager.AppSettings["CaminhoPastaVendasInvalidas"]; _vendaService = new Mock <IVendaService>(); _vendaRepositorio = new Mock <IVendaRepository>(); _vendaTask = new VendaTask(_vendaService.Object); _csvService = new CSVService(); _venda = new Mock <Venda>(); }