コード例 #1
0
        public void Test_TopConnection3GCell()
        {
            var info = new TopConnection3GCellExcel
            {
                BtsId              = 112,
                CellName           = "abc[12345]",
                ConnectionAttempts = 3,
                ConnectionFails    = 4,
                Frequency          = 5,
                LinkBusyRate       = 6,
                SectorId           = 7,
                WirelessDrop       = 8,
                StatDate           = new DateTime(2016, 4, 1),
                StatHour           = 15,
                City = "Foshan"
            };
            var item = info.MapTo <TopConnection3GCell>();

            item.BtsId.ShouldBe(112);
            item.CellId.ShouldBe(12345);
            item.ConnectionAttempts.ShouldBe(3);
            item.ConnectionFails.ShouldBe(4);
            item.LinkBusyRate.ShouldBe(6);
            item.WirelessDrop.ShouldBe(8);
            item.StatTime.ShouldBe(new DateTime(2016, 4, 1, 15, 0, 0));
            item.City.ShouldBe("Foshan");
        }
コード例 #2
0
        public TopConnection3GCell Match(TopConnection3GCellExcel stat)
        {
            var time = stat.StatDate.AddHours(stat.StatHour);

            return(FirstOrDefault(x => x.BtsId == stat.BtsId && x.SectorId == stat.SectorId && x.StatTime == time));
        }
コード例 #3
0
 public static TopConnection3GCell ConstructStat(TopConnection3GCellExcel cellExcel)
 {
     return(Mapper.Map <TopConnection3GCellExcel, TopConnection3GCell>(cellExcel));
 }