Class JTreeFixture

java.lang.Object
org.fest.swing.fixture.ComponentFixture<JTree>
org.fest.swing.fixture.JTreeFixture
All Implemented Interfaces:
ClientPropertyStorageFixture, CommonComponentFixture, FocusableComponentFixture, JComponentFixture, JPopupMenuInvokerFixture, KeyboardInputSimulationFixture, MouseInputSimulationFixture, StateVerificationFixture, ToolTipDisplayFixture

Understands functional testing of JTrees:
  • user input simulation
  • state verification
  • property value query

TreePaths can be specified using Strings. For example, for the following tree:


 root
   |
   -- node1
      |
      -- node1.1
 
we can identify the node "node1.1" as follows:

   root/node1/node1.1
 

The default path separator is "/". It can be changed by calling separator(String).

The conversion between the values given in tests and the values being displayed by a JTree renderer is performed by a JTreeCellReader. This fixture uses a BasicJTreeCellReader by default.