1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.datadictionary.validation.charlevel;
17
18 import org.junit.Test;
19 import org.kuali.rice.kns.datadictionary.validation.charlevel.NumericValidationPattern;
20 import org.kuali.rice.krad.datadictionary.validation.ValidationTestUtils;
21 import org.kuali.rice.test.BaseRiceTestCase;
22
23 public class NumericValidationPatternTest extends BaseRiceTestCase {
24 private NumericValidationPattern pattern;
25
26
27 public void setUp() throws Exception {
28 pattern = new NumericValidationPattern();
29 }
30
31
32 @Test public final void testMatch_allowDefault() {
33 boolean[] expected = { true,
34 false,
35 false,
36 false,
37 false,
38 false,
39 false,
40 true,
41 false,
42 false,
43 false,
44 false,
45 false,
46 false,
47 false,
48 false,
49 false,
50 };
51
52 ValidationTestUtils.assertPatternMatches(pattern, expected);
53 }
54 }