@Override public void execute(final ActionEvent event) { textField.setText("WMultiTextField: " + controller9.getValueAsString()); } });
@Test public void testGetValueAsString() { WMultiTextField field = new WMultiTextField(); field.setLocked(true); setActiveContext(createUIContext()); // Null Assert.assertNull("Value as String should be null", field.getValueAsString()); // Entered text1 field.setData(ENTERED_1); Assert.assertEquals("Value as String should be text1", TEXT1, field.getValueAsString()); // Entered text1 and text2 field.setData(ENTERED_1_2); Assert .assertEquals("Value as String should be text1 and text2", TEXT1 + ", " + TEXT2, field.getValueAsString()); }