1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.springframework.richclient.form.builder.support;
17
18 import junit.framework.TestCase;
19
20 import org.springframework.binding.form.FormModel;
21 import org.springframework.binding.form.support.DefaultFormModel;
22
23
24
25
26
27
28 public class DirtyIndicatorInterceptorFactoryTests extends TestCase {
29 public void testGetInterceptor() {
30 DirtyIndicatorInterceptorFactory factory = new DirtyIndicatorInterceptorFactory();
31
32 FormModel formModel = new DefaultFormModel();
33 DirtyIndicatorInterceptor interceptor = (DirtyIndicatorInterceptor)factory.getInterceptor(formModel);
34
35 assertNotNull("factory returned null", interceptor);
36 }
37
38 public void testGetInterceptorWithNullFormModel() {
39 try {
40 DirtyIndicatorInterceptorFactory factory = new DirtyIndicatorInterceptorFactory();
41 factory.getInterceptor(null);
42 } catch (IllegalArgumentException ex) {
43
44 }
45
46 }
47 }