简体   繁体   中英

How to call a method from domain class when testing in Grails?

I have a static method written in my domain class , which I have to test in my Grails test. Now how to call that method from domain class. That static method will fetch some data from my db and will return it.

Try this link: http://docs.grails.org/latest/guide/testing.html#unitTestingDomains

You'll find plenty of useful info regarding to testing with Grails there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM