示例#1
0
        public void TestDateDeValiditéL1()
        {
            MyViewModel VM = new MyViewModel(true);

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

            VM.AjouteL1();
            VM.ValideretQuitterL1();

            Livret1VM oL1 = (Livret1VM)oCand.CurrentLivret;

            Assert.AreEqual(oL1.DateDemande.Value.AddYears(3), oL1.DateValidite);
            oL1.EtatLivret = String.Format("{0:D}-RecuComplet", MyEnums.EtatL1.ETAT_L1_RECU_COMPLET);
            Assert.AreEqual(oL1.DateDemande.Value.AddYears(3), oL1.DateValidite);
            oL1.FTO_SetDecisionJuryL1Favorable(DateTime.Today.AddDays(2));
            Assert.AreEqual(oL1.DateJury.Value.AddYears(3), oL1.DateValidite);
            oL1.FTO_SetDecisionJuryL1DeFavorable(DateTime.Today.AddDays(2));
            Assert.AreEqual(oL1.DateJury, oL1.DateValidite);
            oL1.IsRecoursDemande    = true;
            oL1.DateJuryRecours     = oL1.DateJury.Value.AddDays(5);
            oL1.DecisionJuryRecours = String.Format("{0:D}-Defavorable", MyEnums.DecisionJuryL1.DECISION_L1_DEFAVORABLE);
            Assert.AreEqual(oL1.DateJury, oL1.DateValidite);
            oL1.DecisionJuryRecours = String.Format("{0:D}-Favorable", MyEnums.DecisionJuryL1.DECISION_L1_FAVORABLE);
            Assert.AreEqual(oL1.DateJury.Value.AddYears(3), oL1.DateValidite);
        }
示例#2
0
        public void TestJury()
        {
            MyViewModel VM  = new MyViewModel(true);
            int         nId = 0;

            nId        = oCand.ID;
            VM.rechNom = oCand.Nom;
            VM.Recherche(true);
            VM.CurrentCandidat = VM.lstCandidatVM[0];
            VM.LockCurrentCandidat();
            VM.AjouteL1();
            VM.ValideretQuitterL1();
            Livret1VM oL1 = (Livret1VM)VM.CurrentCandidat.CurrentLivret;

            oL1.Numero           = "20190115001";
            oL1.MotifGeneralJury = "MotifG";
            oL1.MotifDetailJury  = "MotifD";
            VM.saveData();

            VM.rechNom = oCand.Nom;
            VM.Recherche(true);
            VM.CurrentCandidat = VM.lstCandidatVM[0];
            VM.LockCurrentCandidat();
            oL1 = (Livret1VM)VM.CurrentCandidat.lstLivrets[0];

            Assert.AreEqual("MotifG", oL1.MotifGeneralJury);
            Assert.AreEqual("MotifD", oL1.MotifDetailJury);
        }
示例#3
0
        public void TestCreationL2()
        {
            MyViewModel VM = new MyViewModel(true);

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

            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)oCand.CurrentLivret;

            oL1.EtatLivret = String.Format("{0:D}-Recu complet", MyEnums.EtatL1.ETAT_L1_RECU_COMPLET);
            oL1.FTO_SetDecisionJuryL1Favorable();
            VM.ValideretQuitterL1();
            Assert.AreEqual(1, oCand.lstLivrets.Count);

            oL1                 = (Livret1VM)oCand.CurrentLivret;
            oL1.IsCNIOK         = true;
            oL1.DateValiditeCNI = new DateTime(2020, 01, 01);
            oL1.IsEnregistre    = true;
            oL1.IsPaye          = true;
            VM.AjouteL2();
            VM.ValideretQuitterL2();
            Assert.AreEqual(2, oCand.lstLivrets.Count);

            Livret2VM oL2 = (Livret2VM)oCand.lstLivrets[1];

            Assert.AreEqual(oL1.IsCNIOK, oL2.IsCNIOK);
            Assert.AreEqual(oL1.DateValiditeCNI, oL2.DateValiditeCNI);
            Assert.AreEqual(false, oL2.IsEnregistre);
            Assert.AreEqual(false, oL2.IsPaye);
        }
