コード例 #1
0
        public void GESTVAE020()
        {
            MyViewModel VM = new MyViewModel(true);

            VM.AjouteCandidat();
            CandidatVM oCan = VM.CurrentCandidat;

            oCan.Nom = "TEST1";
            VM.saveData();

            VM         = new MyViewModel(true);
            VM.rechNom = "TEST1";
            VM.Recherche();

            //Lock du candidat sur POSTE1
            VM.CurrentCandidat = VM.lstCandidatVM[0];
            // Le candidat a obtenu le diplome
            Assert.IsFalse(VM.CurrentCandidat.IsCAFDES);

            VM.LockCurrentCandidat();
            VM.AjouteL1();
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL1Favorable();
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(1);
            VM.ValideretQuitterL1();
            VM.AjouteL2();
            Livret2VM oL2 = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            // Tous les DC sont a Valider
            foreach (DCLivretVM item in oL2.lstDCLivret)
            {
                item.IsAValider = true;
            }

            // Decision = Validation Partielle > Now
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL2Partielle();
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(1);
            oL2.lstDCLivretAValider[0].Decision           = String.Format("{0:D}-Favorable", MyEnums.DecisionJuryL2.DECISION_L2_FAVORABLE);
            oL2.lstDCLivretAValider[1].Decision           = String.Format("{0:D}-Défavorable", MyEnums.DecisionJuryL2.DECISION_L2_DEFAVORABLE);
            oL2.lstDCLivretAValider[2].Decision           = String.Format("{0:D}-Favorable", MyEnums.DecisionJuryL2.DECISION_L2_FAVORABLE);
            oL2.lstDCLivretAValider[3].Decision           = String.Format("{0:D}-Défavorable", MyEnums.DecisionJuryL2.DECISION_L2_DEFAVORABLE);
            VM.ValideretQuitterL2();


            // Le candidat n'a pas obtenu le diplome
            DiplomeCandVM oDip = VM.CurrentCandidat.getDiplomeCand(oL2);

            Assert.IsNotNull(oDip);
            Assert.AreEqual("Validé Partiellement", oDip.StatutDiplome);
            Assert.AreEqual("Validé", oDip.lstDCCands[0].Statut);
            Assert.AreEqual("Refusé", oDip.lstDCCands[1].Statut);
            Assert.AreEqual("Validé", oDip.lstDCCands[2].Statut);
            Assert.AreEqual("Refusé", oDip.lstDCCands[3].Statut);
        }//GestVAE020
コード例 #2
0
        private void dgDC_CellEditEnding(object sender, DataGridCellEditEndingEventArgs e)
        {
            if (e.Column.Header.ToString() == "Statut")
            {
                if (!manualCommit)
                {
                    manualCommit = true;
                    dgDC.CommitEdit(DataGridEditingUnit.Row, true);
                    manualCommit = false;
                }
            }

            DiplomeCandVM oDipCandVM = VM.CurrentCandidat.CurrentDiplomeCand;

            oDipCandVM.CalcStatutDiplome();
        }
コード例 #3
0
        public void GESTVAE019()
        {
            MyViewModel VM = new MyViewModel(true);

            VM.AjouteCandidat();
            CandidatVM oCan = VM.CurrentCandidat;

            oCan.Nom = "TEST1";
            VM.saveData();

            VM         = new MyViewModel(true);
            VM.rechNom = "TEST1";
            VM.Recherche();

            //Lock du candidat sur POSTE1
            VM.CurrentCandidat = VM.lstCandidatVM[0];
            // Le candidat a obtenu le diplome
            Assert.IsFalse(VM.CurrentCandidat.IsCAFDES);

            VM.LockCurrentCandidat();
            VM.AjouteL1();
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL1Favorable();
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(1);
            VM.ValideretQuitterL1();
            VM.AjouteL2();
            Livret2VM oL2 = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            // Tous les DC sont a Valider
            foreach (DCLivretVM item in oL2.lstDCLivret)
            {
                item.IsAValider = true;
            }
            // Decision = Validation Partielle > Now
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL2Partielle();
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(-1);
            oL2.lstDCLivret[0].Decision = oL2.DecisionL2ModuleFavorable;
            oL2.lstDCLivret[1].Decision = oL2.DecisionL2ModuleDeFavorable;
            oL2.lstDCLivret[2].Decision = oL2.DecisionL2ModuleFavorable;
            oL2.lstDCLivret[3].Decision = oL2.DecisionL2ModuleDeFavorable;
            VM.ValideretQuitterL2();

            // Le candidat n'a pas obtenu le diplome
            DiplomeCandVM oDip = VM.CurrentCandidat.getDiplomeCand(oL2);

            Assert.IsNotNull(oDip);
            Assert.AreEqual("Validé Partiellement", oDip.StatutDiplome);
        }//GestVAE019
