public void TestTopDrop2GCell(int btsId, byte sectorId, short frequency,
                                      string cellName, int drops, int year, int month, int day, int hour, int cellId)
        {
            TopDrop2GCellExcel cellExcel = new TopDrop2GCellExcel
            {
                BtsId     = btsId,
                SectorId  = sectorId,
                Frequency = frequency,
                CellName  = cellName,
                Drops     = drops,
                StatDate  = new DateTime(year, month, day),
                StatHour  = hour
            };
            TopDrop2GCell cell = new TopDrop2GCell();

            cell.Import(cellExcel);
            Assert.AreEqual(cell.BtsId, btsId);
            Assert.AreEqual(cell.SectorId, sectorId);
            Assert.AreEqual(cell.Frequency, frequency);
            Assert.AreEqual(cell.CellId, cellId);
            Assert.AreEqual(cell.Drops, drops);
            Assert.AreEqual(cell.StatTime.Year, year);
            Assert.AreEqual(cell.StatTime.Month, month);
            Assert.AreEqual(cell.StatTime.Day, day);
            Assert.AreEqual(cell.StatTime.Hour, hour);
        }
Beispiel #2
0
 public void TestTopDrop2GCell(int btsId, byte sectorId, short frequency,
     string cellName, int drops, int year, int month, int day, int hour, int cellId)
 {
     TopDrop2GCellExcel cellExcel = new TopDrop2GCellExcel
     {
         BtsId = btsId,
         SectorId = sectorId,
         Frequency = frequency,
         CellName = cellName,
         Drops = drops,
         StatDate = new DateTime(year, month, day),
         StatHour = hour
     };
     TopDrop2GCell cell = new TopDrop2GCell();
     cell.Import(cellExcel);
     Assert.AreEqual(cell.BtsId, btsId);
     Assert.AreEqual(cell.SectorId, sectorId);
     Assert.AreEqual(cell.Frequency, frequency);
     Assert.AreEqual(cell.CellId, cellId);
     Assert.AreEqual(cell.Drops, drops);
     Assert.AreEqual(cell.StatTime.Year, year);
     Assert.AreEqual(cell.StatTime.Month, month);
     Assert.AreEqual(cell.StatTime.Day, day);
     Assert.AreEqual(cell.StatTime.Hour, hour);
 }
Beispiel #3
0
 public static TopDrop2GCell ConstructStat(TopDrop2GCellExcel cellExcel)
 {
     return(Mapper.Map <TopDrop2GCellExcel, TopDrop2GCell>(cellExcel));
 }
        public TopDrop2GCell Match(TopDrop2GCellExcel stat)
        {
            var time = stat.StatDate.AddHours(stat.StatHour);

            return(FirstOrDefault(x => x.BtsId == stat.BtsId && x.SectorId == stat.SectorId && x.StatTime == time));
        }