Closed jbkim1999 closed 2 years ago
From what I can tell, it seems execute_allFieldsSpecifiedUnfilteredList_success()
checks if all fields in the client can be edited with one command (by using the fields of he default person in PersonBuilder
to build a descriptor and using the Edit Command to modify all fields of the person at INDEX_FIRST_CLIENT
with the fields of the default person.
execute_someFieldsSpecifiedUnfilteredList_success()
seems to only edit the name, phone number, and tags of one of the persons (builds an empty descriptor and sets only the fields for name, phone, and tags).
In other words, execute_allFieldsSpecifiedUnfilteredList_success()
checks if all fields can be edited with one command, while execute_someFieldsSpecifiedUnfilteredList_success()
checks if some fields can be edited while ensuring the rest of the unedited fields remain the same and do not have any unexpected modifications.
I believe @AAlghrairy is correct. @jbkim1999 the middle part of the test name is supposed to describe the test scenario. So, comparing the names of the two test methods is a good way to get started on figuring out the difference between the two.
I see, I thought the allFieldsSpecified was referring to the model itself (when getting the filtered ClientList), but didn't know it was meant for the EditCommand itself!
Thank you @AAlghrairy and @damithc for your kind advices. I shall close this issue now.
While looking at the tests under
EditCommandTest
, I noticed when testing theexecute
method, there are different 'aspects' that are being tested.For example, the code block for
execute_allFieldsSpecifiedUnfilteredList_success()
is likeand
execute_someFieldsSpecifiedUnfilteredList_success()
is likeThe problem is, however, I know that they are different tests, but I just can't figure out which different areas they tackle for each method. Like, what is the meaningful difference between these two tests? From the method name alone, I can't get the full picture of it...