From fa805a17685a35816b140d52d92ab8156d18ed3e Mon Sep 17 00:00:00 2001 From: jboinembalome Date: Fri, 26 Feb 2021 15:17:36 +0100 Subject: [PATCH] =?UTF-8?q?Modification=20des=20tests=20unitaires=20en=20f?= =?UTF-8?q?onction=20des=20donn=C3=A9es=20qui=20ont=20=C3=A9t=C3=A9=20modi?= =?UTF-8?q?fi=C3=A9=20dans=20DataSeeder=20pour=20le=20service=20formation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/FormationServiceTests.cs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/EPAServeur.Tests/Services/FormationServiceTests.cs b/EPAServeur.Tests/Services/FormationServiceTests.cs index cd2f5d7..5c16163 100644 --- a/EPAServeur.Tests/Services/FormationServiceTests.cs +++ b/EPAServeur.Tests/Services/FormationServiceTests.cs @@ -62,19 +62,20 @@ namespace EPAServeur.Tests.Services FormationService formationService = new FormationService(epContext, collaborateurService); // Act - FormationDTO formationDTO = await formationService.GetFormationByIdAsync(1); + FormationDTO formationDTO = await formationService.GetFormationByIdAsync(3); // Assert - Assert.AreEqual(1, formationDTO.Id); - Assert.AreEqual("Formation Mainframe Complète", formationDTO.Intitule); + Assert.AreEqual(3, formationDTO.Id); + Assert.AreEqual("Apprendre C# et le développement de logiciels avec WPF", formationDTO.Intitule); Assert.AreEqual(1, formationDTO.IdAgence); - Assert.AreEqual(new DateTime(2020, 1, 25, 10, 0, 0), formationDTO.DateDebut); - Assert.AreEqual(new DateTime(2020, 1, 27), formationDTO.DateFin); - Assert.AreEqual(2, formationDTO.Heure); - Assert.AreEqual(1, formationDTO.Jour); - Assert.AreEqual("Organisme1", formationDTO.Organisme); - Assert.False(formationDTO.EstCertifiee); - Assert.AreEqual(new OrigineFormationDTO { Id = 2, Libelle = "Exigence client" }, formationDTO.Origine); + Assert.AreEqual(new DateTime(2020, 5, 25, 14, 0, 0), formationDTO.DateDebut); + Assert.AreEqual(new DateTime(2020, 5, 27), formationDTO.DateFin); + Assert.AreEqual(4, formationDTO.Heure); + Assert.AreEqual(2, formationDTO.Jour); + Assert.AreEqual("Organisme2", formationDTO.Organisme); + Assert.True(formationDTO.EstCertifiee); + 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 ModeFormationDTO { Id = 4, Libelle = "E-learning" }, formationDTO.Mode); Assert.AreEqual(new TypeFormationDTO { Id = 3, Libelle = "E-learning" }, formationDTO.Type);