Пример #1
0
        public void Test_Constructor(string statTime, int cellId, byte sectorId, int totalMrs, double firstRate,
                                     double secondRate, double thirdRate)
        {
            var info = new PreciseCoverage4GCsv
            {
                StatTime           = DateTime.Parse(statTime),
                CellId             = cellId,
                SectorId           = sectorId,
                TotalMrs           = totalMrs,
                FirstNeighborRate  = firstRate,
                SecondNeighborRate = secondRate,
                ThirdNeighborRate  = thirdRate
            };
            var stat = PreciseCoverage4G.ConstructStat(info);

            Assert.AreEqual(stat.StatTime, DateTime.Parse(statTime));
            Assert.AreEqual(stat.CellId, cellId);
            Assert.AreEqual(stat.SectorId, sectorId);
            Assert.AreEqual(stat.TotalMrs, totalMrs);
            Assert.AreEqual(stat.FirstNeighbors, (int)(totalMrs * firstRate) / 100);
            Assert.AreEqual(stat.SecondNeighbors, (int)(totalMrs * secondRate) / 100);
            Assert.AreEqual(stat.ThirdNeighbors, (int)(totalMrs * thirdRate) / 100);
        }