I have google CodePro Analytix tool installed for Eclipse Helios, when I generate unit tests using code pro, it generates the unit tests , but doesn't generate mock objects of interface, or in general doesn't create mock object, I do have some errors in my project, but if that would have been a problem I don't see how it would generate unit tests in the first place.? Thanks in advance.
Asked
Active
Viewed 1,733 times
1
-
What is your question. You put a question mark on the end of a statement? – Gus Aug 24 '12 at 19:25
-
well the question is why is codePro not generating mock objects the way it should? – captainplanet121 Aug 29 '12 at 13:51
-
(was a joke... note that my question has a '.' and my question .. oh nevermind...) With respect to the errors in your project, it's entirely possible that the tool (I've never used it) does what it can when it encounters errors rather than refusing to do anything. I'd start by resolving your errors which is good practice and probably prevents eclipse from building anyway. – Gus Aug 29 '12 at 14:34
2 Answers
0
Have you checked that this option is enabled?
Window > CodePro > JUnit > Mock Objects > Use mock objects in generated tests

Katu
- 1,296
- 1
- 24
- 38
0
Window→Preferences→CodePro→JUnit→Mock Objects
Here's my settings. In my other Eclipse workspaces I usually have a lot of addition patterns. I mock everything accept POJOs (e.g., DTOs)

javaPlease42
- 4,699
- 7
- 36
- 65