本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}