示例#4
0
        public void setContexte(MyViewModel pViewModel)
        {
            this.DataContext = pViewModel;
            m_oLivret        = (Livret1VM)pViewModel.CurrentCandidat.CurrentLivret;
            // Mise a jour de la liste des Etat pour faire fonctionner le Set Etat
            m_oLivret.LstEtatLivret = pViewModel.LstEtatLivret1;
            // Bind Manuel car incompréhensible
            rbcontrat.IsChecked    = m_oLivret.IsContrat;
            rbconvention.IsChecked = m_oLivret.IsConvention;
            rbIsNonRecu.IsChecked  = m_oLivret.IsNonRecu;

            pViewModel.CloseAction = new Action(() => this.Close());
        }
示例#5
0
        public void TestDateDeRecevabilitechangeAvecDatenotificationjury()
        {
            DateTime    dateV1 = DateTime.Today.AddDays(10);
            MyViewModel VM     = new MyViewModel(true);

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

            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)oCand.CurrentLivret;

            oL1.EtatLivret           = String.Format("{0:D}-Recu complet", MyEnums.EtatL1.ETAT_L1_RECU_COMPLET);
            oL1.DateValidite         = dateV1;
            oL1.DateNotificationJury = DateTime.Today.AddDays(1);
            Assert.AreEqual(dateV1, oL1.DateValidite);
        }
示例#6
0
        public void TestDateDeRecevabilite()
        {
            MyViewModel VM = new MyViewModel(true);

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

            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)oCand.CurrentLivret;

            oL1.EtatLivret = String.Format("{0:D}-Recu complet", MyEnums.EtatL1.ETAT_L1_RECU_COMPLET);
            VM.ValideretQuitterL1();

            oL1 = (Livret1VM)oCand.CurrentLivret;
            Assert.IsNull(oL1.DateJury);
            Assert.IsNull(oL1.DateDepotRecours);
        }
示例#7
0
        public void TestDatePrevionnelleJury()
        {
            MyViewModel VM = new MyViewModel(true);

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

            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)oCand.CurrentLivret;

            oL1.FTO_SetDecisionJuryL1Favorable();
            VM.ValideretQuitterL1();
            VM.AjouteL2();

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

            oL2.DatePrevJury1 = DateTime.Today;
            Assert.AreEqual(DateTime.Today.AddDays(1), oL2.DatePrevJury2);
        }
示例#8
0
        public void TestDateDeValiditéL1L2()
        {
            MyViewModel VM = new MyViewModel(true);

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

            VM.AjouteL1();
            VM.ValideretQuitterL1();

            Livret1VM oL1 = (Livret1VM)oCand.CurrentLivret;

            // Jury = Après-demain
            oL1.FTO_SetDecisionJuryL1Favorable(DateTime.Today.AddDays(2));

            VM.CloturerL1etCreerL2();
            Assert.IsTrue(VM.CurrentCandidat.CurrentLivret is Livret2VM);
            Assert.AreEqual(oL1.DateValidite, ((Livret2VM)VM.CurrentCandidat.CurrentLivret).DateLimiteReceptEHESP);
        }
示例#9
0
        public void TestchgmtDateValiditesurdatenotifJury()
        {
            MyViewModel VM = new MyViewModel(true);

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

            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)oCand.CurrentLivret;

            oL1.DateValidite = DateTime.Today.AddDays(10);
            oL1.FTO_SetDecisionJuryL1Favorable();
            VM.ValideretQuitterL1();
            VM.saveData();
            VM.AjouteL2();
            Livret2VM oL2 = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            Assert.AreEqual(oL1.DateValidite, oL2.DateValidite);
            oL2.DateNotificationJury = DateTime.Today;
            Assert.AreEqual(oL1.DateValidite, oL2.DateValidite);
        }
示例#10
0
        public void TestNumerotationDeLivret()
        {
            // Création du premierLivret
            Livret1VM oL1 = new Livret1VM(false);

            Assert.IsTrue(String.IsNullOrEmpty(oL1.Numero));
            oL1.EtatLivret = String.Format("{0:D}-Reçu incomplet", MyEnums.EtatL1.ETAT_L1_RECU_INCOMPLET);
            // Le numéro est calculé lors de la réception
            Assert.IsFalse(String.IsNullOrEmpty(oL1.Numero));
            Assert.AreEqual(DateTime.Now.ToString("yyMM"), oL1.Numero.Substring(0, 4));
            Int32 Num1 = Convert.ToInt32(oL1.Numero.Substring(4));

            // Création d'un second Livret
            Livret1VM oL2 = new Livret1VM(false);

            oL2.EtatLivret = String.Format("{0:D}-Reçu incomplet", MyEnums.EtatL1.ETAT_L1_RECU_INCOMPLET);

            // Les numéros sont bien différents
            Assert.AreNotEqual(oL1.Numero, oL2.Numero);
            Int32 Num2 = Convert.ToInt32(oL2.Numero.Substring(4));

            Assert.AreEqual(Num1 + 1, Num2);
        }
示例#11
0
        public void testDCAValider()
        {
            MyViewModel VM = new MyViewModel(true);

            //Ajout d'un candidat avec un L1 Favorable
            VM.AjouteCandidat();
            CandidatVM oCand = VM.CurrentCandidat;

            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)oCand.CurrentLivret;

            oL1.FTO_SetDecisionJuryL1Favorable();
            VM.ValideretQuitterL1();
            VM.saveData();

            // Ajout D'un L2
            VM.AjouteL2();
            Livret2VM oL2 = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            Assert.IsTrue(oL2.lstDCLivret[0].IsAValider);
            Assert.IsTrue(oL2.lstDCLivret[1].IsAValider);
            Assert.IsTrue(oL2.lstDCLivret[2].IsAValider);
            Assert.IsTrue(oL2.lstDCLivret[3].IsAValider);
            Assert.AreEqual("En Cours", oL2.lstDCLivret[0].Statut);
            Assert.AreEqual("En Cours", oL2.lstDCLivret[1].Statut);
            Assert.AreEqual("En Cours", oL2.lstDCLivret[2].Statut);
            Assert.AreEqual("En Cours", oL2.lstDCLivret[3].Statut);

            // Validation partielle du L2
            oL2.FTO_SetDecisionJuryL2Partielle();
            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();
            VM.saveData();

            // test de l'état des DCCand après Décision du jury
            Assert.AreEqual("Validé", oCand.lstDiplomesCandVMs[0].StatutDC1);
            Assert.AreEqual("Refusé", oCand.lstDiplomesCandVMs[0].StatutDC2);
            Assert.AreEqual("Validé", oCand.lstDiplomesCandVMs[0].StatutDC1);
            Assert.AreEqual("Refusé", oCand.lstDiplomesCandVMs[0].StatutDC4);

            // Création d'un nouveau L2
            VM.AjouteL2();
            oL2 = (Livret2VM)VM.CurrentCandidat.CurrentLivret;
            Assert.IsFalse(oL2.lstDCLivret[0].IsAValider);
            Assert.IsTrue(oL2.lstDCLivret[1].IsAValider);
            Assert.IsFalse(oL2.lstDCLivret[2].IsAValider);
            Assert.IsTrue(oL2.lstDCLivret[3].IsAValider);
            Assert.AreEqual("Validé", oL2.lstDCLivret[0].Statut);
            Assert.AreEqual("Refusé", oL2.lstDCLivret[1].Statut);
            Assert.AreEqual("Validé", oL2.lstDCLivret[2].Statut);
            Assert.AreEqual("Refusé", oL2.lstDCLivret[3].Statut);

            // Validation PArtielle du L2
            oL2.FTO_SetDecisionJuryL2Partielle();
            oL2.lstDCLivret[1].Decision = oL2.DecisionL2ModuleFavorable;
            oL2.lstDCLivret[3].Decision = oL2.DecisionL2ModuleDeFavorable;
            VM.ValideretQuitterL2();
            VM.saveData();
            // test de l'état des DCCand
            Assert.AreEqual("Validé", oCand.lstDiplomesCandVMs[0].StatutDC1);
            Assert.AreEqual("Validé", oCand.lstDiplomesCandVMs[0].StatutDC2);
            Assert.AreEqual("Validé", oCand.lstDiplomesCandVMs[0].StatutDC1);
            Assert.AreEqual("Refusé", oCand.lstDiplomesCandVMs[0].StatutDC4);

            VM.AjouteL2();
            oL2 = (Livret2VM)VM.CurrentCandidat.CurrentLivret;
            Assert.IsFalse(oL2.lstDCLivret[0].IsAValider);
            Assert.IsFalse(oL2.lstDCLivret[1].IsAValider);
            Assert.IsFalse(oL2.lstDCLivret[2].IsAValider);
            Assert.IsTrue(oL2.lstDCLivret[3].IsAValider);
            Assert.AreEqual("Validé", oL2.lstDCLivret[0].Statut);
            Assert.AreEqual("Validé", oL2.lstDCLivret[1].Statut);
            Assert.AreEqual("Validé", oL2.lstDCLivret[2].Statut);
            Assert.AreEqual("Refusé", oL2.lstDCLivret[3].Statut);
            oL2.FTO_SetDecisionJuryL2Partielle();
            oL2.lstDCLivret[3].Decision = oL2.DecisionL2ModuleFavorable;
            VM.ValideretQuitterL2();
            VM.saveData();
        }
