コード例 #1
0
        public void CalculerStatutTestThrowsNullReferenceException833()
        {
            DomaineCompetenceCand        domaineCompetenceCand;
            List <DomaineCompetenceCand> list;
            ObservableCollection <DomaineCompetenceCand> observableCollection;
            DiplomeCand diplomeCand;

            domaineCompetenceCand                      = new DomaineCompetenceCand();
            domaineCompetenceCand.Diplome_ID           = 0;
            domaineCompetenceCand.oDiplomeCand         = (DiplomeCand)null;
            domaineCompetenceCand.DomaineCompetence_ID = new int?(1);
            domaineCompetenceCand.oDomaineCompetence   = (DomaineCompetence)null;
            ((GestVAEBase)domaineCompetenceCand).ID    = 0;
            DomaineCompetenceCand[] domaineCompetenceCands = new DomaineCompetenceCand[2];
            domaineCompetenceCands[0] = domaineCompetenceCand;
            list = new List <DomaineCompetenceCand>
                       ((IEnumerable <DomaineCompetenceCand>)domaineCompetenceCands);
            observableCollection          = new ObservableCollection <DomaineCompetenceCand>(list);
            diplomeCand                   = new DiplomeCand();
            diplomeCand.Candidat_ID       = 0;
            diplomeCand.oCandidat         = (Candidat)null;
            diplomeCand.Diplome_ID        = 0;
            diplomeCand.oDiplome          = (Diplome)null;
            diplomeCand.NumeroDiplome     = (string)null;
            diplomeCand.lstDCCands        = observableCollection;
            ((GestVAEBase)diplomeCand).ID = 0;
            this.CalculerStatutTest(diplomeCand);
        }
コード例 #2
0
        public void TestAjoutDiplome()
        {
            DiplomeCand oDipC = oCand.AddDiplome(oDip);

            Diplome oDipDefaut = Diplome.getDiplomeParDefaut();

            Assert.AreEqual(oDip.ID, oDipC.oDiplome.ID);
        }
コード例 #3
0
        public DiplomeCandVM AjoutDiplomeCand(Diplome pDiplome)
        {
            DiplomeCand   oDiplCand    = TheCandidat.AddDiplome(pDiplome);
            DiplomeCandVM oDiplomeCand = new DiplomeCandVM(oDiplCand);

            lstDiplomesCandVMs.Add(oDiplomeCand);
            RaisePropertyChanged("lstDiplomesCandVMs");
            RaisePropertyChanged("lstDiplomesCandVMsActifs");
            return(oDiplomeCand);
        }
コード例 #4
0
        public void CalculerStatutTestThrowsArgumentNullException46()
        {
            DiplomeCand diplomeCand;

            diplomeCand                   = new DiplomeCand();
            diplomeCand.Candidat_ID       = 0;
            diplomeCand.oCandidat         = (Candidat)null;
            diplomeCand.Diplome_ID        = 0;
            diplomeCand.oDiplome          = (Diplome)null;
            diplomeCand.NumeroDiplome     = (string)null;
            diplomeCand.lstDCCands        = (ObservableCollection <DomaineCompetenceCand>)null;
            ((GestVAEBase)diplomeCand).ID = 0;
            this.CalculerStatutTest(diplomeCand);
        }
コード例 #5
0
        public void CalculerStatutTest811()
        {
            List <DomaineCompetenceCand> list;
            ObservableCollection <DomaineCompetenceCand> observableCollection;
            DiplomeCand diplomeCand;

            DomaineCompetenceCand[] domaineCompetenceCands = new DomaineCompetenceCand[0];
            list = new List <DomaineCompetenceCand>
                       ((IEnumerable <DomaineCompetenceCand>)domaineCompetenceCands);
            observableCollection          = new ObservableCollection <DomaineCompetenceCand>(list);
            diplomeCand                   = new DiplomeCand();
            diplomeCand.Candidat_ID       = 0;
            diplomeCand.oCandidat         = (Candidat)null;
            diplomeCand.Diplome_ID        = 0;
            diplomeCand.oDiplome          = (Diplome)null;
            diplomeCand.NumeroDiplome     = (string)null;
            diplomeCand.lstDCCands        = observableCollection;
            ((GestVAEBase)diplomeCand).ID = 0;
            this.CalculerStatutTest(diplomeCand);
            PexAssert.IsNotNull((object)diplomeCand);
            PexAssert.AreEqual <int>(0, diplomeCand.Candidat_ID);
            PexAssert.IsNull(diplomeCand.oCandidat);
            PexAssert.AreEqual <int>(0, diplomeCand.Diplome_ID);
            PexAssert.IsNull(diplomeCand.oDiplome);
            PexAssert.AreEqual <string>("", diplomeCand.Statut);
            PexAssert.IsNotNull((object)(diplomeCand.DateObtention));
            PexAssert.AreEqual <int>
                (1, ((DateTime)((object)(diplomeCand.DateObtention))).Day);
            PexAssert.AreEqual <DayOfWeek>(DayOfWeek.Monday,
                                           ((DateTime)((object)(diplomeCand.DateObtention))).DayOfWeek);
            PexAssert.AreEqual <int>
                (1, ((DateTime)((object)(diplomeCand.DateObtention))).DayOfYear);
            PexAssert.AreEqual <int>
                (0, ((DateTime)((object)(diplomeCand.DateObtention))).Hour);
            PexAssert.AreEqual <DateTimeKind>(DateTimeKind.Unspecified,
                                              ((DateTime)((object)(diplomeCand.DateObtention))).Kind);
            PexAssert.AreEqual <int>
                (0, ((DateTime)((object)(diplomeCand.DateObtention))).Millisecond);
            PexAssert.AreEqual <int>
                (0, ((DateTime)((object)(diplomeCand.DateObtention))).Minute);
            PexAssert.AreEqual <int>
                (1, ((DateTime)((object)(diplomeCand.DateObtention))).Month);
            PexAssert.AreEqual <int>
                (0, ((DateTime)((object)(diplomeCand.DateObtention))).Second);
            PexAssert.AreEqual <int>
                (1, ((DateTime)((object)(diplomeCand.DateObtention))).Year);
            PexAssert.AreEqual <string>((string)null, diplomeCand.NumeroDiplome);
            PexAssert.IsNotNull(diplomeCand.lstDCCands);
            PexAssert.AreEqual <int>(0, ((GestVAEBase)diplomeCand).ID);
            PexAssert.AreEqual <int>(4, ((GestVAEBase)diplomeCand).dateCreation.Day);
            PexAssert.AreEqual <DayOfWeek>
                (DayOfWeek.Thursday, ((GestVAEBase)diplomeCand).dateCreation.DayOfWeek);
            PexAssert.AreEqual <int>(94, ((GestVAEBase)diplomeCand).dateCreation.DayOfYear);
            PexAssert.AreEqual <int>(16, ((GestVAEBase)diplomeCand).dateCreation.Hour);
            PexAssert.AreEqual <DateTimeKind>
                (DateTimeKind.Local, ((GestVAEBase)diplomeCand).dateCreation.Kind);
            PexAssert.AreEqual <int>
                (583, ((GestVAEBase)diplomeCand).dateCreation.Millisecond);
            PexAssert.AreEqual <int>(27, ((GestVAEBase)diplomeCand).dateCreation.Minute);
            PexAssert.AreEqual <int>(4, ((GestVAEBase)diplomeCand).dateCreation.Month);
            PexAssert.AreEqual <int>(47, ((GestVAEBase)diplomeCand).dateCreation.Second);
            PexAssert.AreEqual <int>(2019, ((GestVAEBase)diplomeCand).dateCreation.Year);
            PexAssert.AreEqual <int>(4, ((GestVAEBase)diplomeCand).dateModif.Day);
            PexAssert.AreEqual <DayOfWeek>
                (DayOfWeek.Thursday, ((GestVAEBase)diplomeCand).dateModif.DayOfWeek);
            PexAssert.AreEqual <int>(94, ((GestVAEBase)diplomeCand).dateModif.DayOfYear);
            PexAssert.AreEqual <int>(16, ((GestVAEBase)diplomeCand).dateModif.Hour);
            PexAssert.AreEqual <DateTimeKind>
                (DateTimeKind.Local, ((GestVAEBase)diplomeCand).dateModif.Kind);
            PexAssert.AreEqual <int>(583, ((GestVAEBase)diplomeCand).dateModif.Millisecond);
            PexAssert.AreEqual <int>(27, ((GestVAEBase)diplomeCand).dateModif.Minute);
            PexAssert.AreEqual <int>(4, ((GestVAEBase)diplomeCand).dateModif.Month);
            PexAssert.AreEqual <int>(47, ((GestVAEBase)diplomeCand).dateModif.Second);
            PexAssert.AreEqual <int>(2019, ((GestVAEBase)diplomeCand).dateModif.Year);
            PexAssert.AreEqual <bool>(false, ((GestVAEBase)diplomeCand).bDeleted);
            PexAssert.AreEqual <string>("", ((GestVAEBase)diplomeCand).AttSup);
        }
コード例 #6
0
ファイル: DiplomeCandTest.cs プロジェクト: collinmarc/gestvae
 public void CalculerStatutTest([PexAssumeUnderTest] DiplomeCand target)
 {
     target.CalculerStatut();
     // TODO: ajouter des assertions à méthode DiplomeCandTest.CalculerStatutTest(DiplomeCand)
 }
コード例 #7
0
 public DiplomeCandVM(DiplomeCand pDiplomeCand) : base(pDiplomeCand)
 {
     TheDiplomeCand = pDiplomeCand;
 }