-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testcontainers #21
Testcontainers #21
Conversation
format add jupiter extension for testcontainers
add TEST variable unnecessary
mongo is relative new in testcontainers thats why i choose this version
This is my first time using mongo so I don't know if extending the TestContainer class of the config package is a good idea, but the it works. |
@Autowired | ||
private ClientRepository clientRepository; | ||
|
||
@AfterEach | ||
public void deleteArterTest(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow.. I really appreciate your time and effort.
It's more than what i had in mind regarding testing great work.
Thanks i didn't know about test container library
No problem. Now we must decide what kind of method the project needs for the client repository and then continue with the implementation of the tests. |
I think we should use simple for student email please bring forth idea which might the project better hopefully I understood your suggestion. |
Observing these resources #6, I notice that the embedded documents have no identification and that is probably the reason. And testing with Integer (not the primitive) and String, I see that the id does not persist in the database, so if you want a relationship between your entities, mongo is probably not a good idea, especially if you want to add more entities like comments. I found this in the spring docs but it doesnt work as i expected spring mongodb docs. I know very well postgres if you decide to change the db engine, but if it is just for learning, we can move on with mongo. |
I think you are right. I have worked with sql and springboot before but it was a very small application, since you technically strong |
I think for embedded documents with springboot you have to generate id for yourself |
#2 #17