Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343737

Summary: Provide mocking framework for JUnit tests
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: beyhan.veliev, holger.staudacher, rsternberg
Version: unspecified   
Target Milestone: 1.4   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 340310    
Bug Blocks:    

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.