コード例 #4
0
        public void GESTVAE021()
        {
            MyViewModel VM = new MyViewModel(true);

            VM.AjouteCandidat();
            CandidatVM oCan = VM.CurrentCandidat;

            oCan.Nom = "TEST1";
            VM.saveData();

            VM         = new MyViewModel(true);
            VM.rechNom = "TEST1";
            VM.Recherche();

            //Lock du candidat sur POSTE1
            VM.CurrentCandidat = VM.lstCandidatVM[0];
            // Le candidat n'a pas obtenu le diplome
            Assert.IsFalse(VM.CurrentCandidat.IsCAFDES);

            VM.LockCurrentCandidat();
            VM.AjouteL1();
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL1Favorable();
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(1);
            VM.ValideretQuitterL1();
            VM.AjouteL2();
            Assert.IsTrue(VM.CurrentCandidat.IsCAFDES);
            // Decision = Validation Partielle > Now
            Livret2VM oL2 = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL2Favorable();
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(1);
            //Saisie du numéro de diplome
            oL2.DateJury = DateTime.Now.AddDays(-1);
//            oL2.NumeroDiplome = "123546";
            Assert.IsTrue(VM.CurrentCandidat.IsCAFDES);
            VM.ValideretQuitterL2();
            Assert.IsTrue(VM.CurrentCandidat.IsCAFDES);

            // Le candidat a obtenu le diplome
            DiplomeCandVM oDip = VM.CurrentCandidat.getDiplomeCand(oL2);

            Assert.IsNotNull(oDip);
            Assert.AreEqual(oL2.DateJury, oDip.DateObtentionDiplome);
        }//GestVAE021
コード例 #5
0
        public void GESTVAE018()
        {
            MyViewModel VM = new MyViewModel(true);

            VM.AjouteCandidat();
            CandidatVM oCan = VM.CurrentCandidat;

            oCan.Nom = "TEST1";
            VM.saveData();

            VM         = new MyViewModel(true);
            VM.rechNom = "TEST1";
            VM.Recherche();

            //Lock du candidat sur POSTE1
            VM.CurrentCandidat = VM.lstCandidatVM[0];
            // Le candidat n'a pas obtenu le CAFDES
            Assert.IsFalse(VM.CurrentCandidat.IsCAFDES);

            VM.LockCurrentCandidat();
            VM.AjouteL1();
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL1Favorable();
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(1);
            VM.ValideretQuitterL1();
            VM.AjouteL2();
            // Decision = DéFavorable DateValidité > Now
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL2DeFavorable();
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(-1);
            VM.ValideretQuitterL2();

            // Le candidat n'a pas obtenu le diplome
            Livret2VM     oL2  = (Livret2VM)VM.CurrentCandidat.CurrentLivret;
            DiplomeCandVM oDip = VM.CurrentCandidat.getDiplomeCand(oL2);

            Assert.IsNotNull(oDip);
            // L'état du diplome est refusé
            Assert.AreEqual("Refusé", oDip.StatutDiplome);
        }//GestVAE018
コード例 #6
0
        public void TestStattusDCCand()
        {
            DiplomeCandVM oDiplome = null;
            MyViewModel   VM       = new MyViewModel();

            VM.IsInTest = true;
            VM.getData();

            VM.AddCandidatCommand.Execute(null);
            CandidatVM oCand = VM.CurrentCandidat;

            oCand.Nom = "TESTCAND";
            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)VM.CurrentCandidat.CurrentLivret;

            oL1.Numero               = "TESTL1";
            oL1.DateJury             = new DateTime(2019, 04, 12);
            oL1.DateNotificationJury = new DateTime(2019, 04, 13, 0, 0, 0);
            oL1.DateEnvoiL2          = new DateTime(2019, 06, 13, 0, 0, 0);
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL1Favorable();
            VM.ValideretQuitterL1();
            VM.saveData();
            VM.getData();
            Assert.IsTrue(VM.SetCurrentCandidat("TESTCAND"));
            VM.CurrentCandidat.CurrentLivret = VM.CurrentCandidat.lstLivrets[0];
            Assert.AreEqual("TESTL1", VM.CurrentCandidat.CurrentLivret.Numero);

            // Création du L2 Premier passage
            VM.CloturerL1etCreerL2();
            // le diplome du candidat passe à encours
            oDiplome = VM.CurrentCandidat.lstDiplomesCandVMs[0];
            Assert.AreEqual("En cours", oDiplome.StatutDiplome);
            Assert.AreEqual("", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[3].Statut);

            Livret2VM oLiv = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            oLiv.lstDCLivret[0].IsAValider = true;
            oLiv.lstDCLivret[1].IsAValider = true;
            oLiv.lstDCLivret[2].IsAValider = false;
            oLiv.lstDCLivret[3].IsAValider = false;
            VM.ValideretQuitterL2();
            // Le diplome est en cours
            // les DC1 et DC2 sont encours, DC3 et DC4 non renseigné
            oDiplome = VM.CurrentCandidat.lstDiplomesCandVMs[0];
            Assert.AreEqual("En cours", oDiplome.StatutDiplome);
            Assert.AreEqual("En cours", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual("En cours", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[3].Statut);

            //// DECISION PARTIELLE ////
            oLiv.FTO_SetDecisionJuryL2Partielle();
            oLiv.DateJury = new DateTime(2019, 08, 02);
            oLiv.lstDCLivret[0].Decision = String.Format("{0:D}-Validation", MyEnums.DecisionJuryL2.DECISION_L2_FAVORABLE);
            oLiv.lstDCLivret[1].Decision = String.Format("{0:D}-Refus de Validation", MyEnums.DecisionJuryL2.DECISION_L2_DEFAVORABLE);
            VM.ValideretQuitterL2();

            // Le diplome passe en Validé patiellement
            // DC1 = Validé, DC2 = Refusé
            oDiplome = VM.CurrentCandidat.lstDiplomesCandVMs[0];
            Assert.AreEqual("Validé Partiellement", oDiplome.StatutDiplome);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual(new DateTime(2019, 08, 02), oDiplome.lstDCCands[0].DateObtention);
            Assert.AreEqual("Refusé", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[3].Statut);

            // 2nd passage
            //============
            VM.AjouteL2();
            oLiv = (Livret2VM)VM.CurrentCandidat.CurrentLivret;
            oLiv.lstDCLivret[0].IsAValider = false;
            oLiv.lstDCLivret[1].IsAValider = true;
            oLiv.lstDCLivret[2].IsAValider = true;
            oLiv.lstDCLivret[3].IsAValider = true;
            VM.ValideretQuitterL2();
            Assert.AreEqual("Validé Partiellement", oDiplome.StatutDiplome);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual("En cours", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual("En cours", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual("En cours", oDiplome.lstDCCands[3].Statut);

            //// DECISION PARTIELLE ////
            oLiv.FTO_SetDecisionJuryL2Partielle(new DateTime(2019, 08, 03));
            oLiv.lstDCLivret[1].Decision = String.Format("{0:D}-Validation", MyEnums.DecisionJuryL2.DECISION_L2_FAVORABLE);
            oLiv.lstDCLivret[2].Decision = String.Format("{0:D}-Validation", MyEnums.DecisionJuryL2.DECISION_L2_FAVORABLE);
            oLiv.lstDCLivret[3].Decision = String.Format("{0:D}-Refus de Validation", MyEnums.DecisionJuryL2.DECISION_L2_DEFAVORABLE);
            VM.ValideretQuitterL2();

            Assert.AreEqual("Validé Partiellement", oDiplome.StatutDiplome);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual(new DateTime(2019, 08, 02), oDiplome.lstDCCands[0].DateObtention);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual(new DateTime(2019, 08, 03), oDiplome.lstDCCands[1].DateObtention);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual(new DateTime(2019, 08, 03), oDiplome.lstDCCands[2].DateObtention);
            Assert.AreEqual("Refusé", oDiplome.lstDCCands[3].Statut);

            // 3eme passage
            //============
            VM.AjouteL2();
            oLiv = (Livret2VM)VM.CurrentCandidat.CurrentLivret;
            oLiv.lstDCLivret[0].IsAValider = false;
            oLiv.lstDCLivret[1].IsAValider = false;
            oLiv.lstDCLivret[2].IsAValider = false;
            oLiv.lstDCLivret[3].IsAValider = true;
            VM.ValideretQuitterL2();
            Assert.AreEqual("Validé Partiellement", oDiplome.StatutDiplome);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual("En cours", oDiplome.lstDCCands[3].Statut);

            //// DECISION PARTIELLE ////
            oLiv.FTO_SetDecisionJuryL2Favorable(new DateTime(2019, 08, 04), pMAJ_DC_AValider: false);
            VM.ValideretQuitterL2();

            Assert.AreEqual("Validé", oDiplome.StatutDiplome);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual(new DateTime(2019, 08, 02), oDiplome.lstDCCands[0].DateObtention);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual(new DateTime(2019, 08, 03), oDiplome.lstDCCands[1].DateObtention);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual(new DateTime(2019, 08, 03), oDiplome.lstDCCands[2].DateObtention);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[3].Statut);
            Assert.AreEqual(new DateTime(2019, 08, 04), oDiplome.lstDCCands[3].DateObtention);
            VM.LockCurrentCandidat();
            VM.DeleteCurrentCandidat();
            VM.saveData();
        }
コード例 #7
0
        public void TestDecisionL2Favorable()
        {
            DiplomeCandVM oDiplome = null;
            MyViewModel   VM       = new MyViewModel();

            VM.IsInTest = true;
            VM.getData();

            VM.AddCandidatCommand.Execute(null);
            CandidatVM oCand = VM.CurrentCandidat;

            oCand.Nom = "TESTCAND";
            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)VM.CurrentCandidat.CurrentLivret;

            oL1.Numero               = "TESTL1";
            oL1.DateJury             = new DateTime(2019, 04, 12);
            oL1.DateNotificationJury = new DateTime(2019, 04, 13, 0, 0, 0);
            oL1.DateEnvoiL2          = new DateTime(2019, 06, 13, 0, 0, 0);
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL1Favorable();
            VM.ValideretQuitterL1();
            VM.saveData();
            VM.getData();
            Assert.IsTrue(VM.SetCurrentCandidat("TESTCAND"));
            VM.CurrentCandidat.CurrentLivret = VM.CurrentCandidat.lstLivrets[0];
            Assert.AreEqual("TESTL1", VM.CurrentCandidat.CurrentLivret.Numero);

            // Création du L2 Premier passage
            VM.CloturerL1etCreerL2();
            // le diplome du candidat passe à encours
            oDiplome = VM.CurrentCandidat.lstDiplomesCandVMs[0];
            Assert.AreEqual("En cours", oDiplome.StatutDiplome);
            Assert.AreEqual("", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[3].Statut);

            Livret2VM oLiv = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            oLiv.lstDCLivret[0].IsAValider = true;
            oLiv.lstDCLivret[1].IsAValider = true;
            oLiv.lstDCLivret[2].IsAValider = false;
            oLiv.lstDCLivret[3].IsAValider = false;
            VM.ValideretQuitterL2();
            // Le diplome est en cours
            // les DC1 et DC2 sont encours, DC3 et DC4 non renseigné
            oDiplome = VM.CurrentCandidat.lstDiplomesCandVMs[0];
            Assert.AreEqual("En cours", oDiplome.StatutDiplome);
            Assert.AreEqual("En cours", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual("En cours", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[3].Statut);

            //// DECISION FAVORABLE => uniquement sur les DC AValider ////
            oLiv.FTO_SetDecisionJuryL2Favorable(pCreateAllDC: false);
            VM.ValideretQuitterL2();

            // Le diplome passe en Validé partiellement
            // DC1 = Validé, DC2 = Refusé
            oDiplome = VM.CurrentCandidat.lstDiplomesCandVMs[0];
            Assert.AreEqual("Validé Partiellement", oDiplome.StatutDiplome);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[0].Statut);
            Assert.AreEqual("Validé", oDiplome.lstDCCands[1].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[2].Statut);
            Assert.AreEqual("", oDiplome.lstDCCands[3].Statut);

            VM.LockCurrentCandidat();
            VM.DeleteCurrentCandidat();
            VM.saveData();
        }