GRAILS-1019: Allowing expressions to be used with the 'disabled' attribute for g...
[grails.git] / test / groovy / org / codehaus / groovy / grails / orm / hibernate / ListDomainTests.groovy
blob3dbf734ff319719bad4a58443faadf52e4d28b1d
1 package org.codehaus.groovy.grails.orm.hibernate;
3 import org.codehaus.groovy.grails.commons.*
4 import org.codehaus.groovy.grails.commons.test.*
6 class ListDomainTests extends AbstractGrailsMockTests {
8 void testListDomain() {
9 def authorClass = ga.getDomainClass("Author")
10 def bookClass = ga.getDomainClass("Book")
13 def authorsProp = bookClass.getPropertyByName("authors")
14 assert authorsProp.oneToMany
15 assert authorsProp.bidirectional
16 assert authorsProp.association
17 assertEquals "book", authorsProp.referencedPropertyName
19 def otherSide = authorsProp.otherSide
20 assert otherSide
21 assertEquals "book", otherSide.name
25 void onSetUp() {
26 this.gcl.parseClass('''
27 class Book {
28 Long id
29 Long version
30 List authors
31 def hasMany = [authors:Author]
33 class Author {
34 Long id
35 Long version
36 Book book
38 '''
42 void onTearDown() {