1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package test.de.smartics.properties.api.config.domain.key;
17
18 import org.junit.experimental.categories.Category;
19 import org.junit.experimental.theories.DataPoint;
20
21 import de.smartics.properties.api.config.domain.key.ApplicationId;
22 import de.smartics.properties.api.config.domain.key.ConfigurationKey;
23 import de.smartics.properties.api.config.domain.key.EnvironmentId;
24 import de.smartics.properties.impl.config.domain.key.envapp.EnvAppConfigurationKey;
25 import de.smartics.testdoc.annotations.Uut;
26 import de.smartics.testdoc.categories.type.ObjectBasics;
27 import de.smartics.util.test.theories.ObjectTheories;
28
29
30
31
32 @Category(ObjectBasics.class)
33 @Uut(type = ConfigurationKey.class)
34 public class ConfigurationKeyObjectTest extends ObjectTheories
35 {
36 public static final EnvironmentId ENV_MIN = new EnvironmentId("test1");
37
38 public static final EnvironmentId ENV_MAX = new EnvironmentId("test2");
39
40 public static final ApplicationId APP_MIN = new ApplicationId("group",
41 "artifactId", "1.0");
42
43 public static final ApplicationId APP_MAX = new ApplicationId("group",
44 "artifactId", "2.0");
45
46 @DataPoint
47 public static final ConfigurationKey<?> DEFAULT = new EnvAppConfigurationKey(
48 ENV_MIN, APP_MIN);
49
50 @DataPoint
51 public static final ConfigurationKey<?> SAME = DEFAULT;
52
53 @DataPoint
54 public static final ConfigurationKey<?> EQUAL = new EnvAppConfigurationKey(
55 ENV_MIN, APP_MIN);
56
57 @DataPoint
58 public static final ConfigurationKey<?> KEY_ENV_MAX =
59 new EnvAppConfigurationKey(ENV_MAX, APP_MIN);
60
61 @DataPoint
62 public static final ConfigurationKey<?> KEY_APP_MAX =
63 new EnvAppConfigurationKey(ENV_MIN, APP_MAX);
64
65 @DataPoint
66 public static final ConfigurationKey<?> KEY_MAX = new EnvAppConfigurationKey(
67 ENV_MAX, APP_MAX);
68
69 @DataPoint
70 public static final String STRING = "OTHER_CLASS";
71
72 @DataPoint
73 public static final ConfigurationKey<?> NULL = null;
74 }