コード例 #1
0
        public void TestCRUDTest()
        {
            int nId = 0;

            nId = oCand.ID;
            Livret1 oL1 = new Livret1();

            oL1.Numero             = "20190115001";
            oL1.VecteurInformation = "COURIER";
            oL1.TypeDemande        = "Courrier";

            oCand.lstLivrets1.Add(oL1);

            Livret2 oL2 = new Livret2();

            oL2.Numero = "1";
            oCand.lstLivrets2.Add(oL2);

            ctx.SaveChanges();

            ctx   = Context.instance;
            oCand = ctx.Candidats.Find(nId);
            Assert.AreEqual(1, oCand.lstLivrets1.Count);
            Assert.AreEqual(1, oCand.lstLivrets2.Count);
        }
コード例 #2
0
ファイル: Livret1VM.cs プロジェクト: collinmarc/gestvae
 public Livret1VM(Livret1 pLivret) : base(pLivret)
 {
     foreach (PieceJointeL1 opj in pLivret.lstPiecesJointes)
     {
         lstPieceJointe.Add(new PieceJointeLivretVM(opj, "L1"));
     }
 }
コード例 #3
0
        public void TestCRUDLivret1PJTest()
        {
            int nId = 0;

            nId = oCand.ID;
            Livret1 oL1 = new Livret1();

            oL1.Numero = "20190115001";

            PieceJointeL1 oPJ = new PieceJointeL1();

            oPJ.Libelle = "CNI";
            oPJ.IsRecu  = true;
            oPJ.IsOK    = false;
            oL1.lstPiecesJointes.Add(oPJ);

            oCand.lstLivrets1.Add(oL1);


            ctx.SaveChanges();

            ctx   = Context.instance;
            oCand = ctx.Candidats.Find(nId);
            Assert.AreEqual(1, oCand.lstLivrets1.Count);

            oL1 = oCand.lstLivrets1[0];
            PieceJointeL1 oPJ2 = oL1.lstPiecesJointes[0];

            Assert.AreEqual(oPJ.Libelle, oPJ2.Libelle);
            Assert.AreEqual(oPJ.IsRecu, oPJ2.IsRecu);
            Assert.AreEqual(oPJ.IsOK, oPJ2.IsOK);
        }
コード例 #4
0
ファイル: Livret1VM.cs プロジェクト: collinmarc/gestvae
        public Livret1VM() : base()
        {
            Livret oReturn = null;

            oReturn          = new Livret1();
            oReturn.oDiplome = Diplome.getDiplomeParDefaut();
            TheItem          = oReturn;
        }
コード例 #5
0
ファイル: Livret1VM.cs プロジェクト: collinmarc/gestvae
        public Livret1VM(Boolean pIsCandidatLocked) : base(pIsCandidatLocked)
        {
            Livret oReturn = null;

            oReturn = new Livret1();


            oReturn.oDiplome = Diplome.getDiplomeParDefaut();
            TheItem          = oReturn;
        }
コード例 #6
0
        public void TestCRUDLivret1Test()
        {
            int nId = 0;

            nId = oCand.ID;
            Livret1 oL1 = new Livret1();

            oL1.Numero                         = "20190115001";
            oL1.IsContrat                      = false;
            oL1.TypeDemande                    = "Courrier";
            oL1.VecteurInformation             = "site Ehesp";
            oL1.EtatLivret                     = "0-Demandé";
            oL1.Date1ereDemandePieceManquantes = new DateTime(2019, 05, 10);
            oL1.Date2emeDemandePieceManquantes = new DateTime(2019, 05, 11);
            oL1.DateDemande1erRetour           = new DateTime(2019, 05, 12);
            oL1.DateDemande2emeRetour          = new DateTime(2019, 05, 13);
            oL1.DateReceptionPiecesManquantes  = new DateTime(2019, 05, 14);
            oL1.IsCNIOK                        = true;
            oL1.DateValiditeCNI                = new DateTime(2020, 01, 21);

            oCand.lstLivrets1.Add(oL1);


            ctx.SaveChanges();

            ctx   = Context.instance;
            oCand = ctx.Candidats.Find(nId);
            Assert.AreEqual(1, oCand.lstLivrets1.Count);

            Livret1 oL1Lu = oCand.lstLivrets1[0];

            Assert.AreEqual(oL1.Numero, oL1Lu.Numero);
            Assert.AreEqual(oL1.IsContrat, oL1Lu.IsContrat);
            Assert.AreEqual(oL1.TypeDemande, oL1Lu.TypeDemande);
            Assert.AreEqual(oL1.VecteurInformation, oL1Lu.VecteurInformation);
            Assert.AreEqual(oL1.EtatLivret, oL1Lu.EtatLivret);
            Assert.AreEqual(oL1.Date1ereDemandePieceManquantes, oL1Lu.Date1ereDemandePieceManquantes);
            Assert.AreEqual(oL1.Date2emeDemandePieceManquantes, oL1Lu.Date2emeDemandePieceManquantes);
            Assert.AreEqual(oL1.DateDemande1erRetour, oL1Lu.DateDemande1erRetour);
            Assert.AreEqual(oL1.DateDemande2emeRetour, oL1Lu.DateDemande2emeRetour);
            Assert.AreEqual(oL1.DateReceptionPiecesManquantes, oL1Lu.DateReceptionPiecesManquantes);
            Assert.IsTrue(oL1Lu.IsCNIOK);
            Assert.AreEqual(oL1.DateValiditeCNI, oL1Lu.DateValiditeCNI);

            oL1Lu.IsCNIOK         = false;
            oL1Lu.DateValiditeCNI = null;

            ctx.SaveChanges();
            oCand = ctx.Candidats.Find(nId);
            Assert.AreEqual(1, oCand.lstLivrets1.Count);
            oL1Lu = oCand.lstLivrets1[0];
            Assert.IsFalse(oL1Lu.IsCNIOK);
            Assert.IsNull(oL1Lu.DateValiditeCNI);
        }
コード例 #7
0
        public void TestCreationL1()
        {
            Livret1 oL1 = new Livret1();

            oL1.Numero = "20190115001";
            Assert.IsFalse(oL1.isClos);
            Assert.IsTrue(oL1.IsNonRecu);
            Assert.IsFalse(oL1.IsContrat);
            Assert.IsFalse(oL1.IsConvention);
            Assert.AreEqual(oL1.oDiplome.ID, Diplome.getDiplomeParDefaut().ID);
            Assert.IsFalse(oL1.IsCNIOK);
            Assert.IsNull(oL1.DateValiditeCNI);
        }
コード例 #8
0
ファイル: RecoursTest.cs プロジェクト: collinmarc/gestvae
        public void TestCRUDRecoursTest()
        {
            int nId = 0;

            Livret1 oL1 = new Livret1();

            oL1.create1erJury();
            oCand.lstLivrets1.Add(oL1);
            ctx.SaveChanges();

//            Recours oRec = new Recours(oL1.get1erJury());
            Recours oRec = new Recours();

            oRec.DateDepot    = Convert.ToDateTime("10/01/2019");
            oRec.TypeRecours  = EnumTypeRecours.Contentieux;
            oRec.MotifRecours = "AAAA";
            oRec.NomJury      = "BBBB";
            oRec.Decision     = "50-Favorable";

            oL1.get1erJury().lstRecours.Add(oRec);
            ctx.SaveChanges();

            nId = oCand.ID;
            Context.Reset();

            ctx = Context.instance;

            oCand = ctx.Candidats.Find(nId);
            oL1   = oCand.lstLivrets1[0];
            Assert.AreEqual(1, oL1.get1erJury().lstRecours.Count);

            Recours oRec2 = oL1.get1erJury().lstRecours[0];

            Assert.AreEqual(oRec.ID, oRec2.ID);
            Assert.AreEqual(oRec.DateDepot, oRec2.DateDepot);
            Assert.AreEqual(oRec.TypeRecours, oRec2.TypeRecours);
            Assert.AreEqual(oRec.MotifRecours, oRec2.MotifRecours);
            Assert.AreEqual(oRec.NomJury, oRec2.NomJury);
            Assert.AreEqual(oRec.Decision, oRec2.Decision);
        }