Skip to content

Adding unit test#32

Open
pmeloni92 wants to merge 1 commit into
dsoumis:mainfrom
pmeloni92:main
Open

Adding unit test#32
pmeloni92 wants to merge 1 commit into
dsoumis:mainfrom
pmeloni92:main

Conversation

@pmeloni92

Copy link
Copy Markdown
Collaborator

commit are still dirty but just to give you an overview of what I've done. 1 test still not working but I-m figuring out

Comment thread pom.xml
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately yes, sometimes mockito need this for inline mocking and I need inline mocking for mocking your RestResponse class that is a record class. I cannot think a better way to do it for now.

import java.util.Map;

import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explicitly define which packages are being imported and avoid "*".

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, here you're right. I forgot to edit it before PR. Thanks for noticing it, I will do it now.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the use of this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the bytebuddy on pom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants