2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 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
11 * http://www.apache.org/licenses/LICENSE-2.0
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 * ============LICENSE_END=========================================================
22 * ============LICENSE_START==========================================
24 * ===================================================================
25 * Copyright (c) 2019 IBM.
26 * ===================================================================
27 * Licensed under the Apache License, Version 2.0 (the "License");
28 * you may not use this file except in compliance with the License.
29 * You may obtain a copy of the License at
31 * http://www.apache.org/licenses/LICENSE-2.0
33 * Unless required by applicable law or agreed to in writing, software
34 * distributed under the License is distributed on an "AS IS" BASIS,
35 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36 * See the License for the specific language governing permissions and
37 * limitations under the License.
39 * ============LICENSE_END=============================================
40 * ====================================================================
42 package org.onap.so.cloud.authentication;
44 import static org.junit.Assert.assertEquals;
46 import java.util.Calendar;
48 import org.junit.Before;
49 import org.junit.Test;
51 public class KeystoneAuthHolderTest {
53 private KeystoneAuthHolder keystoneAuthHolder;
54 private Calendar calendar = Calendar.getInstance();
58 keystoneAuthHolder = new KeystoneAuthHolder();
62 public void testGetId() {
63 keystoneAuthHolder.setId("001");
64 assertEquals("001", keystoneAuthHolder.getId());
68 public void testGetexpiration() {
69 keystoneAuthHolder.setexpiration(calendar);
70 assertEquals(calendar, keystoneAuthHolder.getexpiration());
74 public void testGetServiceUrl() {
75 keystoneAuthHolder.setHeatUrl("testURL");
76 assertEquals("testURL", keystoneAuthHolder.getServiceUrl());