3

I'll looking about mocking of constructor calls in tested method. Something like http://code.google.com/p/powermock/wiki/MockConstructor

The problem is that I'm working under JDK 1.4 (this is requirement of customer). I tried to use Retrotranslator for PowerMock, but it seems that I can do nothing about required use of annotations @RunWith(PowerMockRunner.class) and @PrepareForTest for running example.

Maybe somebody can advise me the mocking framework which works under JDK 1.4 and can mock construction of new objects?

skaffman
  • 398,947
  • 96
  • 818
  • 769
DixonD
  • 6,557
  • 5
  • 31
  • 52

1 Answers1

0

JMock 1 for JDK 1.3 and above http://www.jmock.org/download.html

Easymock has a version compatible with JDK 1.3 I think http://sourceforge.net/projects/easymock/files/EasyMock/1.2/easymock1.2_Java1.3.zip/download

Kannan Ekanath
  • 16,759
  • 22
  • 75
  • 101
  • EasyMock hasn't required feature. I'm not sure about JMock 1 but it seems that it hasn't too. – DixonD Mar 08 '10 at 15:20