Mock Objects

Don't give up on mocking!

room: Sheraton Hall C, LC — time: Thursday 08:30-10:00
Average Rating: -

First, I’d like to present an experience report about real-life development with mock objects: the test-driven struggle. Then I will show how to improve the TDD experience and code quality through a slightly different approach to mocking: taking a step back from the invasive nature of interaction based testing and getting closer to the way we do state based testing. Finally, I will introduce a new mock library for java: Mockito which was driven by these observations. Mockito implements what Gerard Meszaros calls a Test Spy.

Process in short:

Experience report (shows the problem) -> tutorial of a new tool (tries to fix the problem)

TDD Clinic: incremental design with Mock Objects.

room: Osgoode West, LC — time: Wednesday 08:30-10:00, Wednesday 10:30-12:00
Average Rating: -

Prerequisites: Laptop (including power cable!), Java 5 development environment

This hands-on tutorial teaches Test-Driven Development, using Mock Objects to drive the discovery of roles and responsibilities in the code.

  • Test-Driven Development in context: using high-level tests to drive features, low-level tests to drive design.
  • Object-Oriented Design: systems are built up from communicating objects that provide services for each other. Mock Objects helps us focus on the relationships between objects, clarifying their roles and encapsulating implementation detail.
  • Test-Driven Development: using problems in testing to help us identify weaknesses in our design, learning to listen to the tests.
Syndicate content