tests - #1339
tests#1339AlexPranschke wants to merge 2 commits into
Conversation
slade13
left a comment
There was a problem hiding this comment.
Good job, the overall test structure is on the right track: services and transaction handlers have their own test classes, normal and exceptional scenarios are present. The biggest improvements are to follow the required test naming convention consistently, strengthen assertions so tests verify complete behavior rather than only sizes/contains(), and focus more on meaningful boundary cases.
slade13
left a comment
There was a problem hiding this comment.
Some of the test names still do not follow test name convention:
<methodUnderTest>_<state>_<expectedBehavior>
for example:
execute_removesFruitQuantity()
execute_throwsExceptionWhenNotEnoughFruit()
execute_setsFruitQuantity()
execute_addsFruitQuantity()
execute_addsFruitWhenFruitDoesNotExist()
Please also review my other comments, besides that it looks good.
| } | ||
|
|
||
| @Test | ||
| void convertData_ConvertData_dataTrimmed() { |
There was a problem hiding this comment.
Fix capitalization problem, also this test could be named better:
| void convertData_ConvertData_dataTrimmed() { | |
| void convertData_dataWithSpaces_returnsTrimmedTransaction() { |
| } | ||
|
|
||
| @Test | ||
| void setFruitQuantity_ZeroQuantity_isOk() { |
There was a problem hiding this comment.
Fix capitalization problem:
| void setFruitQuantity_ZeroQuantity_isOk() { | |
| void setFruitQuantity_zeroQuantity_isOk() { |
No description provided.