public void TestGenerateMeasurableCellList_OneCell()
        {
            Mock <IOutdoorCell> outdoorCell = new Mock <IOutdoorCell>();

            outdoorCell.MockOutdoorCell(112, 23, 0, 15.2, 18);

            compCells    = new ComparableCell[1];
            compCells[0] = new ComparableCell(1.111949, 90)
            {
                Budget = new LinkBudget(model), Cell = outdoorCell.Object
            };

            measurablePoint.CellRepository.GenerateMeasurableCellList(compCells, measurablePoint);

            Assert.AreEqual(measurablePoint.CellRepository.CellList.Count, 1);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Cell, compCells[0]);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Budget, compCells[0].Budget);
            Assert.AreEqual(FakeComparableCell.Parse(measurablePoint.CellRepository.CellList[0].Cell).MetricCalculate(),
                            31.61297, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Cell.AzimuthFactor(), 30, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Budget.AntennaGain, 18);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Budget.TransmitPower, 15.2);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Cell.Cell.Height, 40);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].TiltFactor(), 1.259912, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].ReceivedRsrp, -136.877439, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].TiltAngle, 2.939795, eps);
        }
        public void TestGenerateMeasurableCellList_TwoCells_InOneStation()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18);

            compCells    = new ComparableCell[2];
            compCells[0] = new ComparableCell(1.111949, 45)
            {
                Budget = new LinkBudget(model), Cell = outdoorCell2.Object
            };
            compCells[1] = new ComparableCell(1.111949, 90)
            {
                Budget = new LinkBudget(model), Cell = outdoorCell1.Object
            };

            measurablePoint.CellRepository.GenerateMeasurableCellList(compCells, measurablePoint);

            Assert.AreEqual(measurablePoint.CellRepository.CellList.Count, 2);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Cell, compCells[0]);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Budget, compCells[0].Budget);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].ReceivedRsrp, -113.512676, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].TiltAngle, 2.939795, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[1].ReceivedRsrp, -136.877439, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[1].TiltAngle, 2.939795, eps);
        }
        public void TestGenerateComparableCellList_ThreeCells_InOneStation_WithDifferentMods()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18, 1);
            Mock <IOutdoorCell> outdoorCell3 = new Mock <IOutdoorCell>();

            outdoorCell3.MockOutdoorCell(112, 23, 90, 15.2, 18, 4);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            FakeComparableCell[] compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model).Select(
                      FakeComparableCell.Parse).ToArray();

            Assert.AreEqual(compCells.Length, 3);
            Assert.AreEqual(compCells[0].PciModx, 1);
            Assert.AreEqual(compCells[1].PciModx, 1);
            Assert.AreEqual(compCells[2].PciModx, 0);
            Assert.AreEqual(compCells[0].MetricCalculate(), 1.612974, eps);
            Assert.AreEqual(compCells[1].MetricCalculate(), 8.248211, eps);
            Assert.AreEqual(compCells[2].MetricCalculate(), 31.612974, eps);

            compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model, 4).Select(
                      FakeComparableCell.Parse).ToArray();
            Assert.AreEqual(compCells[0].PciModx, 0);
            Assert.AreEqual(compCells[1].PciModx, 1);
            Assert.AreEqual(compCells[2].PciModx, 0);
        }
        public void TestComparableCell_TwoPoints_WithDifferentCells_SameBudget()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112.5, 23, 0, 15.2, 18);
            StubGeoPoint point1 = new StubGeoPoint(outdoorCell1.Object, 0.01);
            StubGeoPoint point2 = new StubGeoPoint(outdoorCell2.Object, 0.01, 90);

            ComparableCell comparableCell1 = new ComparableCell(point1, outdoorCell1.Object, budgetList, model);

            Assert.AreEqual(comparableCell1.Cell, outdoorCell1.Object);
            Assert.AreEqual(comparableCell1.Distance, 1.111949, eps);
            Assert.AreEqual(comparableCell1.AzimuthAngle, 90);

            ComparableCell comparableCell2 = new ComparableCell(point2, outdoorCell2.Object, budgetList, model);

            Assert.AreEqual(comparableCell2.Cell, outdoorCell2.Object);
            Assert.AreEqual(comparableCell2.Distance, 1.111949, eps);
            Assert.AreEqual(comparableCell2.AzimuthAngle, 0);

            Assert.AreEqual(budgetList.Count, 1);
            Assert.AreEqual(budgetList.ElementAt(0), comparableCell1.Budget);
            Assert.AreEqual(budgetList.ElementAt(0), comparableCell2.Budget);
        }
        public void TestGenerateComparableCellList_ThreeCells_TwoInOneStation_OtherInOtherStation()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell3 = new Mock <IOutdoorCell>();

            outdoorCell3.MockOutdoorCell(111.99, 23, 90, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            FakeComparableCell[] compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model).Select(
                      FakeComparableCell.Parse).ToArray();

            Assert.AreEqual(compCells.Length, 3);
            Assert.AreEqual(compCells[0].Cell, outdoorCell2.Object);
            Assert.AreEqual(compCells[1].Cell, outdoorCell3.Object);
            Assert.AreEqual(compCells[2].Cell, outdoorCell1.Object);
            Assert.AreEqual(compCells[0].AzimuthAngle, 45);
            Assert.AreEqual(compCells[1].AzimuthAngle, 0);
            Assert.AreEqual(compCells[2].AzimuthAngle, 90);
            Assert.AreEqual(compCells[0].MetricCalculate(), 8.248211, eps);
            Assert.AreEqual(compCells[1].MetricCalculate(), 12.149024, eps);
            Assert.AreEqual(compCells[2].MetricCalculate(), 31.612974, eps);
        }
        public void TestGenerateMeasurableCellList_ThreeCells_InOneStation()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell3 = new Mock<IOutdoorCell>();
            outdoorCell3.MockOutdoorCell(112, 23, 90, 15.2, 18);

            compCells = new ComparableCell[3];
            compCells[0] = new ComparableCell(1.111949, 0) {Budget = new LinkBudget(model), Cell = outdoorCell3.Object};
            compCells[1] = new ComparableCell(1.111949, 45) {Budget = new LinkBudget(model), Cell = outdoorCell2.Object};
            compCells[2] = new ComparableCell(1.111949, 90) {Budget = new LinkBudget(model), Cell = outdoorCell1.Object};

            measurablePoint.CellRepository.GenerateMeasurableCellList(compCells, measurablePoint);

            Assert.AreEqual(measurablePoint.CellRepository.CellList.Count, 3);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Cell, compCells[0]);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Budget, compCells[0].Budget);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].ReceivedRsrp, -106.877439, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].TiltAngle, 2.939795, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[1].ReceivedRsrp, -113.512676, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[1].TiltAngle, 2.939795, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[2].ReceivedRsrp, -136.877439, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[2].TiltAngle, 2.939795, eps);
        }
        public void TestGenerateComparableCellList_TwoCells_InOneStation()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);

            FakeComparableCell[] compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model).Select(
                      FakeComparableCell.Parse).ToArray();

            Assert.AreEqual(compCells.Length, 2);
            Assert.AreEqual(compCells[0].Cell, outdoorCell2.Object);
            Assert.AreEqual(compCells[1].Cell, outdoorCell1.Object);
            Assert.AreEqual(compCells[1].Distance, 1.111949, eps);
            Assert.AreEqual(compCells[0].AzimuthAngle, 45);
            Assert.AreEqual(compCells[1].AzimuthAngle, 90);
            Assert.AreEqual(compCells[0].MetricCalculate(), 8.248211, eps);
            Assert.AreEqual(compCells[1].MetricCalculate(), 31.612974, eps);
            Assert.AreEqual(compCells[1].Budget.Model, model);
        }
        public void TestGenerateComparableCellList_ThreeCells_InOneStation_WithDifferentMods()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18, 1);
            Mock<IOutdoorCell> outdoorCell3 = new Mock<IOutdoorCell>();
            outdoorCell3.MockOutdoorCell(112, 23, 90, 15.2, 18, 4);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            FakeComparableCell[] compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model).Select(
                FakeComparableCell.Parse).ToArray();

            Assert.AreEqual(compCells.Length, 3);
            Assert.AreEqual(compCells[0].PciModx, 1);
            Assert.AreEqual(compCells[1].PciModx, 1);
            Assert.AreEqual(compCells[2].PciModx, 0);
            Assert.AreEqual(compCells[0].MetricCalculate(), 1.612974, eps);
            Assert.AreEqual(compCells[1].MetricCalculate(), 8.248211, eps);
            Assert.AreEqual(compCells[2].MetricCalculate(), 31.612974, eps);

            compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model, 4).Select(
                FakeComparableCell.Parse).ToArray();
            Assert.AreEqual(compCells[0].PciModx, 0);
            Assert.AreEqual(compCells[1].PciModx, 1);
            Assert.AreEqual(compCells[2].PciModx, 0);
        }
