You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
873 B
32 lines
873 B
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());
|
|
}
|
|
}
|