public QuickSaveCellInfoListService(ICellRepository repository,
     IENodebRepository eNodebRepository)
     : base(repository)
 {
     _baseRepository = new CellBaseRepository(repository);
     _baseENodebRepository = new ENodebBaseRepository(eNodebRepository);
 }
Example #2
0
 protected QuickSaveOneCellService(ICellRepository repository, CellExcel cellInfo,
     CellBaseRepository baseRepository, bool updateExisted = false)
     : base(repository, cellInfo)
 {
     _baseRepository = baseRepository;
     _updateExisted = updateExisted;
 }
 public void TestCellRepository_CellBaseConsidered_SaveCell_ENodebNotExist()
 {
     Initialize();
     cellInfo.ENodebId = 2;
     CellBaseRepository baseRepository = new CellBaseRepository(repository.Object);
     Assert.IsFalse(SaveOneCell(baseRepository));
     Assert.AreEqual(repository.Object.Count(), 1);
 }
 public void TestCellRepository_CellBaseConsidered_SaveCell_ENodebExist_CellExist_UpdateExisted()
 {
     Initialize();
     cellInfo.SectorId = 0;
     CellBaseRepository baseRepository = new CellBaseRepository(repository.Object);
     Assert.IsTrue(SaveOneCell(baseRepository, true));
     Assert.AreEqual(repository.Object.Count(), 1);
 }
 public void TestCellRepository_CellBaseConsidered_SaveCell_ENodebExist_CellNotExist()
 {
     Initialize();
     CellBaseRepository baseRepository = new CellBaseRepository(repository.Object);
     Assert.AreEqual(repository.Object.Count(), 1);
     Assert.IsTrue(SaveOneCell(baseRepository));
     Assert.AreEqual(repository.Object.Count(), 2);
     Assert.IsTrue(repository.Object.GetAll().ElementAt(1).IsOutdoor);
     Assert.AreEqual(repository.Object.GetAll().ElementAt(1).AntennaPorts, AntennaPortsConfigure.Antenna2T4R);
 }
 public void TestInitialize()
 {
     Initialize();
     baseRepository = new CellBaseRepository(repository.Object);
 }
 protected bool SaveOneCell(CellBaseRepository baseRepository, bool update = false)
 {
     SaveOneCellService service = new ByENodebQuickSaveOneCellService(repository.Object,
         baseRepository, cellInfo, eNodebRepository.Object, update);
     return service.Save();
 }
Example #8
0
 public ByENodebQuickSaveOneCellService(ICellRepository repository, CellBaseRepository baseRepository,
     CellExcel cellInfo, IENodebRepository eNodebRepository, bool updateExisted = false)
     : base(repository, cellInfo, baseRepository, updateExisted)
 {
     _eNodeb = eNodebRepository.GetAll().FirstOrDefault(x => x.ENodebId == cellInfo.ENodebId);
 }
Example #9
0
 public ByENodebBaseQuickSaveOneCellService(ICellRepository repository, CellBaseRepository baseRepository,
     CellExcel cellInfo, ENodebBaseRepository eNodebRepository, bool updateExisted = false)
     : base(repository, cellInfo, baseRepository, updateExisted)
 {
     _eNodeb = eNodebRepository.QueryENodeb(cellInfo.ENodebId);
 }