Skip to content

Commit c9f1b33

Browse files
put dynamically compiled test classes in a package
1 parent 90d6eb0 commit c9f1b33

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/OneToManySelfInheritanceTests.groovy

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class OneToManySelfInheritanceTests extends AbstractGrailsHibernateTests {
88

99
protected void onSetUp() {
1010
gcl.parseClass '''
11+
package onetomanyselfinheritancetests
12+
1113
import grails.persistence.*
1214
1315
@Entity
@@ -30,8 +32,8 @@ class ExtOrg extends Org {}
3032
}
3133

3234
void testOneToManyWithSelf() {
33-
def Root = ga.getDomainClass("OrgRoot").clazz
34-
def Org = ga.getDomainClass("Org").clazz
35+
def Root = ga.getDomainClass("onetomanyselfinheritancetests.OrgRoot").clazz
36+
def Org = ga.getDomainClass("onetomanyselfinheritancetests.Org").clazz
3537

3638
def org1 = Org.newInstance(name:"org1")
3739
assertNotNull "should have saved",org1.save(flush:true)
@@ -59,7 +61,7 @@ class ExtOrg extends Org {}
5961

6062
void testOneToManyExt() {
6163

62-
def ExtOrg = ga.getDomainClass("ExtOrg").clazz
64+
def ExtOrg = ga.getDomainClass("onetomanyselfinheritancetests.ExtOrg").clazz
6365

6466
def org1 = ExtOrg.newInstance(name:"org1")
6567
assertNotNull "should have saved",org1.save(flush:true)

grails-test-suite-persistence/src/test/groovy/org/codehaus/groovy/grails/orm/hibernate/OneToManyWithSelfAndInheritanceTests.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class OneToManyWithSelfAndInheritanceTests extends AbstractGrailsHibernateTests
88

99
protected void onSetUp() {
1010
gcl.parseClass '''
11+
package onetomanywithselfandinheritancetests
12+
1113
import grails.persistence.*
1214
1315
@Entity
@@ -29,8 +31,8 @@ class ExtOrganization extends Organization{}
2931

3032
// test for GRAILS-3210
3133
void testSubclassAssociationsWork() {
32-
def Organization = ga.getDomainClass("Organization").clazz
33-
def ExtOrganization = ga.getDomainClass("ExtOrganization").clazz
34+
def Organization = ga.getDomainClass("onetomanywithselfandinheritancetests.Organization").clazz
35+
def ExtOrganization = ga.getDomainClass("onetomanywithselfandinheritancetests.ExtOrganization").clazz
3436

3537
def org1 = Organization.newInstance(name:'Org 1', description:'root organization').save()
3638
def orgA = Organization.newInstance(name:'Org A', description:'child A of Org 1', parent: org1).save()

0 commit comments

Comments
 (0)