1516171819202122232425
.setLookAndFeel("com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); } catch (Exception e) { // Likely PlasticXP is not in the class path; ignore. } ValidationList vl = new ValidationList(); vl.add(new Validation("Informe o nome.")); vl.add(new Validation("Informe a idade.")); ValidationView.show(vl); System.exit(0); }
567891011121314
import junit.framework.TestCase; public class ValidationListTest extends TestCase { public void testAddValidation() { ValidationList v = new ValidationList(); v.add(new Validation("Informe o R�tulo.")); assertTrue(v.getMessages().size() == 1); }