James Carr
Gateway Software Symposium
St. Louis · May 21 - 23, 2010
Software Craftsman
James is a contractor in the St.Louis area that shares a passion for software craftsmanship and has enjoyed software development since he wrote his first program in Basic on the Tandy Color Computer 3 way back in 1988.
In addition to a passion for technology, he also has a keen interest in improving teamwork and collaboration through interactive activities to get people thinking creatively and develop stronger, richer communication channels with their stakeholders.
Presentations
Using Test Doubles With Mockito
Good unit testing comes from testing the System Under Test (SUT) in isolation of the components it depends on to allow us to focus only on the behavior of our component and not have to worry about the added complexity of the other moving parts outside of it's bounds. However, the way that the
SUT interacts with its collaborators is very important… we want to be able to specify these interactions as part of its behavior without violating encapsulation by either providing indirect inputs to the system or by verifying the indirect outputs.
Test Doubles allow us to specify examples for the SUT's collaboration with dependent components by allowing us to stub dependencies to return canned results, or record interactions with a dependency to verify the indirect output from the SUT.