public void TestStrongestCell_EmptyList()
        {
            MeasurableCellRepository repository = new MeasurableCellRepository
            {
                CellList = cellList
            };

            result.StrongestCell = repository.CalculateStrongestCell();
            Assert.IsNull(result.StrongestCell);
        }
        public void TestStrongestCell_OneElement()
        {
            MeasurableCell mcell = new MeasurableCell();

            mcell.ReceivedRsrp = 1.2345;
            cellList.Add(mcell);
            Assert.AreEqual(cellList.Count, 1);

            MeasurableCellRepository repository = new MeasurableCellRepository
            {
                CellList = cellList
            };

            result.StrongestCell = repository.CalculateStrongestCell();
            Assert.IsNotNull(result.StrongestCell);
            Assert.AreEqual(result.StrongestCell.ReceivedRsrp, 1.2345);
        }
Esempio n. 3
0
        public void TestCalculatePerformance_MFMeasurePointResult()
        {
            MeasurableCellRepository repository = new MeasurableCellRepository
            {
                CellList = _cellList
            };
            MeasurePointResult result = new MfMeasurePointResult();

            result.StrongestCell = repository.CalculateStrongestCell();
            result.CalculateInterference(repository.CellList, 0.1);
            result.NominalSinr = result.StrongestCell.ReceivedRsrp - result.TotalInterferencePower;
            Assert.AreEqual(result.StrongestCell, _cellList[0]);
            Assert.AreEqual(result.StrongestInterference, _cellList[1]);
            Assert.AreEqual(result.SameModInterferenceLevel, -80);
            Assert.AreEqual(result.DifferentModInterferenceLevel, -80);
            Assert.AreEqual(result.TotalInterferencePower, -79.586073, 1E-6);
            Assert.AreEqual(result.NominalSinr, 9.586073, 1E-6);
        }
Esempio n. 4
0
        public void TestCalculatePerformance_MFMeasurePointResult_NoSameFrequencySameModCell()
        {
            _cellList[1].Cell.Cell.Frequency = 1825;
            MeasurableCellRepository repository = new MeasurableCellRepository
            {
                CellList = _cellList
            };
            MeasurePointResult result = new MfMeasurePointResult();

            result.StrongestCell = repository.CalculateStrongestCell();
            result.CalculateInterference(repository.CellList, 0.1);
            result.NominalSinr = result.StrongestCell.ReceivedRsrp - result.TotalInterferencePower;
            Assert.AreEqual(result.StrongestCell, _cellList[0]);
            Assert.AreEqual(result.StrongestInterference, null);
            Assert.AreEqual(result.SameModInterferenceLevel, double.MinValue);
            Assert.AreEqual(result.DifferentModInterferenceLevel, -80);
            Assert.AreEqual(result.TotalInterferencePower, -90);
            Assert.AreEqual(result.NominalSinr, 20);
        }
        public void TestStrongestCell_TwoElements()
        {
            MeasurableCell mcell1 = new MeasurableCell();
            MeasurableCell mcell2 = new MeasurableCell();

            mcell1.ReceivedRsrp = 1.2345;
            mcell2.ReceivedRsrp = 2.2345;
            cellList.Add(mcell1);
            cellList.Add(mcell2);

            MeasurableCellRepository repository = new MeasurableCellRepository
            {
                CellList = cellList
            };

            result.StrongestCell = repository.CalculateStrongestCell();
            Assert.AreSame(result.StrongestCell, mcell2);
            Assert.AreEqual(result.StrongestCell.ReceivedRsrp, 2.2345);
        }