1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package test.de.smartics.properties.resource.repository;
17
18 import org.junit.experimental.categories.Category;
19 import org.junit.experimental.theories.DataPoint;
20
21 import de.smartics.properties.resource.domain.ArtifactId;
22 import de.smartics.testdoc.annotations.Uut;
23 import de.smartics.testdoc.categories.type.ObjectBasics;
24 import de.smartics.util.test.theories.ObjectTheories;
25
26
27
28
29 @Category(ObjectBasics.class)
30 @Uut(type = ArtifactId.class)
31 public class ArtifactIdObjectTest extends ObjectTheories
32 {
33 private static final String GROUP_ID_1 = "com.example.ones";
34
35 private static final String ARTIFACT_ID_1 = "artifact-one";
36
37 private static final String VERSION_1 = "1.0";
38
39 private static final String ARCHIVE_TYPE_1 = "jar";
40
41 private static final String CLASSIFIER_1 = "app";
42
43 private static final String GROUP_ID_2 = "com.example.twos";
44
45 private static final String ARTIFACT_ID_2 = "artifact-two";
46
47 private static final String VERSION_2 = "1.1";
48
49 private static final String ARCHIVE_TYPE_2 = "ear";
50
51 private static final String CLASSIFIER_2 = null;
52
53 @DataPoint
54 public static final ArtifactId DEFAULT = ArtifactId.create(
55 GROUP_ID_1, ARTIFACT_ID_1, VERSION_1, ARCHIVE_TYPE_1, CLASSIFIER_1);
56
57 @DataPoint
58 public static final ArtifactId SAME = DEFAULT;
59
60 @DataPoint
61 public static final ArtifactId EQUAL = ArtifactId.create(
62 GROUP_ID_1, ARTIFACT_ID_1, VERSION_1, ARCHIVE_TYPE_1, CLASSIFIER_1);
63
64 @DataPoint
65 public static final ArtifactId OTHER_GROUP = ArtifactId.create(
66 GROUP_ID_2, ARTIFACT_ID_1, VERSION_1, ARCHIVE_TYPE_1, CLASSIFIER_1);
67
68 @DataPoint
69 public static final ArtifactId OTHER_ARTIFACT = ArtifactId
70 .create(GROUP_ID_1, ARTIFACT_ID_2, VERSION_1, ARCHIVE_TYPE_1,
71 CLASSIFIER_1);
72
73 @DataPoint
74 public static final ArtifactId OTHER_VERSION = ArtifactId
75 .create(GROUP_ID_1, ARTIFACT_ID_1, VERSION_2, ARCHIVE_TYPE_1,
76 CLASSIFIER_1);
77
78 @DataPoint
79 public static final ArtifactId OTHER_ARCHIVE_TYPE = ArtifactId
80 .create(GROUP_ID_1, ARTIFACT_ID_1, VERSION_1, ARCHIVE_TYPE_2,
81 CLASSIFIER_1);
82
83 @DataPoint
84 public static final ArtifactId OTHER_CLASSIFIER = ArtifactId
85 .create(GROUP_ID_1, ARTIFACT_ID_1, VERSION_1, ARCHIVE_TYPE_1,
86 CLASSIFIER_2);
87
88 @DataPoint
89 public static final String STRING = "OTHER_CLASS";
90
91 @DataPoint
92 public static final ArtifactId NULL = null;
93 }