示例#9
0
        protected void ImportOneCell()
        {
            Mock<IOutdoorCell> outdoorCell = new Mock<IOutdoorCell>();
            outdoorCell.MockOutdoorCell(112, 23, 0, 15.2, 18);
            outdoorCellList.Add(outdoorCell.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
        protected void ImportOneCell()
        {
            Mock <IOutdoorCell> outdoorCell = new Mock <IOutdoorCell>();

            outdoorCell.MockOutdoorCell(112, 23, 0, 15.2, 18);
            outdoorCellList.Add(outdoorCell.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
示例#11
0
        protected void ImportTwoCellsInOneStation_WithDifferentMods()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18, 1);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
        protected void ImportTwoCellsInOneStation_WithDifferentMods()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18, 1);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
示例#13
0
        protected void ImportThreeCellsInOneStation()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell3 = new Mock<IOutdoorCell>();
            outdoorCell3.MockOutdoorCell(112, 23, 90, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
示例#14
0
        public void TestComparableCell_OnePoint()
        {
            Mock<IOutdoorCell> outdoorCell = new Mock<IOutdoorCell>();
            outdoorCell.MockOutdoorCell(112, 23, 0, 15.2, 18);
            StubGeoPoint point = new StubGeoPoint(outdoorCell.Object, 0.01);

            ComparableCell comparableCell = new ComparableCell(point, outdoorCell.Object, budgetList, model);
            Assert.AreEqual(comparableCell.Cell, outdoorCell.Object);
            Assert.AreEqual(comparableCell.Distance, 1.111949, eps);
            Assert.AreEqual(comparableCell.AzimuthAngle, 90);
            Assert.AreEqual(comparableCell.Budget.AntennaGain, 18);
            Assert.AreEqual(comparableCell.Budget.TransmitPower, 15.2);
            Assert.AreEqual(budgetList.Count, 1);
            Assert.AreEqual(budgetList.ElementAt(0), comparableCell.Budget);
        }
        protected void ImportThreeCellsInOneStation_OneInterferenceSameMod_OtherInterferenceDifferentMod()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18, 1);
            Mock <IOutdoorCell> outdoorCell3 = new Mock <IOutdoorCell>();

            outdoorCell3.MockOutdoorCell(112, 23, 90, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
        public void TestComparableCell_OnePoint()
        {
            Mock <IOutdoorCell> outdoorCell = new Mock <IOutdoorCell>();

            outdoorCell.MockOutdoorCell(112, 23, 0, 15.2, 18);
            StubGeoPoint point = new StubGeoPoint(outdoorCell.Object, 0.01);

            ComparableCell comparableCell = new ComparableCell(point, outdoorCell.Object, budgetList, model);

            Assert.AreEqual(comparableCell.Cell, outdoorCell.Object);
            Assert.AreEqual(comparableCell.Distance, 1.111949, eps);
            Assert.AreEqual(comparableCell.AzimuthAngle, 90);
            Assert.AreEqual(comparableCell.Budget.AntennaGain, 18);
            Assert.AreEqual(comparableCell.Budget.TransmitPower, 15.2);
            Assert.AreEqual(budgetList.Count, 1);
            Assert.AreEqual(budgetList.ElementAt(0), comparableCell.Budget);
        }
        protected void ImportThreeCellsInOneStation_AllInterferenceWithDifferentModsFromStrongestCell()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18, 1);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18, 1);
            Mock <IOutdoorCell> outdoorCell3 = new Mock <IOutdoorCell>();

            outdoorCell3.MockOutdoorCell(112, 23, 90, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
        protected void ImportThreeCellsInDifferentStations()
        {
            Mock <IOutdoorCell> outdoorCell1 = new Mock <IOutdoorCell>();

            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell2 = new Mock <IOutdoorCell>();

            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18);
            Mock <IOutdoorCell> outdoorCell3 = new Mock <IOutdoorCell>();

            outdoorCell3.MockOutdoorCell(111.99, 23, 90, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
        public void TestGenerateComparableCellList_OneCell()
        {
            Mock<IOutdoorCell> outdoorCell = new Mock<IOutdoorCell>();
            outdoorCell.MockOutdoorCell(112, 23, 0, 15.2, 18);
            outdoorCellList.Add(outdoorCell.Object);

            FakeComparableCell[] compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model).Select(
                FakeComparableCell.Parse).ToArray();

            Assert.AreEqual(compCells.Count(), 1);
            Assert.AreEqual(compCells[0].Cell, outdoorCell.Object);
            Assert.AreEqual(compCells[0].Distance, 1.111949, eps);
            Assert.AreEqual(compCells[0].AzimuthAngle, 90);
            Assert.AreEqual(compCells[0].Budget.AntennaGain, 18);
            Assert.AreEqual(compCells[0].Budget.TransmitPower, 15.2);
            Assert.AreEqual(compCells[0].MetricCalculate(), 31.612974, eps);
            Assert.AreEqual(compCells[0].Budget.Model, model);
        }
        public void TestGenerateComparableCellList_OneCell()
        {
            Mock <IOutdoorCell> outdoorCell = new Mock <IOutdoorCell>();

            outdoorCell.MockOutdoorCell(112, 23, 0, 15.2, 18);
            outdoorCellList.Add(outdoorCell.Object);

            FakeComparableCell[] compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model).Select(
                      FakeComparableCell.Parse).ToArray();

            Assert.AreEqual(compCells.Count(), 1);
            Assert.AreEqual(compCells[0].Cell, outdoorCell.Object);
            Assert.AreEqual(compCells[0].Distance, 1.111949, eps);
            Assert.AreEqual(compCells[0].AzimuthAngle, 90);
            Assert.AreEqual(compCells[0].Budget.AntennaGain, 18);
            Assert.AreEqual(compCells[0].Budget.TransmitPower, 15.2);
            Assert.AreEqual(compCells[0].MetricCalculate(), 31.612974, eps);
            Assert.AreEqual(compCells[0].Budget.Model, model);
        }
        public void TestGenerateMeasurableCellList_OneCell()
        {
            Mock<IOutdoorCell> outdoorCell = new Mock<IOutdoorCell>();
            outdoorCell.MockOutdoorCell(112, 23, 0, 15.2, 18);

            compCells = new ComparableCell[1];
            compCells[0] = new ComparableCell(1.111949, 90) {Budget = new LinkBudget(model), Cell = outdoorCell.Object};

            measurablePoint.CellRepository.GenerateMeasurableCellList(compCells, measurablePoint);

            Assert.AreEqual(measurablePoint.CellRepository.CellList.Count, 1);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Cell, compCells[0]);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Budget, compCells[0].Budget);
            Assert.AreEqual(FakeComparableCell.Parse(measurablePoint.CellRepository.CellList[0].Cell).MetricCalculate(),
                31.61297, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Cell.AzimuthFactor(), 30, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Budget.AntennaGain, 18);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Budget.TransmitPower, 15.2);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].Cell.Cell.Height, 40);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].TiltFactor(), 1.259912, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].ReceivedRsrp, -136.877439, eps);
            Assert.AreEqual(measurablePoint.CellRepository.CellList[0].TiltAngle, 2.939795, eps);
        }
