Q: Pattern for development testing of MVC

From: G. Ralph Kuntz, MD (grk_at_usa.net)
Date: 08/22/04


Date: 22 Aug 2004 07:52:17 -0700

I am writing an application using the test-first paradigm. I am
trying to come up with a way to test a piece of code and am looking
for a coding pattern to use for development so that it will be
testable.

I have a preferences dialog that contains a JPanel. I can easily test
the JPanel with JUnit and since the dialog box will only contain the
JPanel and nothing else, a couple of tests with JFCUnit for creation
and disposing should be sufficient and easy.

My problem is that the panel contains a JList and an "Add" button.
The controller for the add button brings up a new dialog for the user
to enter the new item.

I can't come up with a pattern for developing the controller->new
dialog (modal) that will not be difficult to test.

Any ideas?

Thanks, Ralph


Quantcast