public Precise4GCoverageImporter(
     ITopCellRepository <PreciseCoverage4G> cellStatRepository,
     ITopCellRepository <TownPreciseCoverage4GStat> townStatRepository,
     IEnumerable <ENodeb> eNodebs)
 {
     cellStatService = new SaveTimeSingleKpiStatsService <PreciseCoverage4G, PreciseCoverage4GCsv>(
         cellStatRepository);
     _timeTownStatService = new SaveTimeTownStatsService <TownPreciseCoverage4GStat, PreciseCoverage4GCsv>(
         townStatRepository, eNodebs);
 }
 public Precise4GCoverageImporter(
     ITopCellRepository<PreciseCoverage4G> cellStatRepository,
     ITopCellRepository<TownPreciseCoverage4GStat> townStatRepository,
     IEnumerable<ENodeb> eNodebs)
 {
     cellStatService = new SaveTimeSingleKpiStatsService<PreciseCoverage4G, PreciseCoverage4GCsv>(
         cellStatRepository);
     _timeTownStatService = new SaveTimeTownStatsService<TownPreciseCoverage4GStat, PreciseCoverage4GCsv>(
         townStatRepository, eNodebs);
 }
 public void Test_Save(string city, string[] dateStrings)
 {
     SaveTimeSingleKpiStatsService<FakeTimeStat, FakeCarrierTimeStat> service =
         new SaveTimeSingleKpiStatsService<FakeTimeStat, FakeCarrierTimeStat>(repository.Object);
     List<FakeCarrierTimeStat> infos = dateStrings.Select(x =>
         new FakeCarrierTimeStat
         {
             StatTime = DateTime.Parse(x)
         }).ToList();
     int resultCount = service.Save(infos);
     Assert.AreEqual(resultCount, dateStrings.Length);
     for (int i = 0; i < resultCount; i++)
     {
         FakeTimeStat stat = repository.Object.Stats.ElementAt(i);
         Assert.AreEqual(stat.StatTime, DateTime.Parse(dateStrings[i]));
     }
 }
Beispiel #4
0
        public void Test_Save(string city, string[] dateStrings)
        {
            SaveTimeSingleKpiStatsService <FakeTimeStat, FakeCarrierTimeStat> service =
                new SaveTimeSingleKpiStatsService <FakeTimeStat, FakeCarrierTimeStat>(repository.Object);
            List <FakeCarrierTimeStat> infos = dateStrings.Select(x =>
                                                                  new FakeCarrierTimeStat
            {
                StatTime = DateTime.Parse(x)
            }).ToList();
            int resultCount = service.Save(infos);

            Assert.AreEqual(resultCount, dateStrings.Length);
            for (int i = 0; i < resultCount; i++)
            {
                FakeTimeStat stat = repository.Object.Stats.ElementAt(i);
                Assert.AreEqual(stat.StatTime, DateTime.Parse(dateStrings[i]));
            }
        }