コード例 #1
0
 public void Test_DumpSingleExcel(int eNodebId, byte sectorId)
 {
     var cellExcel = new CellExcel
     {
         ENodebId = eNodebId,
         SectorId = sectorId,
         ShareCdmaInfo = "1"
     };
     Assert.IsTrue(Service.DumpSingleCellExcel(cellExcel));
     CellRepository.Object.Count().ShouldBe(7);
     var lastObject = CellRepository.Object.GetAllList()[6];
     lastObject.ENodebId.ShouldBe(eNodebId);
     lastObject.SectorId.ShouldBe(sectorId);
 }
コード例 #2
0
 public bool Post(CellExcel info)
 {
     return _service.DumpSingleCellExcel(info);
 }
コード例 #3
0
ファイル: ContainerTests.cs プロジェクト: ouyh18/LtePlatform
 public void Test_ENodebBtsIdPair_2()
 {
     var info = new CellExcel
     {
         ENodebId = 11223,
         ShareCdmaInfo = null
     };
     var item = info.MapTo<ENodebBtsIdPair>();
     item.ENodebId.ShouldBe(11223);
     item.BtsId.ShouldBe(0);
 }
コード例 #4
0
ファイル: CellTest.cs プロジェクト: ouyh18/LtePlatform
        public void Test_From_CellExcel2()
        {
            var info = new CellExcel
            {
                ENodebId = 1233,
                SectorId = 44,
                TransmitReceive = "2T2R",
                AntennaGain = 15.2,
                IsIndoor = "否"
            };

            var cell = Mapper.Map<Cell>(info);
            Assert.AreEqual(cell.ENodebId, 1233);
            Assert.AreEqual(cell.SectorId, 44);
            Assert.AreEqual(cell.AntennaPorts, AntennaPortsConfigure.Antenna2T2R);
            Assert.AreEqual(cell.AntennaGain, 15.2);
            Assert.IsTrue(cell.IsOutdoor);
        }
コード例 #5
0
ファイル: CellTest.cs プロジェクト: ouyh18/LtePlatform
 public void Test_NewCell(int eNodebId, byte sectorId, double longtitute, short frequency, string isIndoor,
     double azimuth, string antConfig)
 {
     var cellExcelInfo = new CellExcel
     {
         ENodebId = eNodebId,
         SectorId = sectorId,
         Longtitute = longtitute,
         Frequency = frequency,
         IsIndoor = isIndoor,
         AntennaGain = 12.8,
         Azimuth = azimuth,
         TransmitReceive = antConfig
     };
     var cell = Mapper.Map<CellExcel, Cell>(cellExcelInfo);
     Assert.IsNotNull(cell);
     Assert.AreEqual(cell.ENodebId, eNodebId);
     Assert.AreEqual(cell.SectorId, sectorId);
     Assert.AreEqual(cell.Longtitute, longtitute);
     Assert.AreEqual(cell.IsOutdoor, isIndoor.Trim() == "否");
     Assert.AreEqual(cell.AntennaGain, 12.8);
     Assert.AreEqual(cell.Azimuth, azimuth, "azimuth");
     Assert.AreEqual(cell.AntennaPorts, antConfig.GetEnumType<AntennaPortsConfigure>());
 }
コード例 #6
0
 public void Test_DumpSingleCell(int eNodebId, byte sectorId, short originPci, int index, short modifiedPci)
 {
     CellRepository.MockSixCells(pci: originPci);
     CellRepository.MockGetId<ICellRepository, Cell>();
     CellRepository.MockOperations();
     var cellExcel = new CellExcel
     {
         ENodebId = eNodebId,
         SectorId = sectorId,
         Pci = modifiedPci
     };
     Service.DumpSingleCellExcel(cellExcel);
     CellRepository.Object.Count().ShouldBe(6);
     var results = CellRepository.Object.GetAllList();
     for (int i = 0; i < 6; i++)
     {
         results[i].Pci.ShouldBe(i == index ? modifiedPci : originPci);
     }
 }