View Javadoc

1   /*
2    * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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.testdoc.annotations.Uut;
23  import de.smartics.testdoc.categories.type.ObjectBasics;
24  import de.smartics.util.test.theories.ObjectTheories;
25  
26  /**
27   * Tests object basics of {@link ApplicationId}.
28   */
29  @Category(ObjectBasics.class)
30  @Uut(type = ApplicationId.class)
31  public class ApplicationIdObjectTest extends ObjectTheories
32  {
33    @DataPoint
34    public static final ApplicationId DEFAULT = new ApplicationId("group1", // NOPMD
35        "artifactId", "1.0"); // NOPMD
36  
37    @DataPoint
38    public static final ApplicationId SAME = DEFAULT;
39  
40    @DataPoint
41    public static final ApplicationId EQUAL = new ApplicationId("group1",
42        "artifactId", "1.0");
43  
44    @DataPoint
45    public static final ApplicationId OTHER_GROUP = new ApplicationId("group2",
46        "artifactId2", "1.0");
47  
48    @DataPoint
49    public static final ApplicationId OTHER_ARTIFACT = new ApplicationId(
50        "group1", "artifactId2", "1.0");
51  
52    @DataPoint
53    public static final ApplicationId OTHER_VERSION = new ApplicationId("group1",
54        "artifactId", "1.0.1");
55  
56    @DataPoint
57    public static final ApplicationId NULL_VERSION = new ApplicationId("group1",
58        "artifactId", null);
59  
60    @DataPoint
61    public static final String STRING = "OTHER_CLASS";
62  
63    @DataPoint
64    public static final ApplicationId NULL = null;
65  }