-
Notifications
You must be signed in to change notification settings - Fork 0
ReportContentTest Documentation
The ReportContentTest class is a test class for the ReportContent class, using the JUnit and Mockito frameworks for testing.
Methods
-
Before public void setUp(): This method is annotated with @Before, meaning it's run before each test. It initializes the mock objects, the ReportContent object, and the feedbackList. -
@Test public void testAddFeedback(): This method is a test for the addFeedback method in the ReportContent class. It adds feedback to the ReportContent object and then checks that the feedback was added correctly. -
@Test public void testAddTableHeaders(): This method is a test for the addTableHeaders method in the ReportContent class. It calls addTableHeaders and then verifies that a PdfPTable was added to the document. -
@Test public void testAddTables(): This method is a test for the addTables method in the ReportContent class. It adds feedback to the ReportContent object, calls addTables, and then verifies that PdfPTable objects were added to the document.
Fields
-
@Mock private Document document: This field is a mock of the Document class from the com.itextpdf.text package. It's used to simulate a Document object for testing purposes. -
private ReportContent reportContent: This field represents the ReportContent object that is being tested. -
private ArrayList<Feedback> feedbackList: This field represents a list of Feedback objects that are used in the tests.