public void TestCoverageAdjustment() { CoverageAdjustment ca = new CoverageAdjustment(); TestAjustFactor(ca, -180, 9, x => x.Factor165m); TestAjustFactor(ca, -164, 9, x => x.Factor165m); TestAjustFactor(ca, -149, 9, x => x.Factor135m); TestAjustFactor(ca, 35, 9, x => x.Factor45); }
private static CoverageAdjustment CalculateAdjumentFromCell(this CoverageStat coveragePoint, IOutdoorCell cell, byte modBase = 3) { MeasurableCell mCell = new MeasurableCell(coveragePoint, cell, modBase); mCell.CalculateRsrp(); CoverageAdjustment adjustment = new CoverageAdjustment { ENodebId = coveragePoint.ENodebId, SectorId = coveragePoint.SectorId, Frequency = coveragePoint.Earfcn }; adjustment.SetAdjustFactor(mCell.Cell.AzimuthAngle, mCell.ReceivedRsrp - coveragePoint.Rsrp); return adjustment; }
private void TestAjustFactor(CoverageAdjustment ca, double azimuth, double factor, Func<CoverageAdjustment, double> property) { ca.SetAdjustFactor(azimuth, factor); Assert.AreEqual(property(ca), factor); }