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

Add ability to mock/stub constructors

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0
    • 1.7.1
    • mocks and stubs
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: