|
|
@ -25,9 +25,7 @@ namespace EPAServeur.Tests.Controllers |
|
|
|
private ICollaborateurService collaborateurService; |
|
|
|
private ICollaborateurService collaborateurService; |
|
|
|
private INoteService noteService; |
|
|
|
private INoteService noteService; |
|
|
|
private ILogger<NotesApiController> logger; |
|
|
|
private ILogger<NotesApiController> logger; |
|
|
|
private Guid? auteur1, auteur2, auteur3; |
|
|
|
private Guid? auteur1, collaborateur1; |
|
|
|
private Guid? collaborateur1, collaborateur2, collaborateur3; |
|
|
|
|
|
|
|
private Guid? auteurNonExistant, collaborateurNonExistant, collaborateurParti, referentParti; |
|
|
|
|
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
#region Setup |
|
|
|
#region Setup |
|
|
@ -60,16 +58,7 @@ namespace EPAServeur.Tests.Controllers |
|
|
|
logger = new NullLogger<NotesApiController>(); |
|
|
|
logger = new NullLogger<NotesApiController>(); |
|
|
|
|
|
|
|
|
|
|
|
auteur1 = new Guid("ecf528c3-e509-402f-87bb-c8821467e350"); |
|
|
|
auteur1 = new Guid("ecf528c3-e509-402f-87bb-c8821467e350"); |
|
|
|
auteur2 = new Guid("6aa62dcb-f7c9-4c0c-af40-e934a4d6a7eb"); |
|
|
|
|
|
|
|
auteur3 = new Guid("571463f3-b286-4a21-9eab-0707dc506dec"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
collaborateur1 = new Guid("92b29b9c-40a4-4aa0-9412-bc97a379e52f"); |
|
|
|
collaborateur1 = new Guid("92b29b9c-40a4-4aa0-9412-bc97a379e52f"); |
|
|
|
collaborateur2 = new Guid("006226f6-51b2-4a02-a302-7447f7fccc04"); |
|
|
|
|
|
|
|
collaborateur3 = new Guid("e5d36da4-df16-4d19-8a11-1ba2f6efc80c"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auteurNonExistant = collaborateurNonExistant = new Guid("397f616e-44ff-11eb-b378-0242ac130002"); |
|
|
|
|
|
|
|
collaborateurParti = new Guid("3c99214d-0a5e-4bb6-b7b2-7d9bb8143c50"); |
|
|
|
|
|
|
|
referentParti = new Guid("0021430f-9cb5-4d7e-a395-904c95421920"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
@ -132,8 +121,6 @@ namespace EPAServeur.Tests.Controllers |
|
|
|
public async Task UpdateNote() |
|
|
|
public async Task UpdateNote() |
|
|
|
{ |
|
|
|
{ |
|
|
|
NotesApiController notesApiController = new NotesApiController(noteService, logger); |
|
|
|
NotesApiController notesApiController = new NotesApiController(noteService, logger); |
|
|
|
CollaborateurDTO collaborateurDTO = await collaborateurService.GetCollaborateurByIdAsync(collaborateur1); |
|
|
|
|
|
|
|
DateTime date = DateTime.Now; |
|
|
|
|
|
|
|
DetailsNoteDTO updatedNote = await noteService.GetNoteByIdAsync(2); |
|
|
|
DetailsNoteDTO updatedNote = await noteService.GetNoteByIdAsync(2); |
|
|
|
updatedNote.Texte = "Texte mise à jour"; |
|
|
|
updatedNote.Texte = "Texte mise à jour"; |
|
|
|
updatedNote.Titre = "Titre mise à jour"; |
|
|
|
updatedNote.Titre = "Titre mise à jour"; |
|
|
|