01: /*
02: * User: mrettig
03: * Date: Jul 2, 2002
04: * Time: 10:37:11 AM
05: */
06: package net.sourceforge.jaxor.util.tests;
07:
08: import junit.framework.TestCase;
09: import net.sourceforge.jaxor.util.Validation;
10:
11: public class ValidationTest extends TestCase {
12:
13: public void testMergingValidations() {
14: Validation val = new Validation();
15: val.addError("Error");
16:
17: Validation v2 = new Validation();
18: v2.addError("Error");
19: v2.addInfo("Info");
20: val.add(v2);
21: assertEquals(3, val.getMessages().size());
22: assertEquals("INFO: Info\nERROR: Error\nERROR: Error\n", val
23: .toString());
24: }
25: }
|