Exemplo n.º 1
0
 private void Import(List<CdrTaRecord> details, CdrRtdRecord record)
 {
     ImportCdrTaRecordsService service = new ImportMainCdrTaRecordsService(details, record);
     service.Import();
     service = new ImportExcessCdrTaRecordsService(details, record);
     service.Import();
 }
 public void TestImport_EmptyDetailList_ImportOneRecord()
 {
     InitializeEmptyDetailsList();
     CdrRtdRecord record = InitializeRecord(1, 2, 5.5);
     ImportCdrTaRecordsService service = new ImportExcessCdrTaRecordsService(
         details, record);
     service.Import();
     Assert.AreEqual(details.Count, 0);
 }
 public void TestImport_OneElementDetailList_ImportSameRecord()
 {
     InitializeEmptyDetailsList();
     CdrRtdRecord record = InitializeRecord(1, 2, 5.5);
     ImportCdrTaRecordsService service = new ImportMainCdrTaRecordsService(
         details, record);
     service.Import();
     service = new ImportExcessCdrTaRecordsService(
         details, record);
     service.Import();
     helper.AssertImportUniqueRecordResults(details, record);
 }
 public void TestImport_OneElementDetailList_ImportOneRecord_WithSameCell()
 {
     for (int rtd = 800; rtd < 3000; rtd += 100)
     {
         InitializeEmptyDetailsList();
         CdrRtdRecord record1 = InitializeRecord(1, 2, InterferenceStat.LowerBound/2);
         ImportCdrTaRecordsService service = new ImportMainCdrTaRecordsService(
             details, record1);
         service.Import();
         CdrRtdRecord record2 = InitializeRecord(1, 2, rtd);
         service = new ImportExcessCdrTaRecordsService(
             details, record2);
         service.Import();
         helper.AssertImportUniqueRecordResults(details, record1, record2);
     }
 }
Exemplo n.º 5
0
 protected override void GenerateDetails()
 {
     foreach (StreamReader reader in _paths.Select(path => new StreamReader(path)))
     {
         Import(reader, x =>
         {
             ImportCdrTaRecordsService service = new ImportMainCdrTaRecordsService(
                 _details, x);
             service.Import();
         });
         reader.Close();
     }
     foreach (StreamReader reader in _paths.Select(path => new StreamReader(path)))
     {
         Import(reader, x =>
         {
             ImportCdrTaRecordsService service = new ImportExcessCdrTaRecordsService(
                 _details, x);
             service.Import();
         });
         reader.Close();
     }
 }
 protected override void GenerateDetails()
 {
     foreach (StreamReader reader in _paths.Select(path => new StreamReader(path)))
     {
         Import(reader, x =>
         {
             ImportCdrTaRecordsService service = new ImportMainCdrTaRecordsService(
                 _details, x);
             service.Import();
         });
         reader.Close();
     }
     foreach (StreamReader reader in _paths.Select(path => new StreamReader(path)))
     {
         Import(reader, x =>
         {
             ImportCdrTaRecordsService service = new ImportExcessCdrTaRecordsService(
                 _details, x);
             service.Import();
         });
         reader.Close();
     }
 }