Grails

Patch: Increase Test Coverage and Improve Maintainability for GroovyIfTag class

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.1
  • Component/s: TagLib, Testing
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Testcase included:
    yes

Description

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.

Activity

Hide
Jason Rudolph added a comment -

Added note about the test improvements being independent of the refactorings.

Show
Jason Rudolph added a comment - Added note about the test improvements being independent of the refactorings.
Hide
Graeme Rocher added a comment -

applied. thanks.

Show
Graeme Rocher added a comment - applied. thanks.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: