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"); }
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)); }
public static TopConnection3GCell ConstructStat(TopConnection3GCellExcel cellExcel) { return(Mapper.Map <TopConnection3GCellExcel, TopConnection3GCell>(cellExcel)); }