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