ltalley
Sat, 07 Sep 2019 01:06:05 GMT
Hi! The best solution is to modify the setDependencyNamesAndInitExpressions() macro to store non-mocked dependencies in member fields. To do this, change the following lines: --- #elseif(!$dependency.shouldBeMocked) #set($dependency.shouldStoreInReference = false) #end --- to: --- #elseif(!$dependency.shouldBeMocked) #set($dependency.shouldStoreInReference = true) #end --- These are lines 612-614 in the JUnit4 Java template.
Bingo, thanks, this is just what I was looking for!