public void TestInitialize() { MeasurePoint mPoint = FakeMeasurePoint.GenerateMeasurePoint( new IOutdoorCell[2] { mainCell, otherCell1 }, new byte[2] { 2, 1 }, new double[2] { -10, -12 }); mpcRelation = mPoint.GenerateMeasurePlanCellRelation(0.1); }
public void TestImportMeasurePoint_MainCellIsNotStrongest() { MeasurePoint mPoint = FakeMeasurePoint.GenerateMeasurePoint( new IOutdoorCell[2] { mainCell, otherCell2 }, new byte[2] { 1, 3 }, new double[2] { -11, -9 }); mpcRelation.ImportMeasurePoint(mPoint); Assert.AreEqual(mpcRelation.MainCell.ReceivePower, 0.1); Assert.AreEqual(mpcRelation.MainCell.Cell.Azimuth, 10); Assert.AreEqual(mpcRelation.InterferenceCells.Count, 1); Assert.AreEqual(mpcRelation.InterferenceCells[0].Cell.Azimuth, 70); }
public void TestImportMeasurePoint_SameCells() { MeasurePoint mPoint = FakeMeasurePoint.GenerateMeasurePoint( new IOutdoorCell[2] { mainCell, otherCell1 }, new byte[2] { 2, 1 }, new double[2] { -10, -12 }); mpcRelation.ImportMeasurePoint(mPoint); Assert.AreEqual(mpcRelation.MainCell.ReceivePower, 0.2); Assert.AreEqual(mpcRelation.MainCell.Cell.Azimuth, 10); Assert.AreEqual(mpcRelation.InterferenceCells.Count, 1); Assert.AreEqual(mpcRelation.InterferenceCells[0].Cell.Azimuth, 70); Assert.AreEqual(mpcRelation.InterferenceCells[0].ReceivePower, 0.126191, 1E-6); }
public static MeasurePoint GenerateMeasurePoint(IOutdoorCell[] cellList, byte[] pciModxList, double[] receivedRsrpList) { IList <MeasurableCell> mCellList = new List <MeasurableCell>(); for (int i = 0; i < cellList.Length; i++) { FakeMeasurableCell mmCell = new FakeMeasurableCell() { OutdoorCell = cellList[i], PciModx = pciModxList[i], ReceivedRsrp = receivedRsrpList[i] }; mCellList.Add(mmCell); } FakeMeasurePoint mmPoint = new FakeMeasurePoint() { MeasurableCellList = mCellList }; return(mmPoint.MeasurePoint); }
public static MeasurePoint GenerateMeasurePoint(IOutdoorCell[] cellList, byte[] pciModxList, double[] receivedRsrpList) { IList<MeasurableCell> mCellList = new List<MeasurableCell>(); for (int i = 0; i < cellList.Length; i++) { FakeMeasurableCell mmCell = new FakeMeasurableCell() { OutdoorCell = cellList[i], PciModx = pciModxList[i], ReceivedRsrp = receivedRsrpList[i] }; mCellList.Add(mmCell); } FakeMeasurePoint mmPoint = new FakeMeasurePoint() { MeasurableCellList = mCellList }; return mmPoint.MeasurePoint; }
public void TestImportMeasurePoint_SameMainCell_DifferentOtherCells() { MeasurePoint mPoint = FakeMeasurePoint.GenerateMeasurePoint( new IOutdoorCell[3] { mainCell, otherCell2, otherCell3 }, new byte[3] { 2, 1, 2 }, new double[3] { -7, -12, -9 }); mpcRelation.ImportMeasurePoint(mPoint); Assert.AreEqual(mpcRelation.MainCell.ReceivePower, 0.299526, 1E-6); Assert.AreEqual(mpcRelation.MainCell.Cell.Azimuth, 10); Assert.AreEqual(mpcRelation.InterferenceCells.Count, 3); Assert.AreEqual(mpcRelation.InterferenceCells[0].Cell.Azimuth, 70); Assert.AreEqual(mpcRelation.InterferenceCells[0].ReceivePower, 0.063096, 1E-6); Assert.AreEqual(mpcRelation.InterferenceCells[1].Cell.Azimuth, 160); Assert.AreEqual(mpcRelation.InterferenceCells[2].Cell.Azimuth, 200); }