jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • jMock
  • JMOCK-136

If using ClassImposteriser.INSTANCE to create a mock the instance variables are not initialized and constructor isn't called

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 2.1.0
  • Fix Version/s: 2.1.0
  • Component/s: JMock 2.x.x Library
  • Labels:
    None
  • Environment:
    Winows, Java 5

Description

If I create a mock via

mockery = new Mockery() {{
setImposteriser(ClassImposteriser.INSTANCE);
}};

manager = mockery.mock(AbstractSynchronizedNotificationManager.class);

the instance variables of manager or better AbstractSynchronizedNotificationManager are not initalized and the constructor is not called.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Nat Pryce added a comment - 19/Jul/07 2:28 AM

That's what it's meant to do. Please read the documentation.

Show
Nat Pryce added a comment - 19/Jul/07 2:28 AM That's what it's meant to do. Please read the documentation.

People

  • Assignee:
    Nat Pryce
    Reporter:
    Rolf Kulemann
Vote (0)
Watch (0)

Dates

  • Created:
    19/Jul/07 2:25 AM
    Updated:
    19/Jul/07 2:28 AM
    Resolved:
    19/Jul/07 2:28 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.