Example #1
0
        public void CreatePhase()
        {
            UMLProject project = null;

            project = UMLProject.GetInstance();
            List <IUMLElement> elements = project.GetOwnedElements();

            if (elements.Count > 0)
            {
                UMLPhase phase = new UMLPhase();
                phase.Owner = elements[0];
                phase.Name  = "Phase Test";
                phase.SaveEdit();
                Assert.AreNotEqual(null, phase);
                Assert.AreNotEqual(String.Empty, phase.Guid);
                Assert.AreNotEqual(null, phase.Guid);
                Assert.AreEqual("Phase Test", phase.Name);
                Assert.AreNotEqual(String.Empty, phase.PathName);
                Assert.AreNotEqual(null, phase.PathName);
            }
        }
Example #2
0
        public void CreatePhase()
        {
            UMLProject project = null;
            project = UMLProject.GetInstance();
            List<IUMLElement> elements = project.GetOwnedElements();

            if (elements.Count > 0)
            {
                UMLPhase phase = new UMLPhase();
                phase.Owner = elements[0];
                phase.Name = "Phase Test";
                phase.SaveEdit();
                Assert.AreNotEqual(null, phase);
                Assert.AreNotEqual(String.Empty, phase.Guid);
                Assert.AreNotEqual(null, phase.Guid);
                Assert.AreEqual("Phase Test", phase.Name);
                Assert.AreNotEqual(String.Empty, phase.PathName);
                Assert.AreNotEqual(null, phase.PathName);
            }
        }
Example #3
0
 public PhaseEdit(UMLPhase phase)
 {
     InitializeComponent();            
     Phase = phase;            
     PhaseLoad();
 }
Example #4
0
 public PhaseEdit(UMLPhase phase)
 {
     InitializeComponent();
     Phase = phase;
     PhaseLoad();
 }
Example #5
0
 /// <summary>
 /// Adds a new phase
 /// </summary>
 /// <param name="phase"></param>
 /// <returns></returns>
 private UMLPhase AddPhase(UMLPhase phase)
 {
     foreach (UMLPhase p in Phases)
     {
         if (phase.Name == p.Name)
             return p;
     }
     phase.Stereotype = Constants.UMLPhase.STEREOTYPE;
     Phases.Add(phase);
     return phase;
 }
Example #6
0
        /// <summary>
        /// Loads the iterations and phases
        /// </summary>
        public void LoadPhasesIterationsExcel()
        {
            DataTable dtResult = new DataTable();
            dtResult = GetDataTable(_fileName, PHASE_SHEET, "Phase <> ''");
            UMLPackage pack = new UMLPackage();
            pack.Name = "IterationsFaseImport";
            pack.Owner = _iterationModel;

            Packages.Add(pack);
            foreach (DataRow dr in dtResult.Rows)
            {
                UMLPhase phase = new UMLPhase();
                phase.Name = dr["Phase"].ToString().Trim();
                phase.Owner = pack;
                phase = AddPhase(phase);

                UMLIteration iteration = new UMLIteration();
                iteration.Name = dr["Name"].ToString().Trim();
                string[] usecasesName = dr["UseCaseList"].ToString().Split(',');
                foreach (string useCaseName in usecasesName)
                {
                    UMLUseCase useCase = new UMLUseCase();
                    useCase.Name = useCaseName.Trim();
                    useCase = AddUseCase(useCase);
                    iteration.UseCases.Add(useCase);
                }

                //iteration.Owner = _logical;
                iteration.Owner = phase;
                iteration = AddIteration(iteration);
                iteration.Prev = getIterationByName(dr["Prev"].ToString());
                phase.Iterations.Add(iteration);
            }
        }