103 lines
5.8 KiB
C#
103 lines
5.8 KiB
C#
using System;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace TestMemoryApp
|
|
{
|
|
class Program
|
|
{
|
|
//TEST CONFIGURATION
|
|
private static string PDFProcessFolder { get { return @"C:\ReportisticaTrimestrale\PDF"; } }
|
|
private static string PDFOutputFolder { get { return @"C:\ReportisticaTrimestrale\PDFtoDB"; } }
|
|
private static string ZipFolder { get { return @"C:\ReportisticaTrimestrale\SELECTA\"; } }
|
|
private static string ZipBackupFolder { get { return @"C:\ReportisticaTrimestrale\SEND\"; } }
|
|
private static string WorkFolder { get { return ZipFolder + @"temp\"; } }
|
|
private static string GestorePDFLocation { get { return @"C:\Projekty\Fideuram\ContrattoSEI\GestorePDF_NuoviSviluppi\bin\Debug\GestorePDF.exe"; } }
|
|
|
|
//static string FtpServer = @"ftp://10.0.3.189"; //your ftp server
|
|
//static string FtpUser = "pkowalski@hpe.com";
|
|
//static string FtpPassword = "haslo";
|
|
|
|
private static string[,] TestSamples
|
|
{
|
|
get
|
|
{
|
|
string[,] test_samples = new string[41, 2]; //codice,rete
|
|
|
|
test_samples[0, 0] = "DRSGRG58P10F241S"; test_samples[0, 1] = "F";
|
|
test_samples[1, 0] = "FNCNRM57H15F205I"; test_samples[1, 1] = "F";
|
|
test_samples[2, 0] = "FRRLRD50D16D150B"; test_samples[2, 1] = "F";
|
|
test_samples[3, 0] = "DLLLCU68C22L682C"; test_samples[3, 1] = "F";
|
|
test_samples[4, 0] = "GLLPRN37C13H473T"; test_samples[4, 1] = "F";
|
|
test_samples[5, 0] = "GDURRT61P13F205Y"; test_samples[5, 1] = "F";
|
|
test_samples[6, 0] = "FRRRST43T21L048T"; test_samples[6, 1] = "F";
|
|
test_samples[7, 0] = "GFNNCL71A31E625V"; test_samples[7, 1] = "F";
|
|
|
|
test_samples[8, 0] = "BCCFBA48L19E463D"; test_samples[8, 1] = "F";
|
|
test_samples[9, 0] = "BCCFMN35C62B519D"; test_samples[9, 1] = "F";
|
|
test_samples[10, 0] = "BCCFNC30H12L219Y"; test_samples[10, 1] = "F";
|
|
test_samples[11, 0] = "BCCFNC44C29C814C"; test_samples[11, 1] = "F";
|
|
test_samples[12, 0] = "BCCFNC67D28G568Y"; test_samples[12, 1] = "F";
|
|
test_samples[13, 0] = "BCCFNN35L08H501W"; test_samples[13, 1] = "F";
|
|
test_samples[14, 0] = "BCCFNN70H50L219T"; test_samples[14, 1] = "F";
|
|
test_samples[15, 0] = "BCCFPP78H19G999V"; test_samples[15, 1] = "F";
|
|
test_samples[16, 0] = "BCCFST33L11F453G"; test_samples[16, 1] = "F";
|
|
test_samples[17, 0] = "BCCFST51L26H225B"; test_samples[17, 1] = "F";
|
|
test_samples[18, 0] = "BCCGCR34S26H710X"; test_samples[18, 1] = "F";
|
|
test_samples[19, 0] = "BCCGCR40L30H501U"; test_samples[19, 1] = "F";
|
|
test_samples[20, 0] = "BCCGCR52M16D612E"; test_samples[20, 1] = "F";
|
|
test_samples[21, 0] = "BCCGCR58C10H683W"; test_samples[21, 1] = "F";
|
|
test_samples[22, 0] = "BCCGCR62E31L117P"; test_samples[22, 1] = "F";
|
|
test_samples[23, 0] = "BCCGDU65E08G674V"; test_samples[23, 1] = "F";
|
|
test_samples[24, 0] = "BCCGGG53D13L219Z"; test_samples[24, 1] = "F";
|
|
test_samples[25, 0] = "BCCGLC63C24L219N"; test_samples[25, 1] = "F";
|
|
test_samples[26, 0] = "BCCGLD34D13A182H"; test_samples[26, 1] = "F";
|
|
test_samples[27, 0] = "BCCGLG55E28A182G"; test_samples[27, 1] = "F";
|
|
test_samples[28, 0] = "BCCGLN47P21I187G"; test_samples[28, 1] = "F";
|
|
test_samples[29, 0] = "BCCGLN49L62C750K"; test_samples[29, 1] = "F";
|
|
test_samples[30, 0] = "BCCGMR41P70A163E"; test_samples[30, 1] = "F";
|
|
test_samples[31, 0] = "BCCGNN27L23G337A"; test_samples[31, 1] = "F";
|
|
test_samples[32, 0] = "BCCGNN34E09I512K"; test_samples[32, 1] = "F";
|
|
test_samples[33, 0] = "BCCGNN35T57G713V"; test_samples[33, 1] = "F";
|
|
test_samples[34, 0] = "BCCGNN42R11F205L"; test_samples[34, 1] = "F";
|
|
test_samples[35, 0] = "BCCGNN43B12I002A"; test_samples[35, 1] = "F";
|
|
test_samples[36, 0] = "BCCGNN44C11A291B"; test_samples[36, 1] = "F";
|
|
test_samples[37, 0] = "BCCGNN45A57F033V"; test_samples[37, 1] = "F";
|
|
test_samples[38, 0] = "BCCGNN56M14C265P"; test_samples[38, 1] = "F";
|
|
test_samples[39, 0] = "BCCGNR49A21L628O"; test_samples[39, 1] = "F";
|
|
test_samples[40, 0] = "BCCGPL48A12E730Y"; test_samples[40, 1] = "F";
|
|
|
|
return test_samples;
|
|
}
|
|
}
|
|
|
|
private static int NumberOfConcurrentGestorePDFProcesses { get { return 1; } }
|
|
private static int NumberOfFiscalCodesPerFile { get { return 3; } }
|
|
static void Main(string[] args)
|
|
{
|
|
string tempFolder = PDFProcessFolder;
|
|
string zipFolder = ZipFolder;
|
|
string pdfOutputFolder = PDFOutputFolder;
|
|
|
|
int maxProcessiGestorePDF = NumberOfConcurrentGestorePDFProcesses;
|
|
string pathProcesso = GestorePDFLocation;
|
|
|
|
Utils.DeleteFiles(zipFolder);
|
|
Utils.DeleteFiles(pdfOutputFolder);
|
|
Utils.DeleteFiles(tempFolder);
|
|
|
|
if (!Utils.ProduceTestSamples(TestSamples))
|
|
Assert.Fail("can't produce test samples");
|
|
|
|
GestorePDF.Logic.ThreadManager m = new GestorePDF.Logic.ThreadManager();
|
|
m.Main();
|
|
int files_ctr = Utils.CountFiles(PDFProcessFolder, "pdf");
|
|
if (files_ctr < TestSamples.GetLength(0))
|
|
Console.WriteLine("Number of records in Output Folder should be greater of equal the number of samples.");
|
|
|
|
Console.WriteLine("Files are ok.");
|
|
Console.WriteLine("Program ended at: {0}", DateTime.Now);
|
|
Console.ReadKey();
|
|
}
|
|
}
|
|
}
|