|
|
|
@ -70,7 +70,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Assert.AreEqual(2, formationDTO.Heure); |
|
|
|
|
Assert.AreEqual(1, formationDTO.Jour); |
|
|
|
|
Assert.AreEqual("Organisme1", formationDTO.Organisme); |
|
|
|
|
Assert.False(formationDTO.EstCertifie); |
|
|
|
|
Assert.False(formationDTO.EstCertifiee); |
|
|
|
|
Assert.AreEqual(new OrigineFormationDTO { Id = 2, Libelle = "Exigence client" }, formationDTO.Origine); |
|
|
|
|
Assert.AreEqual(new StatutFormationDTO { Id = 1, Libelle = "Planifiée" }, formationDTO.Statut); |
|
|
|
|
Assert.AreEqual(new ModeFormationDTO { Id = 4, Libelle = "E-learning" }, formationDTO.Mode); |
|
|
|
@ -111,7 +111,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Assert.AreEqual(2, formationDTO.Heure); |
|
|
|
|
Assert.AreEqual(1, formationDTO.Jour); |
|
|
|
|
Assert.AreEqual("Organisme1", formationDTO.Organisme); |
|
|
|
|
Assert.False(formationDTO.EstCertifie); |
|
|
|
|
Assert.False(formationDTO.EstCertifiee); |
|
|
|
|
Assert.AreEqual(new OrigineFormationDTO { Id = 2, Libelle = "Exigence client" }, formationDTO.Origine); |
|
|
|
|
Assert.AreEqual(new StatutFormationDTO { Id = 1, Libelle = "Planifiée" }, formationDTO.Statut); |
|
|
|
|
Assert.AreEqual(new ModeFormationDTO { Id = 4, Libelle = "E-learning" }, formationDTO.Mode); |
|
|
|
@ -566,7 +566,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Organisme = organisme, |
|
|
|
|
Origine = origineFormationCollaborateur, |
|
|
|
|
Statut = statutPlanifie, |
|
|
|
|
EstCertifie = false |
|
|
|
|
EstCertifiee = false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
FormationService formationService = new FormationService(epContext); |
|
|
|
@ -588,7 +588,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Assert.AreEqual(formation.Organisme, formationAjoute.Organisme); |
|
|
|
|
Assert.AreEqual(formation.Origine, formationAjoute.Origine); |
|
|
|
|
Assert.AreEqual(formation.Statut, formationAjoute.Statut); |
|
|
|
|
Assert.AreEqual(formation.EstCertifie, formationAjoute.EstCertifie); |
|
|
|
|
Assert.AreEqual(formation.EstCertifiee, formationAjoute.EstCertifiee); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[TestCase(1, 1, 3, 1, 1, "Test ajout formation", "Apside", "2020-10-31", "2020-11-02")] |
|
|
|
@ -619,7 +619,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Organisme = organisme, |
|
|
|
|
Origine = origineFormationCollaborateur, |
|
|
|
|
Statut = statutPlanifie, |
|
|
|
|
EstCertifie = false |
|
|
|
|
EstCertifiee = false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
FormationService formationService = new FormationService(epContext); |
|
|
|
@ -641,7 +641,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Assert.AreEqual(formation.Organisme, formationAjoute.Organisme); |
|
|
|
|
Assert.AreEqual(formation.Origine, formationAjoute.Origine); |
|
|
|
|
Assert.AreEqual(formation.Statut, formationAjoute.Statut); |
|
|
|
|
Assert.AreEqual(formation.EstCertifie, formationAjoute.EstCertifie); |
|
|
|
|
Assert.AreEqual(formation.EstCertifiee, formationAjoute.EstCertifiee); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[Test] |
|
|
|
@ -715,7 +715,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Organisme = organisme, |
|
|
|
|
Origine = origineFormationCollaborateur, |
|
|
|
|
Statut = statutPlanifie, |
|
|
|
|
EstCertifie = false |
|
|
|
|
EstCertifiee = false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
FormationService formationService = new FormationService(epContext); |
|
|
|
@ -764,7 +764,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Organisme = organisme, |
|
|
|
|
Origine = origineFormationCollaborateur, |
|
|
|
|
Statut = statutPlanifie, |
|
|
|
|
EstCertifie = false |
|
|
|
|
EstCertifiee = false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
FormationService formationService = new FormationService(epContext); |
|
|
|
@ -810,7 +810,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Organisme = "Apside", |
|
|
|
|
Origine = origineFormationCollaborateur, |
|
|
|
|
Statut = statutPlanifie, |
|
|
|
|
EstCertifie = false |
|
|
|
|
EstCertifiee = false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
FormationService formationService = new FormationService(epContext); |
|
|
|
@ -856,7 +856,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Organisme = "Apside", |
|
|
|
|
Origine = origineFormationCollaborateur, |
|
|
|
|
Statut = statutPlanifie, |
|
|
|
|
EstCertifie = false |
|
|
|
|
EstCertifiee = false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
FormationService formationService = new FormationService(epContext); |
|
|
|
@ -900,7 +900,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
formation.Organisme = organisme; |
|
|
|
|
formation.Origine = origineFormationCollaborateur; |
|
|
|
|
formation.Statut = statutPlanifie; |
|
|
|
|
formation.EstCertifie = false; |
|
|
|
|
formation.EstCertifiee = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
@ -920,7 +920,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Assert.AreEqual(formation.Organisme, formationModifie.Organisme); |
|
|
|
|
Assert.AreEqual(formation.Origine, formationModifie.Origine); |
|
|
|
|
Assert.AreEqual(formation.Statut, formationModifie.Statut); |
|
|
|
|
Assert.AreEqual(formation.EstCertifie, formationModifie.EstCertifie); |
|
|
|
|
Assert.AreEqual(formation.EstCertifiee, formationModifie.EstCertifiee); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[TestCase(1, 2, 2, 1, 1, 2, "Test modification formation", "Apside", "2020-10-31", "2020-11-04")] |
|
|
|
@ -951,7 +951,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
formation.Organisme = organisme; |
|
|
|
|
formation.Origine = origineFormationCollaborateur; |
|
|
|
|
formation.Statut = statutPlanifie; |
|
|
|
|
formation.EstCertifie = false; |
|
|
|
|
formation.EstCertifiee = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
@ -971,7 +971,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Assert.AreEqual(formation.Organisme, formationModifie.Organisme); |
|
|
|
|
Assert.AreEqual(formation.Origine, formationModifie.Origine); |
|
|
|
|
Assert.AreEqual(formation.Statut, formationModifie.Statut); |
|
|
|
|
Assert.AreEqual(formation.EstCertifie, formationModifie.EstCertifie); |
|
|
|
|
Assert.AreEqual(formation.EstCertifiee, formationModifie.EstCertifiee); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
[TestCase(1, 1, 1, 3, 1, 1, "Test Formation", "Apside", "2020-10-31", "2020-10-30")] |
|
|
|
@ -1015,7 +1015,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
formation.Organisme = organisme; |
|
|
|
|
formation.Origine = origineFormationCollaborateur; |
|
|
|
|
formation.Statut = statutPlanifie; |
|
|
|
|
formation.EstCertifie = false; |
|
|
|
|
formation.EstCertifiee = false; |
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
|
TestDelegate throwException = () => formationService.UpdateFormation(idFormation, formation); |
|
|
|
@ -1065,7 +1065,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
formation.Organisme = organisme; |
|
|
|
|
formation.Origine = origineFormationCollaborateur; |
|
|
|
|
formation.Statut = statutPlanifie; |
|
|
|
|
formation.EstCertifie = false; |
|
|
|
|
formation.EstCertifiee = false; |
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
|
AsyncTestDelegate throwException = () => formationService.UpdateFormationAsync(idFormation, formation); |
|
|
|
@ -1104,7 +1104,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
formation.Organisme = organisme; |
|
|
|
|
formation.Origine = origineFormationCollaborateur; |
|
|
|
|
formation.Statut = statutPlanifie; |
|
|
|
|
formation.EstCertifie = false; |
|
|
|
|
formation.EstCertifiee = false; |
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
|
TestDelegate throwException = () => formationService.UpdateFormation(1, formation); |
|
|
|
@ -1143,7 +1143,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
formation.Organisme = organisme; |
|
|
|
|
formation.Origine = origineFormationCollaborateur; |
|
|
|
|
formation.Statut = statutPlanifie; |
|
|
|
|
formation.EstCertifie = false; |
|
|
|
|
formation.EstCertifiee = false; |
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
|
AsyncTestDelegate throwException = () => formationService.UpdateFormationAsync(1, formation); |
|
|
|
@ -1181,7 +1181,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Organisme = organisme, |
|
|
|
|
Origine = origineFormationCollaborateur, |
|
|
|
|
Statut = statutPlanifie, |
|
|
|
|
EstCertifie = false |
|
|
|
|
EstCertifiee = false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
@ -1220,7 +1220,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
|
Organisme = organisme, |
|
|
|
|
Origine = origineFormationCollaborateur, |
|
|
|
|
Statut = statutPlanifie, |
|
|
|
|
EstCertifie = false |
|
|
|
|
EstCertifiee = false |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
|