... to an
AuctionLogDriver
class which uses the
Apache Commons IO library. It also cheats slightly by resetting the log manager
(we’re not really supposed to be in the same address space), since ... class write and
read from a real file. Instead, we decide that file access is sufficiently covered by
the end-to-end test we’ve just set up, so we’ll run everything in memory to
reduce the test’s ....
... the automatic
documentation for a
KeyboardLayout
class.
Figure 21.1 The TestDox IntelliJ plug-in
Regularly Read Documentation Generated from Tests
We find that such generated documentation gives ... However, production logging is an external interface
that should be driven by the requirements of those who will depend on it, not
by the structure of the current implementation. We find that...
... It should make no difference whether a trans-
action is controlled by a block wrapped around our code by the framework, or by
a transactor in our tests. But if we’ve made a mistake and it does ... just decide on a broad-brush
architecture and principles by which the system will cope with concurrency.
This design is often prescribed by the frameworks or libraries that an
application...
... Pryce took the ideas and implemented them in
Ruby. He exploited Ruby’s reflection to write expectations directly into the test
as blocks. Influenced by his PhD work on protocols between components, ... and explained that I felt that it helped
our junior developers write better object-oriented code. I finished the story by
saying, “But this is such an obvious technique that I’m sure most pe...
... development. Growing
Object-Oriented Software, Guided by Tests, presents a coherent, consistent system
of development, where different techniques support each other.
I invite you to read Growing Object-Oriented ... Data:
Freeman, Steve, 1958-
Growing object-oriented software, guided by tests / Steve Freeman and Nat Pryce.
p. cm.
ISBN 978-0-321-50362-6 (pbk. : alk. p...
... watermark.
ptg
Many object-oriented languages support encapsulation by providing control over
the visibility of an object’s features to other objects, but that’s not enough. Objects
can break encapsulation by ... most direct way can damage the maintainability of the
system, for example by making the code difficult to understand or by introducing
hidden dependencies between components...
... This is to make sure that the
chat
is not garbage-collected by the Java
runtime. There’s a note at the top of the
ChatManager
documentation that says:
The chat manager keeps track of references ... items:
• Single item: join, bid, and lose. When a price comes in, send a bid raised
by the minimum increment defined by the auction. This amount will be
included in the price update inform...
... will receive the value in a
SniperSnapshot
. We start by
changing the test to expect the different listener call, and to trigger the event by
calling
currentPrice()
twice: once to force the ... constants are no longer accessible
from
MainWindow
.
Object-Oriented Column
We still have a couple of things to do before we finish this task. We start by
removing all the old test code that...
... development. Growing
Object-Oriented Software, Guided by Tests, presents a coherent, consistent system
of development, where different techniques support each other.
I invite you to read Growing Object-Oriented ... Bogdanoff
www.it-ebooks.info
ptg
Praise for Growing Object-Oriented Software, Guided by Tests
“The authors of this book have led a revolution in the craft o...