diff --git a/src/test/groovy/grails/plugin/formfields/mock/Employee.groovy b/src/test/groovy/grails/plugin/formfields/mock/Employee.groovy index e60fdcf2..e8fc22fd 100644 --- a/src/test/groovy/grails/plugin/formfields/mock/Employee.groovy +++ b/src/test/groovy/grails/plugin/formfields/mock/Employee.groovy @@ -3,6 +3,53 @@ package grails.plugin.formfields.mock import grails.persistence.Entity @Entity -class Employee extends Person { +class Employee { + Salutation salutation + String name + String password + Gender gender + Date dateOfBirth + Address address + Map emails = [:] + boolean minor + Date lastUpdated + String excludedProperty + String displayFalseProperty + Boolean grailsDeveloper + Byte[] picture + byte[] anotherPicture + String biography int salary + + String getTransientText() { + "transient text" + } + + static hasMany = [emails: String] + static embedded = ['address'] + + static constraints = { + salutation nullable: true + name blank: false + dateOfBirth nullable: true + address nullable: true + excludedProperty nullable: true + displayFalseProperty nullable: true, display: false + grailsDeveloper nullable: true + picture nullable: true + anotherPicture nullable: true + password password: true + biography nullable: true, widget: 'textarea' + } + + static scaffold = [exclude: ['excludedProperty']] + static transients = ['transientText'] + def onLoad = { + println "loaded" + } + + @Override + String toString() { + name + } } diff --git a/src/test/groovy/grails/plugin/formfields/mock/Person.groovy b/src/test/groovy/grails/plugin/formfields/mock/Person.groovy index 771a9529..9b5da1df 100644 --- a/src/test/groovy/grails/plugin/formfields/mock/Person.groovy +++ b/src/test/groovy/grails/plugin/formfields/mock/Person.groovy @@ -20,7 +20,7 @@ class Person { byte[] anotherPicture String biography - transient String getTransientText() { + String getTransientText() { "transient text" } diff --git a/src/test/groovy/grails/plugin/formfields/taglib/DisplayTagSpec.groovy b/src/test/groovy/grails/plugin/formfields/taglib/DisplayTagSpec.groovy index 648a6695..d9c80d4e 100644 --- a/src/test/groovy/grails/plugin/formfields/taglib/DisplayTagSpec.groovy +++ b/src/test/groovy/grails/plugin/formfields/taglib/DisplayTagSpec.groovy @@ -1,5 +1,6 @@ package grails.plugin.formfields.taglib +import groovy.xml.XmlSlurper import grails.plugin.formfields.FormFieldsTagLib import grails.plugin.formfields.FormFieldsTemplateService import grails.plugin.formfields.mock.Author diff --git a/src/test/groovy/grails/plugin/formfields/taglib/TableSpec.groovy b/src/test/groovy/grails/plugin/formfields/taglib/TableSpec.groovy index 247c2aaa..efed021a 100644 --- a/src/test/groovy/grails/plugin/formfields/taglib/TableSpec.groovy +++ b/src/test/groovy/grails/plugin/formfields/taglib/TableSpec.groovy @@ -1,5 +1,6 @@ package grails.plugin.formfields.taglib +import groovy.xml.XmlSlurper import grails.converters.XML import grails.plugin.formfields.FormFieldsTagLib import grails.plugin.formfields.FormFieldsTemplateService