- name of the method being tested
- scenario under which it is being tested
- the expected behavior when the scenaio is invoked
- stubs - Stubs are essentially the simplest possible implementation of a given interface you can think of. For example, stubs’ methods typically return hardcoded, meaningless values.
- fakes - Fakes are a degree more sophisticated than stubs in that they can be considered an alternative implementation of the interface. In other words, a fake looks like a duck and walks like a duck even though it isn’t a real duck. In contrast, a stub only looks like a duck.
- mocks - Mocks can be considered even more sophisticated in terms of their implementation, because they incorporate assertions for verifying expected collaboration with other objects during a test. Depending on the implementation of a mock, it can be set up either to return hardcoded values or to provide a fake implementation of the logic. Mocks are typically generated dynamically with frameworks and libraries, such as EasyMock, but they can also be implemented by hand.
Created a new Trac instance. Could not use the command-line version. Had to execute the interactive mode: sudo trac-admin /opt/trac/megatron initenv . Very strange.

No comments:
Post a Comment