public void TestComparableCell_ConstructTwoPoints_WithDifferentCells_SameBudget() { StubOutdoorCell cell1 = new StubOutdoorCell(112, 23) { RsPower = 15.2, Pci = 30, AntennaGain = 17.5, Frequency = 100 }; StubOutdoorCell cell2 = new StubOutdoorCell(112.5, 23) { RsPower = 15.2, Pci = 30, AntennaGain = 17.5, Frequency = 100 }; StubGeoPoint point1 = new StubGeoPoint(cell1, 0.01); StubGeoPoint point2 = new StubGeoPoint(cell2, 0.01, 90); ComparableCell comparableCell1 = new ComparableCell(point1, cell1, budgetList); Assert.AreEqual(comparableCell1.Cell, cell1); Assert.AreEqual(comparableCell1.Distance, 1.111949, eps); Assert.AreEqual(comparableCell1.AzimuthAngle, 90); Assert.AreEqual(budgetList.Count, 1); Assert.AreEqual(budgetList.ElementAt(0), comparableCell1.Budget); ComparableCell comparableCell2 = new ComparableCell(point2, cell2, budgetList); Assert.AreEqual(comparableCell2.Cell, cell2); Assert.AreEqual(comparableCell2.Distance, 1.111949, eps); Assert.AreEqual(comparableCell2.AzimuthAngle, 0); Assert.AreEqual(budgetList.Count, 1); Assert.AreEqual(budgetList.ElementAt(0), comparableCell2.Budget); }
public void TestComparableCell_ConstructTwoPoints_WithDifferentCells_DifferentAntennaGain() { StubOutdoorCell cell1 = new StubOutdoorCell(112, 23) { RsPower = 15.2, Pci = 30, AntennaGain = 17.5, Frequency = 100 }; StubOutdoorCell cell2 = new StubOutdoorCell(112.5, 23) { RsPower = 15.2, Pci = 30, AntennaGain = 18.5, Frequency = 100 }; StubGeoPoint point1 = new StubGeoPoint(cell1, 0.01); StubGeoPoint point2 = new StubGeoPoint(cell2, 0.01, 90); ComparableCell comparableCell1 = new ComparableCell(point1, cell1, budgetList); Assert.AreEqual(comparableCell1.Cell, cell1); Assert.AreEqual(comparableCell1.Distance, 1.111949, eps); Assert.AreEqual(comparableCell1.AzimuthAngle, 90); Assert.AreEqual(budgetList.Count, 1); Assert.AreEqual(budgetList.ElementAt(0), comparableCell1.Budget); ComparableCell comparableCell2 = new ComparableCell(point2, cell2, budgetList); Assert.AreEqual(comparableCell2.Cell, cell2); Assert.AreEqual(comparableCell2.Distance, 1.111949, eps); Assert.AreEqual(comparableCell2.AzimuthAngle, 0); Assert.AreEqual(budgetList.Count, 2); Assert.AreEqual(budgetList.ElementAt(1), comparableCell2.Budget); }
public void TestComparableCell_OnePoint() { cellList = new FakeComparableCell[1]; IGeoPoint<double> p = new StubGeoPoint(112, 22); IOutdoorCell c = new StubOutdoorCell(112.001, 22.001, 60); cellList[0] = FakeComparableCell.Parse(new ComparableCell(p, c)); double dist = p.SimpleDistance(new StubGeoPoint(c.Longtitute, c.Lattitute)); Assert.AreEqual(cellList[0].Distance, dist, 1E-6); Assert.AreEqual(cellList[0].AzimuthAngle, 165, 1E-6); }
public void TestComparableCell_OnePoint() { cellList = new FakeComparableCell[1]; IGeoPoint <double> p = new StubGeoPoint(112, 22); IOutdoorCell c = new StubOutdoorCell(112.001, 22.001, 60); cellList[0] = FakeComparableCell.Parse(new ComparableCell(p, c)); double dist = p.SimpleDistance(new StubGeoPoint(c.Longtitute, c.Lattitute)); Assert.AreEqual(cellList[0].Distance, dist, 1E-6); Assert.AreEqual(cellList[0].AzimuthAngle, 165, 1E-6); }
public void TestComparableCell_ConstructOnePoint() { StubOutdoorCell cell = new StubOutdoorCell(112, 23) { RsPower = 15.2, Pci = 30, AntennaGain = 17.5, Frequency = 100 }; StubGeoPoint point = new StubGeoPoint(cell, 0.01); ComparableCell comparableCell = new ComparableCell(point, cell, budgetList); Assert.AreEqual(comparableCell.Cell, cell); Assert.AreEqual(comparableCell.Distance, 1.111949, eps); Assert.AreEqual(comparableCell.AzimuthAngle, 90); Assert.AreEqual(comparableCell.Budget.AntennaGain, 17.5); Assert.AreEqual(comparableCell.Budget.TransmitPower, 15.2); Assert.AreEqual(comparableCell.PciModx, 0); Assert.AreEqual(budgetList.Count, 1); Assert.AreEqual(budgetList.ElementAt(0), comparableCell.Budget); }
public void TestInitialize() { cell1 = new StubOutdoorCell(113, 23, 45); cell2 = new StubOutdoorCell(112, 22, 270); }