1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package test.de.smartics.properties.spi.config.proxy;
17
18 import org.junit.experimental.categories.Category;
19 import org.junit.experimental.theories.DataPoint;
20
21 import test.de.smartics.properties.spi.config.proxy.examples.TestProperties;
22 import de.smartics.properties.api.config.domain.key.ApplicationId;
23 import de.smartics.properties.api.config.domain.key.ConfigurationKey;
24 import de.smartics.properties.api.config.domain.key.EnvironmentId;
25 import de.smartics.properties.impl.config.properties.PropertiesConfigurationProperties;
26 import de.smartics.properties.spi.config.proxy.PropertyConfigurationObjectBuilder;
27 import de.smartics.testdoc.annotations.Uut;
28 import de.smartics.testdoc.categories.type.ObjectBasics;
29 import de.smartics.util.test.theories.ObjectTheories;
30
31
32
33
34 @Category(ObjectBasics.class)
35 @Uut(type = PropertyConfigurationObjectBuilder.class)
36 public class PropertyConfigurationProxyObjectBasicsTest extends ObjectTheories
37 {
38
39
40
41
42
43
44
45
46
47
48
49
50
51 private static PropertyConfigurationObjectBuilder builder =
52 new PropertyConfigurationObjectBuilder();
53
54 private static PropertiesConfigurationProperties configurationProperties;
55
56 static
57 {
58 final EnvironmentId environmentId = new EnvironmentId("test");
59 final ApplicationId applicationId =
60 new ApplicationId("groupId", "artefactId", "version");
61 final ConfigurationKey key =
62 new ConfigurationKey(environmentId, applicationId);
63 configurationProperties = new PropertiesConfigurationProperties(key);
64 configurationProperties.addClassPathProperties(TestProperties.class);
65 }
66
67
68
69
70
71 @DataPoint
72 public static final TestProperties DEFAULT = builder.build(
73 TestProperties.class, configurationProperties);
74
75 @DataPoint
76 public static final TestProperties OTHER = builder.build(
77 TestProperties.class, configurationProperties);
78 }