Exemplo n.º 1
0
        internal Entretien(int id,
                           Creneau creneau,
                           EntretienStatut statut,
                           Candidat candidat,
                           Recruteur recruteur,
                           Salle salle)
        {
            if (recruteur.specialite != candidat.specialite)
            {
                throw new SpecialiteIncompatibleException();
            }

            if (recruteur.experience <= candidat.experience)
            {
                throw new RecruteurSousExperimenterException();
            }

            if (salle.statut == SalleStatut.Occupee)
            {
                throw new SalleOccuperException();
            }

            this.id        = id;
            this.creneau   = creneau;
            this.statut    = statut;
            this.recruteur = recruteur;
            this.candidat  = candidat;
            this.salle     = salle;
        }
Exemplo n.º 2
0
 public void Setup()
 {
     creneau        = new Creneau(new DateTime(2019, 10, 10, 9, 0, 0), TimeSpan.FromHours(2));
     statut         = EntretienStatut.Planifier;
     candidatCsharp = new Candidat("yoyo", Specialite.csharp, TimeSpan.FromDays(1000));
     recruteurCsharpExperimenter = new Recruteur("Arnaud", Specialite.csharp, TimeSpan.FromDays(20000));
     salle1 = new Salle("Wagram", SalleStatut.Libre);
     salle2 = new Salle("Republique", SalleStatut.Libre);
 }
Exemplo n.º 3
0
 public Entretien(int id,
                  CreneauDto creneau,
                  EntretienStatut statut,
                  CandidatDto candidat,
                  RecruteurDto recruteur,
                  SalleDto salle)
     : this(id,
            new Creneau(creneau.date, creneau.duree),
            statut,
            new Candidat(candidat.name, candidat.specialite, candidat.experience),
            new Recruteur(recruteur.name, recruteur.specialite, recruteur.experience),
            new Salle(salle.name, salle.statut))
 {
 }