Method: JavaMethod#add_jmock_builder_to
- Defined in:
- lib/java_testing_guff/qdox_extensions.rb
#add_jmock_builder_to(generated_class) ⇒ Object
225 226 227 228 229 230 231 232 233 234 |
# File 'lib/java_testing_guff/qdox_extensions.rb', line 225 def add_jmock_builder_to(generated_class) JMockStubMethodWriter.new(self).add_stub_methods_to(generated_class) add_expectation_methods_to(generated_class) {|body| if (returns_something?) body.line("expects(once()).method(\"#{name}\").#{jmock_with_clause}.will(returnValue(result));") else body.line("expects(once()).method(\"#{name}\").#{jmock_with_clause};") end } end |