当前位置: 首页>>代码示例>>C#>>正文


C# Mock.MockOutdoorCell方法代码示例

本文整理汇总了C#中Mock.MockOutdoorCell方法的典型用法代码示例。如果您正苦于以下问题:C# Mock.MockOutdoorCell方法的具体用法?C# Mock.MockOutdoorCell怎么用?C# Mock.MockOutdoorCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mock的用法示例。


在下文中一共展示了Mock.MockOutdoorCell方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestGenerateMeasurableCellList_ThreeCells_InOneStation

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:26,代码来源:GenerateMeasurableCellListTest.cs

示例2: TestGenerateComparableCellList_ThreeCells_InOneStation_WithDifferentMods

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:31,代码来源:GenerateComparableCellListTest.cs

示例3: ImportOneCell

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:8,代码来源:ImportCellTestConfig.cs

示例4: ImportTwoCellsInOneStation_WithDifferentMods

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:11,代码来源:ImportCellTestConfig.cs

示例5: ImportThreeCellsInOneStation

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:14,代码来源:ImportCellTestConfig.cs

示例6: TestComparableCell_OnePoint

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:15,代码来源:ComparableCell_NewTest.cs

示例7: TestGenerateComparableCellList_OneCell

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:19,代码来源:GenerateComparableCellListTest.cs

示例8: TestComparableCell_TwoPoints_WithDifferentCells_SameBudget

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:23,代码来源:ComparableCell_NewTest.cs

示例9: TestGenerateMeasurableCellList_OneCell

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:23,代码来源:GenerateMeasurableCellListTest.cs

示例10: TestGenerateComparableCellList_TwoCells_InOneStation

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:23,代码来源:GenerateComparableCellListTest.cs

示例11: TestGenerateComparableCellList_ThreeCells_TwoInOneStation_OtherInOtherStation

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:27,代码来源:GenerateComparableCellListTest.cs

示例12: ImportThreeCellsInOneStation_OneInterferenceSameMod_OtherInterferenceDifferentMod

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:14,代码来源:CalculatePerformanceTest.cs

示例13: ImportThreeCellsInOneStation_AllInterferenceWithDifferentModsFromStrongestCell

        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);
        }
开发者ID:ouyh18,项目名称:LteTools,代码行数:14,代码来源:CalculatePerformanceTest.cs


注:本文中的Mock.MockOutdoorCell方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。