public void TestBtsRepositorySaveBts_Original_LteConsidered() { helper.AssertOriginalParameters(); helper.AssertOriginalBtsInfos(); ParametersDumpInfrastructure infrastructure = new ParametersDumpInfrastructure(); ByExcelInfoSaveBtsListService service = new ByExcelInfoSaveBtsListService( repository.Object, infrastructure, townRepository.Object, lteRepository.Object); service.Save(btsInfos, true); Assert.AreEqual(infrastructure.CdmaBtsUpdated, 2, "failure"); Assert.AreEqual(repository.Object.Count(), 3); Assert.AreEqual(repository.Object.GetAll().ElementAt(0).ENodebId, -1); Assert.AreEqual(repository.Object.GetAll().ElementAt(1).TownId, 122); Assert.AreEqual(repository.Object.GetAll().ElementAt(1).ENodebId, -1); Assert.AreEqual(repository.Object.GetAll().ElementAt(2).ENodebId, -1); }
public void AssertOriginalTest() { AssertOriginalParameters(); int expectedSaved = (btsInfos[0].BtsId == repository.Object.GetAll().ElementAt(0).BtsId) ? 1 : 2; ParametersDumpInfrastructure infrastructure = new ParametersDumpInfrastructure(); ByExcelInfoSaveBtsListService service = new ByExcelInfoSaveBtsListService( repository.Object, infrastructure, townRepository); service.Save(btsInfos, true); Assert.AreEqual(repository.Object.Count(), expectedSaved + 1); for (int i = 1; i < repository.Object.Count(); i++) { AssertElements(repository.Object.GetAll().ElementAt(i), btsInfos[i - expectedSaved + 1]); } }