Supports functional testing of {@code JTextComponent}s.
Note: This class is intended for internal use only. Please use the classes in the package {@link org.fest.swing.fixture} in your tests.
75767778798081
@Override protected final void onSetUp() { MyWindow window = MyWindow.createNew(getClass()); textArea = window.textArea; robot.showWindow(window); driver = new JTextComponentDriver(robot); }
58596061626364
super(JTextComponentFixture.class, robot, textComponentName, JTextComponent.class); } @Override protected @Nonnull JTextComponentDriver createDriver(@Nonnull Robot robot) { return new JTextComponentDriver(robot); }
4344454647484950515253
fixture.replaceDriverWith(mock(JTextComponentDriver.class)); } @Test public void should_return_text_using_driver() { JTextComponentDriver driver = fixture.driver(); JTextComponent target = fixture.target(); when(driver.textOf(target)).thenReturn("Hello"); assertThat(fixture.text()).isEqualTo("Hello"); verify(driver).textOf(target); }
64656667686970
super(robot, textComponentName, JTextComponent.class); createDriver(); } private void createDriver() { driver(new JTextComponentDriver(robot)); }