1
2
3
4
5
6
7 package org.mule.config.spring.parsers.assembly;
8
9 import org.mule.config.spring.parsers.assembly.configuration.ReusablePropertyConfiguration;
10
11 import org.junit.Test;
12
13 public class ReusablePropertyConfigurationTestCase extends AbstractBasePropertyConfigurationTestCase
14 {
15
16 public static final String REFERENCE = "reference";
17 public static final String WRAPPER = "wrapper";
18
19 @Test
20 public void testReusable()
21 {
22 ReusablePropertyConfiguration config = new ReusablePropertyConfiguration();
23 setTestValues(REFERENCE, config);
24 verifyTestValues(REFERENCE, config);
25 verifyIgnored(REFERENCE, config);
26 config.reset();
27 verifyTestValues(REFERENCE, config);
28 setTestValues(WRAPPER, config);
29 verifyTestValues(REFERENCE, config);
30 verifyTestValues(WRAPPER, config);
31 verifyIgnored(WRAPPER, config);
32 config.reset();
33 verifyMissing(WRAPPER, config);
34 verifyTestValues(REFERENCE, config);
35 setTestValues(WRAPPER, config);
36 verifyTestValues(REFERENCE, config);
37 verifyTestValues(WRAPPER, config);
38 config.reset();
39 verifyMissing(WRAPPER, config);
40 verifyTestValues(REFERENCE, config);
41 }
42
43 }