package com.example.wfwebapi.model; import org.junit.jupiter.api.Test; import java.time.LocalDate; import static org.junit.jupiter.api.Assertions.*; class CommentaryTest { @Test void testGettersAndSetters() { Commentary commentary = new Commentary(); Quote quote = new Quote(); User user = new User(); LocalDate date = LocalDate.of(2024, 4, 5); String text = "Ceci est un commentaire"; commentary.setId(1L); commentary.setQuote(quote); commentary.setUser(user); commentary.setDateC(date); commentary.setComment(text); assertEquals(1L, commentary.getId()); assertEquals(quote, commentary.getQuote()); assertEquals(user, commentary.getUser()); assertEquals(date, commentary.getDateC()); assertEquals(text, commentary.getComment()); } }