01: /*
02: * User: mrettig
03: * Date: Jun 27, 2002
04: * Time: 4:54:25 PM
05: */
06: package net.sourceforge.jaxor.mappers.tests;
07:
08: import junit.framework.TestCase;
09: import net.sourceforge.jaxor.MetaField;
10: import net.sourceforge.jaxor.mappers.FieldAdapterImpl;
11: import net.sourceforge.jaxor.mappers.StringMapper;
12: import net.sourceforge.jaxor.util.SystemException;
13:
14: public class StringMapperTest extends TestCase {
15:
16: public void testNullStringValidationFieldTest() {
17: FieldAdapterImpl field = new FieldAdapterImpl(new MetaField(
18: "name", false, StringMapper.class), null);
19: field.setValue("");
20: try {
21: field.validate();
22: fail("This should not happen");
23: } catch (SystemException expected) {
24:
25: }
26: }
27: }
|