Test Templates Plugin

TestTemplate Plugin generates names with typo: 'xxxConstriant', should be 'xxxConstraint'

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Was looking through: http://www.grails.org/TestTemplate+Plugin, saw the examples

void testTitleConstriants() {		 
		//test org.codehaus.groovy.grails.validation.NullableConstraint@de1237[false]  
		//test org.codehaus.groovy.grails.validation.BlankConstraint@7bc5fd[false]  
		//test org.codehaus.groovy.grails.validation.SizeConstraint@36f09[1..100] 
	}

Noticed that each method name was misspelt.

Tracked it down to:

http://svn.codehaus.org/grails-plugins/grails-test-template/trunk/src/templates/artifacts/test-templates/DomainUnitTests.groovy

<% domainClass.constrainedProperties.each { propertyName, constrainedProperty -> %>
	void test${org.apache.commons.lang.StringUtils.capitalize(propertyName)}Constriants() {
		<% constrainedProperty.appliedConstraints.each { constraint -> %> 
		//test ${constraint} <% } %>
	}
	<% } %>

I know it's only a typo, but it bugs me...and may bug other people! And it is supposed to be the test for the domain 'constraints' so it will be best to stick to the convention testXXXConstraints(), no?

Cheers,

Alph

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: