|
|
@ -62,19 +62,20 @@ namespace EPAServeur.Tests.Services |
|
|
|
FormationService formationService = new FormationService(epContext, collaborateurService); |
|
|
|
FormationService formationService = new FormationService(epContext, collaborateurService); |
|
|
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
// Act |
|
|
|
FormationDTO formationDTO = await formationService.GetFormationByIdAsync(1); |
|
|
|
FormationDTO formationDTO = await formationService.GetFormationByIdAsync(3); |
|
|
|
|
|
|
|
|
|
|
|
// Assert |
|
|
|
// Assert |
|
|
|
Assert.AreEqual(1, formationDTO.Id); |
|
|
|
Assert.AreEqual(3, formationDTO.Id); |
|
|
|
Assert.AreEqual("Formation Mainframe Complète", formationDTO.Intitule); |
|
|
|
Assert.AreEqual("Apprendre C# et le développement de logiciels avec WPF", formationDTO.Intitule); |
|
|
|
Assert.AreEqual(1, formationDTO.IdAgence); |
|
|
|
Assert.AreEqual(1, formationDTO.IdAgence); |
|
|
|
Assert.AreEqual(new DateTime(2020, 1, 25, 10, 0, 0), formationDTO.DateDebut); |
|
|
|
Assert.AreEqual(new DateTime(2020, 5, 25, 14, 0, 0), formationDTO.DateDebut); |
|
|
|
Assert.AreEqual(new DateTime(2020, 1, 27), formationDTO.DateFin); |
|
|
|
Assert.AreEqual(new DateTime(2020, 5, 27), formationDTO.DateFin); |
|
|
|
Assert.AreEqual(2, formationDTO.Heure); |
|
|
|
Assert.AreEqual(4, formationDTO.Heure); |
|
|
|
Assert.AreEqual(1, formationDTO.Jour); |
|
|
|
Assert.AreEqual(2, formationDTO.Jour); |
|
|
|
Assert.AreEqual("Organisme1", formationDTO.Organisme); |
|
|
|
Assert.AreEqual("Organisme2", formationDTO.Organisme); |
|
|
|
Assert.False(formationDTO.EstCertifiee); |
|
|
|
Assert.True(formationDTO.EstCertifiee); |
|
|
|
Assert.AreEqual(new OrigineFormationDTO { Id = 2, Libelle = "Exigence client" }, formationDTO.Origine); |
|
|
|
Assert.IsNotNull(formationDTO.Participations); |
|
|
|
|
|
|
|
Assert.AreEqual(new OrigineFormationDTO { Id = 3, Libelle = "Exigence Apside" }, formationDTO.Origine); |
|
|
|
Assert.AreEqual(new StatutFormationDTO { Id = 1, Libelle = "Planifiée" }, formationDTO.Statut); |
|
|
|
Assert.AreEqual(new StatutFormationDTO { Id = 1, Libelle = "Planifiée" }, formationDTO.Statut); |
|
|
|
Assert.AreEqual(new ModeFormationDTO { Id = 4, Libelle = "E-learning" }, formationDTO.Mode); |
|
|
|
Assert.AreEqual(new ModeFormationDTO { Id = 4, Libelle = "E-learning" }, formationDTO.Mode); |
|
|
|
Assert.AreEqual(new TypeFormationDTO { Id = 3, Libelle = "E-learning" }, formationDTO.Type); |
|
|
|
Assert.AreEqual(new TypeFormationDTO { Id = 3, Libelle = "E-learning" }, formationDTO.Type); |
|
|
|