示例#12
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();
        }
示例#13
0
        public void GESTVAE016()
        {
            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();
            VM.CurrentCandidat = VM.lstCandidatVM[0];
            VM.LockCurrentCandidat();

            // Avant Verrouillage => Ajout L2 impossible
            Assert.IsFalse(VM.AjouteL2Command.CanExecute(null));

            // Ajout du Livret1 Favorable Date de validité > Aujourd'hui
            VM.AjouteL1();
            Livret1VM oL1 = (Livret1VM)VM.CurrentCandidat.CurrentLivret;

            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL1Favorable();
            // Date de validé > Ajourd'hui
            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(1);
            VM.ValideretQuitterL1();

            // Ajout d'un Livret2 (non complet)
            VM.AjouteL2();
            Livret2VM oL2 = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            VM.CurrentCandidat.CurrentLivret.DateValidite = DateTime.Now.AddDays(1);
            oL2.lstDCLivret[0].IsAValider = true;
            oL2.lstDCLivret[1].IsAValider = true;
            oL2.lstDCLivret[2].IsAValider = true;
            oL2.lstDCLivret[3].IsAValider = true;
            VM.ValideretQuitterL2();
            //Ajout de L2 impossible car L2 en cours
            Assert.IsTrue(VM.CurrentCandidat.ISL2EnCours);
            Assert.IsFalse(VM.AjouteL2Command.CanExecute(null));

            // Le L2 est Validé Partiellement => on peut Ajouter un L2
            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL2Partielle();
            oL2.lstDCLivret[0].Decision = oL2.DecisionL2ModuleFavorable;
            oL2.lstDCLivret[1].Decision = oL2.DecisionL2ModuleDeFavorable;
            oL2.lstDCLivret[2].Decision = oL2.DecisionL2ModuleDeFavorable;
            oL2.lstDCLivret[3].Decision = oL2.DecisionL2ModuleDeFavorable;

            Assert.IsTrue(VM.AjouteL2Command.CanExecute(null));

            // Même Si le Livret1 est echue
            oL1.DateValidite = DateTime.Now.AddDays(-1);
            Assert.IsTrue(VM.IsCurrentCandidatAddL2Available);
            Assert.IsTrue(VM.AjouteL2Command.CanExecute(null));

            // Et même Si on Lui ajoute un L2 Refusé
            VM.AjouteL2();
            Livret2VM oL2bis = (Livret2VM)VM.CurrentCandidat.CurrentLivret;

            VM.CurrentCandidat.CurrentLivret.FTO_SetDecisionJuryL2DeFavorable();
            oL2bis.DateValidite = DateTime.Now.AddDays(1);
            VM.ValideretQuitterL2();

            Assert.IsTrue(VM.AjouteL2Command.CanExecute(null));
        }//GestVAE016
示例#14
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();
        }
示例#15
0
        private void btnAddEchange_Click(object sender, RoutedEventArgs e)
        {
            Livret1VM oLiv = (Livret1VM)VM.CurrentCandidat.CurrentLivret;

            oLiv.addEchangeL1();
        }