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

Add ability to mock/stub constructors

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.7.1
    • Component/s: mocks and stubs
    • Labels:
      None
    • Environment:
      groovy 1.0, Java 1.5, Windows 2000

      Description

      Would like the ability to stub/mock constructors.

      Example:

      def dateStub = new StubFor( Date )

      dateStub.demand.Date

      { aControlCurrentTime }

      Expectation is that .Date would be the default constructor of the Date class.

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              davedude David Weiler-Thiessen
            • Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: