[ https://issues.apache.org/jira/browse/SANDBOX-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13191495#comment-13191495 ]
Benedikt Ritter edited comment on SANDBOX-362 at 1/23/12 9:43 PM: ------------------------------------------------------------------ Based on a discussion we had on the mailing list about best practices for unit tests, I refactored ArgumentTest and added test methods for getParamaters(Argument<?>... args). Here is a summary of what I changed: * separated long methods into very small methods: each primitive type has it's own test methods * defined fields for every primitive type, to make sure that assertions do not accedential fail because wrong values get compared * created separate test methods instead of wrapping failure cases inside try/catch-blocks * Added tests methods that test against TestBean.class Please let me know, what you think about the changes! was (Author: britter): Based on a discussion we had on the mailing list about best practices for unit tests, I refactored ArgumentTest and added test methods for getParamaters(Argument<?>... args). Here is a summary of what I changed: * separated long methods into very small methods: each primitive type has it's own test methods * defined fields for every primitive type, to make sure that assertions do not accedential fail because wrong values get compared * Added tests methods that test against TestBean.class Please let me know, what you think about the changes! > Create basic unit tests for all classes > --------------------------------------- > > Key: SANDBOX-362 > URL: https://issues.apache.org/jira/browse/SANDBOX-362 > Project: Commons Sandbox > Issue Type: Test > Components: BeanUtils2 > Affects Versions: Nightly Builds > Reporter: Benedikt Ritter > Attachments: ArgumentTest.zip, > SANDBOX-362-RefactoringOfArgumentTest.txt > > > Back up all existing implementations with unit tests: > * Argument > * Assertions > * BeanUtils > * DefaultBeanAccessor > * DefaultClassAccessor > * MethodRegistry > * TypeUtils -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira