File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
src/test/java/com/codesungrape/hmcts/bookapi Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,6 @@ void testCreateBook_VeryLongFields_Success(
209209 BookRequest request ,
210210 Book expectedBook
211211 ) {
212-
213212 // Arrange
214213 when (testBookRepository .save (any (Book .class ))).thenReturn (expectedBook );
215214
@@ -218,10 +217,6 @@ void testCreateBook_VeryLongFields_Success(
218217
219218 // Assert 1: Verify the result flow
220219 assertEquals (expectedBook , result );
221- assertEquals (expectedBook .getId (), result .getId ());
222- assertEquals (expectedBook .getTitle (), result .getTitle ());
223- assertEquals (expectedBook .getSynopsis (), result .getSynopsis ());
224- assertEquals (expectedBook .getAuthor (), result .getAuthor ());
225220
226221 // --- CAPTOR LOGIC ---
227222 ArgumentCaptor <Book > bookCaptor = ArgumentCaptor .forClass (Book .class );
@@ -271,7 +266,7 @@ void testDeleteBookById_Success() {
271266 ArgumentCaptor <Book > bookCaptor = ArgumentCaptor .forClass (Book .class );
272267 verify (testBookRepository , times (1 )).save (bookCaptor .capture ());
273268
274- // extract from captured object (internal list)
269+ // extract from the captured object (internal list)
275270 Book savedBook = bookCaptor .getValue ();
276271
277272 // Assert: the service correctly marked it as deleted
You can’t perform that action at this time.
0 commit comments