Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1864

MockFor property support requires "demands" for all property access

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-1
    • 1.7.1
    • mocks and stubs
    • None

    Description

      Using Grails 0.5 HEAD, a MockFor demand where the closure references a static property of the class causes expectation violations:

      mockDomain.demand.setStatus(1)

      { assertEquals AuthenticationUser.STATUS_VALID, it }

      Where mockDomain is an instance of AuthenticationUser, this fails because there is no expected call to getSTATUS_VALID, STATUS_VALID being a static final property on the domain class.

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              marc@anyware.co.uk Marc Palmer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: