Java unit test

1. If I have a class A with four methods of addition, deletion, modification and query, do I have to write all four methods in one test class when I write a unit test?
2. If written in a test class, then

:
:
:
:

3. Then inserting data in step 2 can be done a lot
4. Edit, the query will certainly be done according to the conditions, then how to combine the parameters in the input parameters? I understand whether there are any complete examples written by
.

Nov.19,2021

is not usually tested in this way. You can take a look at ,
db layer mock , and mainly test web layer (mainly parameter control and information, exception encapsulation) and service layer (business logic).

Menu