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).

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf2f4c-1437c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf2f4c-1437c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?