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.api.core.security.Base64PropertyValueSecurity;
26 import de.smartics.properties.impl.config.domain.key.envapp.EnvAppConfigurationKey;
27 import de.smartics.properties.impl.config.properties.PropertiesConfigurationProperties;
28 import de.smartics.properties.spi.config.proxy.PropertyConfigurationObjectBuilder;
29 import de.smartics.testdoc.annotations.Uut;
30 import de.smartics.testdoc.categories.type.ObjectBasics;
31 import de.smartics.util.test.theories.ObjectTheories;
32
33
34
35
36 @Category(ObjectBasics.class)
37 @Uut(type = PropertyConfigurationObjectBuilder.class)
38 public class PropertyConfigurationProxyObjectBasicsTest extends ObjectTheories
39 {
40
41
42
43
44
45
46
47
48
49
50
51
52
53 private static PropertyConfigurationObjectBuilder builder =
54 new PropertyConfigurationObjectBuilder();
55
56 private static PropertiesConfigurationProperties configurationProperties;
57
58 static
59 {
60 final EnvironmentId environmentId = new EnvironmentId("test");
61 final ApplicationId applicationId =
62 new ApplicationId("groupId", "artefactId", "version");
63 final ConfigurationKey<?> key =
64 new EnvAppConfigurationKey(environmentId, applicationId);
65 configurationProperties =
66 new PropertiesConfigurationProperties(key,
67 new Base64PropertyValueSecurity());
68 configurationProperties.addClassPathProperties(TestProperties.class);
69 }
70
71
72
73
74
75 @DataPoint
76 public static final TestProperties DEFAULT = builder.build(
77 TestProperties.class, configurationProperties);
78
79 @DataPoint
80 public static final TestProperties OTHER = builder.build(
81 TestProperties.class, configurationProperties);
82 }