public void Test_DumpNewCellExcels_SingleItem_ConsideredInUse(int eNodebId, byte sectorId, short originPci, int index, short modifiedPci) { CellRepository.MockSixCells(pci: originPci, isInUse: false); CellRepository.MockGetId <ICellRepository, Cell>(); CellRepository.MockOperations(); var cellExcels = new List <CellExcel> { new CellExcel { ENodebId = eNodebId, SectorId = sectorId, Pci = modifiedPci } }; Service.DumpNewCellExcels(cellExcels); CellRepository.Object.Count().ShouldBe(6); var results = CellRepository.Object.GetAllList(); for (int i = 0; i < 6; i++) { if (i == index) { results[i].Pci.ShouldBe(modifiedPci); results[i].IsInUse.ShouldBeTrue(); } else { results[i].Pci.ShouldBe(originPci); results[i].IsInUse.ShouldBeFalse(); } } }
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); } }
public void Setup() { CellRepository.MockSixCells(); CellRepository.MockGetId <ICellRepository, Cell>(); CellRepository.MockOperations(); }