Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343737 - Provide mocking framework for JUnit tests
Summary: Provide mocking framework for JUnit tests
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 1.4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 340310
Blocks:
  Show dependency tree
 
Reported: 2011-04-25 10:49 EDT by Rüdiger Herrmann CLA
Modified: 2011-10-05 10:24 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2011-04-25 10:49:55 EDT
Writing tests could be made easier in some areas if there were a "mocking framework":http://en.wikipedia.org/wiki/Mock_object available.
There are several implementations to choose from:
* "JMock":http://www.jmock.org
* "Mockito":http://mockito.org
* "EasyMock":http://easymock.org
* ...
My preferred choice is "Mockito":http://mockito.org, moreover it is available from Orbit. 
To effectively use any mocking framework, generics as introduced with Java 1.5 are a necessity. Hence we would need increase the minimum required execution environment and change the build to run tests with a 1.5 JRE; at least for the test projects (see also bug bug 340310).

Please let me know if you find this useful. If so, I would go on and open a CQ.
Comment 1 Holger Staudacher CLA 2011-04-25 14:06:46 EDT
+1. I can also recommend mockito.
Comment 2 Beyhan Veliev CLA 2011-04-26 04:10:22 EDT
+1. Could be very useful for some tests.
Comment 3 Ralf Sternberg CLA 2011-04-26 07:08:54 EDT
+1
Comment 4 Rüdiger Herrmann CLA 2011-04-30 07:33:53 EDT
Just for the record: I opened "QC 5114":https://dev.eclipse.org/ipzilla/show_bug.cgi?id=5114
Comment 5 Rüdiger Herrmann CLA 2011-05-12 14:56:06 EDT
The CQ "5114":https://dev.eclipse.org/ipzilla/show_bug.cgi?id=5114 just has been approved.
Comment 6 Rüdiger Herrmann CLA 2011-10-05 10:24:56 EDT
Mockito is in use now for a while. Apparently we forgot to resolve this issue.