Esempio 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);
     }
 }