示例#22
0
        public void TestComparableCell_TwoPoints_WithDifferentCells_SameBudget()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112.5, 23, 0, 15.2, 18);
            StubGeoPoint point1 = new StubGeoPoint(outdoorCell1.Object, 0.01);
            StubGeoPoint point2 = new StubGeoPoint(outdoorCell2.Object, 0.01, 90);

            ComparableCell comparableCell1 = new ComparableCell(point1, outdoorCell1.Object, budgetList, model);
            Assert.AreEqual(comparableCell1.Cell, outdoorCell1.Object);
            Assert.AreEqual(comparableCell1.Distance, 1.111949, eps);
            Assert.AreEqual(comparableCell1.AzimuthAngle, 90);

            ComparableCell comparableCell2 = new ComparableCell(point2, outdoorCell2.Object, budgetList, model);
            Assert.AreEqual(comparableCell2.Cell, outdoorCell2.Object);
            Assert.AreEqual(comparableCell2.Distance, 1.111949, eps);
            Assert.AreEqual(comparableCell2.AzimuthAngle, 0);

            Assert.AreEqual(budgetList.Count, 1);
            Assert.AreEqual(budgetList.ElementAt(0), comparableCell1.Budget);
            Assert.AreEqual(budgetList.ElementAt(0), comparableCell2.Budget);
        }
        public void TestGenerateComparableCellList_TwoCells_InOneStation()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);

            FakeComparableCell[] compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model).Select(
                FakeComparableCell.Parse).ToArray();

            Assert.AreEqual(compCells.Length, 2);
            Assert.AreEqual(compCells[0].Cell, outdoorCell2.Object);
            Assert.AreEqual(compCells[1].Cell, outdoorCell1.Object);
            Assert.AreEqual(compCells[1].Distance, 1.111949, eps);
            Assert.AreEqual(compCells[0].AzimuthAngle, 45);
            Assert.AreEqual(compCells[1].AzimuthAngle, 90);
            Assert.AreEqual(compCells[0].MetricCalculate(), 8.248211, eps);
            Assert.AreEqual(compCells[1].MetricCalculate(), 31.612974, eps);
            Assert.AreEqual(compCells[1].Budget.Model, model);
        }
        public void TestGenerateComparableCellList_ThreeCells_TwoInOneStation_OtherInOtherStation()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell3 = new Mock<IOutdoorCell>();
            outdoorCell3.MockOutdoorCell(111.99, 23, 90, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            FakeComparableCell[] compCells
                = measurablePoint.GenerateComaparbleCellList(outdoorCellList, budgetList, model).Select(
                FakeComparableCell.Parse).ToArray();

            Assert.AreEqual(compCells.Length, 3);
            Assert.AreEqual(compCells[0].Cell, outdoorCell2.Object);
            Assert.AreEqual(compCells[1].Cell, outdoorCell3.Object);
            Assert.AreEqual(compCells[2].Cell, outdoorCell1.Object);
            Assert.AreEqual(compCells[0].AzimuthAngle, 45);
            Assert.AreEqual(compCells[1].AzimuthAngle, 0);
            Assert.AreEqual(compCells[2].AzimuthAngle, 90);
            Assert.AreEqual(compCells[0].MetricCalculate(), 8.248211, eps);
            Assert.AreEqual(compCells[1].MetricCalculate(), 12.149024, eps);
            Assert.AreEqual(compCells[2].MetricCalculate(), 31.612974, eps);
        }
