forked from grails/grails-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grails-core issue grails#11318 apply Generated annotation to RenderCo…
…nverterTrait method, to improve test coverage reports (grails#15)
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/groovy/org/grails/compiler/web/converters/RenderConverterTraitGeneratedSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.grails.compiler.web.converters | ||
|
||
import grails.web.Action | ||
import groovy.transform.Generated | ||
import spock.lang.Specification | ||
|
||
import java.lang.reflect.Method | ||
|
||
class ControllerTraitGeneratedSpec extends Specification { | ||
|
||
void "test that all RenderConverter trait methods are marked as Generated"() { | ||
expect: "all RenderConverter methods are marked as Generated on implementation class" | ||
RenderConverterTrait.getMethods().each { Method traitMethod -> | ||
assert TestConverter.class.getMethod(traitMethod.name, traitMethod.parameterTypes).isAnnotationPresent(Generated) | ||
} | ||
} | ||
} | ||
|
||
class TestConverter implements RenderConverterTrait { | ||
|
||
} | ||
|