Exemplo n.º 1
0
        private List<IStudy> CreateStudyByName()
        {
            string name="studyName";
            int count=3;
            List<IStudy> studylist = new List<IStudy>();
            for (int i = 0; i < count;i++ )
            {
                IStudy study = new IntIntervalStudy();
                study.Name = name+i.ToString();
                studylist.Add(study);
            }

            return studylist;
        }
Exemplo n.º 2
0
 [Test]  //测试测试能否找到指定指标(找不到)
 public void Findtest_null()
 {
     GSMPredicGroup group = Mock.MockGSMPredicGroup();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.Name = "BestServer";
     study2.Name = "DLBCCHCIR";
     string studyType = "TCHRP";
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     Assert.IsNull( group.Find(studyType));
 }
Exemplo n.º 3
0
 [Test]  //测试测试能否找到指定指标(找不到)
 public void Findtest_null()
 {
     UMTSPredictionGroup group = InitialGroup();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.Name = "BestServer";
     study2.Name = "CPICHRSCP";
     string studyType = "UERSSI";
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     Assert.IsNull(group.Find(studyType));
 }
Exemplo n.º 4
0
        [Test]  //测试能否找到指定指标(找到)
        public void Findtest_normal()
        {
            TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup();
            List<IStudy> studyList = new List<IStudy>();

            IStudy study1 = new IntIntervalStudy();
            IStudy study2 = new IntIntervalStudy();
            study1.Name = "BestServer";
            study2.Name = "PCCPCH_RSCP";
            string studyType = "BestServer";
            studyList.Add(study1);
            studyList.Add(study2);
            group.StudyList = studyList;
            studyList = group.StudyList;
            Assert.AreEqual(study1, group.Find(studyType));
        }
Exemplo n.º 5
0
 [Test]  //测试clone的studyList
 public void Clonetest_study()
 {
     GSMPredicGroup group = Mock.MockGSMPredicGroup();
     group.TrafficTerminal = new Huawei.UNet.Traffic.Interface.Terminal();
     group.CsService = new Huawei.UNet.Traffic.Interface.UnionCsService();
     group.PsService = new Huawei.UNet.Traffic.Interface.UnionPsService();
     group.TrafficMobility = new Huawei.UNet.Traffic.Interface.Mobility();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.Clone();
     study2.Clone();
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     Assert.AreEqual(group.StudyList[0].Clone().Name, group.Clone().StudyList[0].Clone().Name);
 }
Exemplo n.º 6
0
 [Test]  //测试clone的studyList
 public void Clonetest_study()
 {
     TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup();
    group.TrafficTerminal = new Terminal();
     group.CsService = new UnionCsService();
     group.PsService = new UnionPsService();
     group.TrafficMobility = new Mobility();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.Name = "study1";
     study1.Clone();
     study2.Clone();
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     string str1 = group.StudyList[0].Clone().Name;
     string str2 = group.Clone().StudyList[0].Clone().Name;
     Assert.AreEqual(str1, str2);
 }
Exemplo n.º 7
0
 private IStudy GenerateIntervalStudy(StudyTemplate item)
 {
     if (item.ValueMarixType == ValueMatrixType.IntType)
     {
         IntIntervalStudy intStudy = new IntIntervalStudy();
         foreach (GeoRasterStyle style in item.StyleList)
         {
             //intStudy.ca
             intStudy.StyleList.Add((GeoIntervalSytle)style);
         }
         return intStudy;
     }
     else
     {
         ShortIntervalStudy shortStudy = new ShortIntervalStudy();
         foreach (GeoRasterStyle style in item.StyleList)
         {
             shortStudy.StyleList.Add((GeoIntervalSytle)style);
         }
         return shortStudy;
     }
 }
Exemplo n.º 8
0
 [Test]  //测试clone的studyList
 public void Clonetest_study()
 {
     UMTSPredictionGroup group = InitialGroup();
     group.TrafficTerminal = new Terminal();
     UnionCsService csService = new UnionCsService();
     Service umtsCSService = new UMTSService();
     csService.CSServiceDic.Add(NetWorkType.UMTS, umtsCSService);
     group.CsService = csService;
     UnionPsService psService = new UnionPsService();
     Service umtsPSService = new UMTSService();
     psService.PSServiceDic.Add(NetWorkType.UMTS, umtsPSService);
     group.PsService = psService;
     group.TrafficMobility = new Mobility();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.Clone();
     study2.Clone();
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     Assert.AreEqual(group.StudyList[0].Clone().Name, group.Clone().StudyList[0].Clone().Name);
 }
Exemplo n.º 9
0
 public void GetBasicStudyTest_null()
 {
     TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.IsBasic = false;
     study2.IsBasic = false;
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     Assert.AreEqual(0, (group.GetBasicStudy()).Count);
 }
Exemplo n.º 10
0
 public void GetCheckStateTest()
 {
     TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup();
     List<IStudy> studyList = new List<IStudy>();
     IStudy study1 = new IntIntervalStudy();
     IStudy study2 = new IntIntervalStudy();
     study1.CheckState = PredictionCheckedState.GreyChecked;
    study2.CheckState = PredictionCheckedState.Unchecked;
     studyList.Add(study1);
     studyList.Add(study2);
     group.StudyList = studyList;
     Assert.AreEqual(PredictionCheckedState.Checked, group.GetCheckState());
 }