125 assertEquals("4", tf.getText()); |
125 assertEquals("4", tf.getText()); |
126 }); |
126 }); |
127 } |
127 } |
128 |
128 |
129 @Test |
129 @Test |
|
130 void testNumpad() throws InvocationTargetException, InterruptedException { |
|
131 // given |
|
132 final var tf = createTestSubject(); |
|
133 assertEquals("", tf.getText()); |
|
134 final var event = new KeyEvent(tf, KeyEvent.KEY_PRESSED, System.currentTimeMillis(), |
|
135 0, KeyEvent.VK_NUMPAD4, '4'); |
|
136 SwingUtilities.invokeAndWait(() -> { |
|
137 // when |
|
138 dispatch(tf, event); |
|
139 // then |
|
140 assertEquals("4", tf.getText()); |
|
141 }); |
|
142 } |
|
143 |
|
144 @Test |
130 void testTextOverwriteByKeystore() throws InvocationTargetException, InterruptedException { |
145 void testTextOverwriteByKeystore() throws InvocationTargetException, InterruptedException { |
131 // given |
146 // given |
132 final var tf = createTestSubject(); |
147 final var tf = createTestSubject(); |
133 tf.setText("6"); |
148 tf.setText("6"); |
134 tf.selectAll(); |
149 tf.selectAll(); |