Unit test candidates

Petr Kuzel <[email protected]> Mon, 19 Jan 2004 17:16:31 +0100
Newsgroups gmane.comp.java.netbeans.modules.tasklist.devel
Organization Sun Microsystems
Message-ID <[email protected]>
Hello all,

I plan to write unit tests covering tasklist functionality.
I'm looking for classes that historically and recently
caused most problems. My hot candidates are: core.Task,
suggestions.SuggestionBroker and suggestions.SuggestionManagerImpl.
Do you have any other candidates?

To test these in unit like manner a lot of mock objects must be created:
WindowManager, TopComponent.Registry, DataObject.Registry, etc.
Therefore my second question is: What is better practice:

  - introduce simpler interfaces with lookup mechanism, their
    implementations (delegating to original objects) and
    for unit testing their mockups

  - write mockups for exiting objects and prepend them
    to unit test classpath (simplification there exists
    one class in openide called ActionsInfraHid.UsefulThings
    that mocks TopComponent.Registry)?

  Any suggestions and experiences?
  Cc.

-- 
<address>
<a href="mailto:[email protected]">Petr Kuzel</a> at Sun Microsystems :
<a href="http://www.netbeans.org/">NetBeans Java IDE</a></address>