History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-2471
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Graeme Rocher
Reporter: Jason Rudolph
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Grails

Patch: Increase Test Coverage and Improve Maintainability for GroovyIfTag class

Created: 16/Feb/08 10:33 PM   Updated: 18/Feb/08 04:15 AM
Component/s: TagLib, Testing
Affects Version/s: 1.0.1
Fix Version/s: 1.0.1

Time Tracking:
Not Specified

File Attachments: 1. File increase_coverage_and_maintainability_for_GroovyIfTag.diff (4 kb)


Testcase included: yes
Patch Submitted: Yes


 Description  « Hide
The attached patch brings the test coverage to 100% for GroovyIfTag#doStartTag. The additional tests in the patch address the two cases not covered in the current tests.

The patch also offers refactorings for the #doStartTag implementation. These refactorings use method extraction to reduce repetition. They also cut the amount of conditional logic in half.

Note: The test improvements (in CoreTagsTests.groovy) are independent of the refactorings (in GroovyIfTag.java). In case the team disagrees with the refactorings, the additional test cases can still be applied to offer increased test coverage for the existing code base.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jason Rudolph - 16/Feb/08 10:37 PM
Added note about the test improvements being independent of the refactorings.

Graeme Rocher - 18/Feb/08 04:15 AM
applied. thanks.