예제 #1
0
 public void TestEmptyMrsRecordSet(string contents, string recordDate)
 {
     using (StreamReader reader = contents.GetStreamReader())
     {
         MrsRecordSet recordSet = new MrsRecordSet(reader);
         Assert.AreEqual(recordSet.MrsCells.Count, 0);
         Assert.AreEqual(recordSet.ENodebId, 0);
         Assert.AreEqual(recordSet.RecordDate, DateTime.Parse(recordDate));
     }
 }
예제 #2
0
 public void TestEmptyMrsRecordSet(string contents, string recordDate)
 {
     using (StreamReader reader = contents.GetStreamReader())
     {
         MrsRecordSet recordSet=new MrsRecordSet(reader);
         Assert.AreEqual(recordSet.MrsCells.Count, 0);
         Assert.AreEqual(recordSet.ENodebId, 0);
         Assert.AreEqual(recordSet.RecordDate, DateTime.Parse(recordDate));
     }
 }
 private Task ImportMrsFiles(IEnumerable <string> files)
 {
     return(Task.Run(() =>
                     mrsFilesImporter.Import(files,
                                             path =>
     {
         MrsRecordSet recordSet;
         using (StreamReader reader = new StreamReader(path))
         {
             recordSet = new MrsRecordSet(reader);
         }
         return recordSet;
     })));
 }
예제 #4
0
 public void TestMrsRecordSet(string contents, int cellCounts, int eNodebId, string recordDate,
                              int[] rsrpCount1, int[] rsrpCount5)
 {
     using (StreamReader reader = contents.GetStreamReader())
     {
         MrsRecordSet recordSet = new MrsRecordSet(reader);
         Assert.AreEqual(recordSet.MrsCells.Count, cellCounts);
         Assert.AreEqual(recordSet.ENodebId, eNodebId);
         Assert.AreEqual(recordSet.RecordDate, DateTime.Parse(recordDate));
         for (int i = 0; i < cellCounts; i++)
         {
             Assert.AreEqual(recordSet.MrsCells[i].RsrpCounts[1], rsrpCount1[i]);
             Assert.AreEqual(recordSet.MrsCells[i].RsrpCounts[5], rsrpCount5[i]);
         }
     }
 }
 private Task ImportMrsFiles(IEnumerable<string> files)
 {
     return Task.Run(() =>
         mrsFilesImporter.Import(files,
             path =>
             {
                 MrsRecordSet recordSet;
                 using (StreamReader reader = new StreamReader(path))
                 {
                     recordSet = new MrsRecordSet(reader);
                 }
                 return recordSet;
             }));
 }
예제 #6
0
 public void TestMrsRecordSet(string contents, int cellCounts, int eNodebId, string recordDate,
     int[] rsrpCount1, int[] rsrpCount5)
 {
     using (StreamReader reader = contents.GetStreamReader())
     {
         MrsRecordSet recordSet = new MrsRecordSet(reader);
         Assert.AreEqual(recordSet.MrsCells.Count, cellCounts);
         Assert.AreEqual(recordSet.ENodebId, eNodebId);
         Assert.AreEqual(recordSet.RecordDate, DateTime.Parse(recordDate));
         for (int i = 0; i < cellCounts; i++)
         {
             Assert.AreEqual(recordSet.MrsCells[i].RsrpCounts[1], rsrpCount1[i]);
             Assert.AreEqual(recordSet.MrsCells[i].RsrpCounts[5], rsrpCount5[i]);
         }
     }
 }
예제 #7
0
 public static void Import(this List<MrsCellTa> statList, MrsRecordSet recordSet)
 {
     foreach (MrsCell cell in recordSet.MrsCells)
     {
         MrsCellTa stat = statList.FirstOrDefault(x =>
             x.RecordDate == recordSet.RecordDate && x.CellId == cell.CellId && x.SectorId == cell.SectorId);
         if (stat == null)
         {
             statList.Add(new MrsCellTa
             {
                 RecordDate = recordSet.RecordDate,
                 CellId = cell.CellId,
                 SectorId = cell.SectorId,
                 TaCounts = cell.TaCounts
             });
         }
         else
             for (int i = 0; i < 45; i++)
                 stat.TaCounts[i] += cell.TaCounts[i];
     }
 }