fix : tests
Some checks failed
CI / build (push) Waiting to run
Format / formatting (push) Successful in 5s
Build / build (push) Has been cancelled

This commit is contained in:
Théo Le Lez
2025-04-16 11:26:25 +02:00
parent 6029457735
commit 7df2c768c8
3 changed files with 94 additions and 92 deletions

View File

@ -146,8 +146,10 @@ public class EntrepreneurApiServiceTest {
null, 2L, "contenu temporaire", LocalDateTime.now(), project));
assertEquals(
2, IterableToList(sectionCellService.getSectionCellsByProject(project, 2L)).size());
entrepreneurApiService.removeSectionCell(
tmpCell.getIdSectionCell(), "entrepreneur@mail.fr");
assertDoesNotThrow(
() ->
entrepreneurApiService.removeSectionCell(
tmpCell.getIdSectionCell(), "entrepreneur@mail.fr"));
assertEquals(
tmpCell.getIdReference(),
IterableToList(sectionCellService.getSectionCellsByProject(project, -1L))
@ -181,14 +183,8 @@ public class EntrepreneurApiServiceTest {
@Test
void addSectionCellInvalidAccess() {
System.out.println(
"content : "
+ IterableToList(sectionCellService.getSectionCellsByProject(project, 2L))
.getLast()
.getContentSectionCell());
SectionCell added =
sectionCellService.addNewSectionCell(
new SectionCell(null, 2L, "contenu ajouté", LocalDateTime.now(), project));
new SectionCell(null, 2L, "contenu ajouté", LocalDateTime.now(), project);
assertThrows(
ResponseStatusException.class,
() -> entrepreneurApiService.addSectionCell(added, "fauxentrepreneur@mail.fr"));
@ -208,4 +204,7 @@ public class EntrepreneurApiServiceTest {
ResponseStatusException.class,
() -> entrepreneurApiService.addSectionCell(added, "entrepreneur@mail.fr"));
}
@Test
void requestValidProject() {}
}