【问题标题】:How to call a method from domain class when testing in Grails?在 Grails 中测试时如何从域类中调用方法?
【发布时间】:2017-01-20 10:18:03
【问题描述】:

我在我的域类中编写了一个静态方法,我必须在我的 Grails 测试中对其进行测试。现在如何从域类中调用该方法。 该静态方法将从我的数据库中获取一些数据并将其返回。

【问题讨论】:

    标签: grails grails-orm grails-domain-class grails-test


    【解决方案1】:

    试试这个链接:http://docs.grails.org/latest/guide/testing.html#unitTestingDomains

    您会在那里找到大量有关使用 Grails 进行测试的有用信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-28
      • 2021-02-07
      • 2020-10-16
      • 1970-01-01
      相关资源
      最近更新 更多