|
|
@ -503,6 +503,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
[TestCase("3f276ab8-727a-4e26-ad5d-4d296158688e", 1)] |
|
|
|
[TestCase("3f276ab8-727a-4e26-ad5d-4d296158688e", 1)] |
|
|
|
[TestCase("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d", 1)] |
|
|
|
[TestCase("01ee85ff-d7f3-494b-b1de-26ced8fbfa0d", 1)] |
|
|
|
[TestCase("eb8b0f33-f529-4985-861e-1207f3312bb5", 2)] |
|
|
|
[TestCase("eb8b0f33-f529-4985-861e-1207f3312bb5", 2)] |
|
|
|
|
|
|
|
[TestCase("eb8b0f33-f529-4985-861e-1207f3312bb4", 0)] |
|
|
|
[TestCase("ea027734-ff0f-4308-8879-133a09fb3c46", 1)] |
|
|
|
[TestCase("ea027734-ff0f-4308-8879-133a09fb3c46", 1)] |
|
|
|
[TestCase("80220063-a5fa-472b-b610-2e350566df98", 1)] |
|
|
|
[TestCase("80220063-a5fa-472b-b610-2e350566df98", 1)] |
|
|
|
public async Task GetEPCoursReferent(Guid idReferent, int count) |
|
|
|
public async Task GetEPCoursReferent(Guid idReferent, int count) |
|
|
@ -526,6 +527,7 @@ namespace EPAServeur.Tests.Services |
|
|
|
[TestCase("eb8b0f33-f529-4985-861e-1207f3312bb5", 2)] |
|
|
|
[TestCase("eb8b0f33-f529-4985-861e-1207f3312bb5", 2)] |
|
|
|
[TestCase("d4fc247b-015a-44d6-8f3e-a52f0902d2bf", 1)] |
|
|
|
[TestCase("d4fc247b-015a-44d6-8f3e-a52f0902d2bf", 1)] |
|
|
|
[TestCase("b799a9de-7743-435e-933f-7f730affc5ae", 1)] |
|
|
|
[TestCase("b799a9de-7743-435e-933f-7f730affc5ae", 1)] |
|
|
|
|
|
|
|
[TestCase("b799a9de-7743-435e-933f-7f730affc5a5", 0)] |
|
|
|
[TestCase("ea027734-ff0f-4308-8879-133a09fb3c46", 1)] |
|
|
|
[TestCase("ea027734-ff0f-4308-8879-133a09fb3c46", 1)] |
|
|
|
public async Task GetEPEnSignesReferent(Guid idReferent, int count) |
|
|
|
public async Task GetEPEnSignesReferent(Guid idReferent, int count) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -541,6 +543,52 @@ namespace EPAServeur.Tests.Services |
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Récupérés EP signés collaborateur |
|
|
|
|
|
|
|
[TestCase("301ba7f3-095e-4912-8998-a7c942dc5f23", 1)] |
|
|
|
|
|
|
|
[TestCase("4f3fcd23-a1e4-4c9e-afa2-d06ca9216491", 0)] |
|
|
|
|
|
|
|
[TestCase("e7820f92-eab1-42f5-ae96-5c16e71ff1e6", 1)] |
|
|
|
|
|
|
|
[TestCase("a0f40e2a-cc03-4032-a627-5389e1281c64", 3)] |
|
|
|
|
|
|
|
[TestCase("b5254c6c-7caa-435f-a4bb-e0cf92559832", 1)] |
|
|
|
|
|
|
|
[TestCase("b5254c6c-7caa-435f-a4bb-e0cf92559830", 0)] |
|
|
|
|
|
|
|
[TestCase("13fbe621-1bc9-4f04-afde-b54ca076e239", 3)] |
|
|
|
|
|
|
|
public async Task GetEPSignesCollaborateur(Guid idCollaborateur, int count) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IEpInformationService epInformationService = new EpInformationService(context, collaborateurService); |
|
|
|
|
|
|
|
IEnumerable<EpInformationDTO> epInformationDTOs = await epInformationService.GetEPSignesCollaborateur(idCollaborateur); |
|
|
|
|
|
|
|
Assert.AreEqual(count, epInformationDTOs.Count()); |
|
|
|
|
|
|
|
foreach(EpInformationDTO ep in epInformationDTOs) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Assert.AreEqual(ep.Statut, StatutEp.Signe); |
|
|
|
|
|
|
|
Assert.AreEqual(idCollaborateur, ep.Collaborateur.Id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Récupéré EP en cours d'un collaborateur |
|
|
|
|
|
|
|
[TestCase("301ba7f3-095e-4912-8998-a7c942dc5f23", true)] |
|
|
|
|
|
|
|
[TestCase("eb8b0f33-f529-4985-861e-1207f3312bb5", false)] |
|
|
|
|
|
|
|
[TestCase("e7820f92-eab1-42f5-ae96-5c16e71ff1e6", true)] |
|
|
|
|
|
|
|
[TestCase("a0f40e2a-cc03-4032-a627-5389e1281c64", true)] |
|
|
|
|
|
|
|
[TestCase("b799a9de-7743-435e-933f-7f730affc5ae", false)] |
|
|
|
|
|
|
|
[TestCase("de98a866-736f-4295-a669-92a8694e2ee3", true)] |
|
|
|
|
|
|
|
public async Task GetEPEnCoursCollaborateur(Guid idCollaborateur, bool existe) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
IEpInformationService epInformationService = new EpInformationService(context, collaborateurService); |
|
|
|
|
|
|
|
EpInformationDTO epInformationDTO = await epInformationService.GetProchainEPCollaborateur(idCollaborateur); |
|
|
|
|
|
|
|
if(existe) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Assert.IsNotNull(epInformationDTO); |
|
|
|
|
|
|
|
Assert.IsTrue(EstEpEnCours(epInformationDTO.Statut)); |
|
|
|
|
|
|
|
Assert.AreEqual(idCollaborateur, epInformationDTO.Collaborateur.Id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Assert.IsNull(epInformationDTO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
#region méthodes privées |
|
|
|
#region méthodes privées |
|
|
|
private bool EstEpEnCours(StatutEp statut) |
|
|
|
private bool EstEpEnCours(StatutEp statut) |
|
|
|