示例#25
0
        protected void ImportThreeCellsInOneStation_AllInterferenceWithDifferentModsFromStrongestCell()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18, 1);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18, 1);
            Mock<IOutdoorCell> outdoorCell3 = new Mock<IOutdoorCell>();
            outdoorCell3.MockOutdoorCell(112, 23, 90, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }
示例#26
0
        protected void ImportThreeCellsInOneStation_OneInterferenceSameMod_OtherInterferenceDifferentMod()
        {
            Mock<IOutdoorCell> outdoorCell1 = new Mock<IOutdoorCell>();
            outdoorCell1.MockOutdoorCell(112, 23, 0, 15.2, 18);
            Mock<IOutdoorCell> outdoorCell2 = new Mock<IOutdoorCell>();
            outdoorCell2.MockOutdoorCell(112, 23, 45, 15.2, 18, 1);
            Mock<IOutdoorCell> outdoorCell3 = new Mock<IOutdoorCell>();
            outdoorCell3.MockOutdoorCell(112, 23, 90, 15.2, 18);
            outdoorCellList.Add(outdoorCell1.Object);
            outdoorCellList.Add(outdoorCell2.Object);
            outdoorCellList.Add(outdoorCell3.Object);

            measurablePoint.ImportCells(outdoorCellList, budgetList, model);
        }