mysql - How to verify list of items in a test -


I am writing a test case, where I send a list of strings to save to the database. Then I will retrieve those people from the database and they have to verify that everything is fine.

I have written

  assertNotNull (list) assertEquals (listSize, response.listSize ())  

Confirmation is the same but I believe that by the time they are returned, the list of strings is not in the same order.

How do you usually verify this type of thing?

er ... why not compile the order by creating the initial list alphabetically (or using one) And then use the ORDER BY section in SQL?

He said, you may need to iterate through the elements in the list and compare them (as the keys may differ in your original list and which have been obtained from the database) .


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -