a5eabd753c8d34ac2269939423732d981cd8b1e7
[policy/apex-pdp.git] /
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
4  *  Modifications Copyright (C) 2019 Nordix Foundation.
5  *  Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * SPDX-License-Identifier: Apache-2.0
20  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.policy.apex.testsuites.integration.context.utils;
24
25 import java.util.TimeZone;
26 import lombok.AccessLevel;
27 import lombok.NoArgsConstructor;
28 import org.onap.policy.apex.context.test.concepts.TestPolicyContextItem;
29 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
30
31 /**
32  * The Class Constants provides constants for context tests.
33  */
34 @NoArgsConstructor(access = AccessLevel.PRIVATE)
35 public final class Constants {
36     public static final String MAP_CONTEXT_ALBUM = "MapContextAlbum";
37     public static final String LONG_CONTEXT_ALBUM = "LongContextAlbum";
38     public static final String DATE_CONTEXT_ALBUM = "DateContextAlbum";
39
40     public static final String EXTERNAL_CONTEXT_ALBUM = "ExternalContextAlbum";
41     public static final String GLOBAL_CONTEXT_ALBUM = "GlobalContextAlbum";
42     public static final String POLICY_CONTEXT_ALBUM = "PolicyContextAlbum";
43
44     public static final String APEX_DISTRIBUTOR = "ApexDistributor";
45     public static final String VERSION = "0.0.1";
46     public static final int INT_VAL = 0xFFFFFFFF;
47     public static final int INT_VAL_2 = 2000;
48     public static final int INT_VAL_3 = -1;
49     public static final String EXCEPTION_MESSAGE = "Test should throw an exception";
50     public static final byte BYTE_VAL = (byte) 0xFF;
51     public static final double PI_VAL = Math.PI;
52     public static final float FLOAT_VAL = 3.14159265359F;
53     public static final String EXTERNAL_CONTEXT = "externalContext";
54     public static final String GLOBAL_CONTEXT_KEY = "globalContext";
55     public static final String STRING_GLOBAL_VAL = "This is a global context string";
56     public static final String STRING_VAL = "This is a policy context string";
57     public static final String STRING_EXT_VAL = "This is an external context string";
58     public static final long LONG_VAL = 0xFFFFFFFFFFFFFFFFL;
59     public static final String TEST_POLICY_CONTEXT_ITEM = TestPolicyContextItem.class.getName();
60     public static final TimeZone TIME_ZONE = TimeZone.getTimeZone("Europe/Dublin");
61
62     public static final AxArtifactKey L_TYPE_CONTEXT_ALBUM = new AxArtifactKey("LTypeContextAlbum", VERSION);
63     public static final String TEST_VALUE = "testValue";
64
65     private static final AxArtifactKey KEY = new AxArtifactKey("testC-top", VERSION);
66     private static final AxArtifactKey KEY3 = new AxArtifactKey("testC-bot", VERSION);
67     private static final AxArtifactKey KEY2 = new AxArtifactKey("testC-next", VERSION);
68
69     private static final AxArtifactKey[] USED_ARTIFACT_STACK_ARRAY = new AxArtifactKey[] {KEY, KEY2, KEY3};
70
71     /**
72      * Gets the ax artifact key array.
73      *
74      * @return the ax artifact key array
75      */
76     public static final AxArtifactKey[] getAxArtifactKeyArray() {
77         return USED_ARTIFACT_STACK_ARRAY;
78     }
79 }